1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00
Commit Graph

186 Commits

Author SHA1 Message Date
Peter Rajnoha
da532741c9 Add LVMetaD systemd units. 2012-02-23 11:24:07 +00:00
Peter Rajnoha
4417a8bd40 Add configure --with-tmpfilesdir and lvm2 tmpfiles.d configuration file itself.
/etc/tmpfiles.d directory holds configuration files for temporary/volatile
files and directories that should be automatically managed. For example,
if we have some parts of the fs hierarchy on tmpfs, we'd like to recreate
some files or directories on every boot so they're always prepared for use.

Systemd can read such configuration files. For now, the lock and run directory
are the ones that are most probably placed on tmpfs. If this is the case, we
can install the configuration by 'make install_tmpfiles_configuration'.
2012-02-22 17:55:10 +00:00
Peter Rajnoha
b559a1e6f0 Check whether udev supports built-in blkid.
Built-in blkid is supported since udev v176 - set the UDEV_HAS_BUILTIN_BLKID
variable appropriately so we can use it in the rules to call the built-in
blkid conditionaly.
2012-02-20 19:36:27 +00:00
Peter Rajnoha
53f3ebce92 Add configure --with-default-name-mangling.
This option configures the default name mangling mode used, one of:
AUTO, NONE and HEX.

The name mangling is primarily used to support udev character whitelist
(0-9, A-Z, a-z, #*-.:=@_) so any character that is not on udev whitelist
will get translated into an encoded form \xNN where NN is the hex value
of the character.
2012-02-15 11:17:57 +00:00
Peter Rajnoha
e587cb6ac5 Add configure --with-systemdsystemunitdir. 2012-02-13 13:02:47 +00:00
Fabio M. Di Nitto
94424fabd0 In the new corosync world, dlm is a standalone service.
Fix clvmd init script to Require dlm service when building for the
new corosync or clvmd will fail to start.
2012-02-13 05:24:57 +00:00
Alasdair Kergon
b6d7a48480 Automatically detect whether corosync clvmd needs to use confdb or cmap. (fabio) 2012-01-31 21:21:53 +00:00
Alasdair Kergon
d38de32b40 Fix metad help. 2012-01-23 17:48:18 +00:00
Zdenek Kabelac
2bc1d7598e Thin add dmeventd support
This is basic version with still few unresolved issue mainly in case,
when the pool resize is failing.
2011-12-21 13:08:11 +00:00
Petr Rockai
5da88e5ba4 Use pkg-config to look for CUnit (needed for systems where it's not on the
standard include path).
2011-12-11 15:15:57 +00:00
Zdenek Kabelac
9493f1df09 Add CUnit testing support
Regenerate configure for unit test support.
2011-11-21 10:40:21 +00:00
Petr Rockai
d4fed28523 Implement a CUnit-based runner for unit tests. Copy and adapt (actual unit)
tests from unit-tests/*/*_t.c (now under test/unit). The valgrind/pool test is
missing, since it's not really a unit test and probably not too valuable
either. Available via "make unit" (and if --enable-testing was passed to
configure, also executed by make check).
2011-11-20 21:43:20 +00:00
Alasdair Kergon
bf09a32006 Make dmsetup.static and lvm.static build when dmeventd is disabled.
udev may also need to be disabled if you didn't build it statically too.

dmeventd.static could be fixed with some more work but I don't really see the
point: without dlopen() it's useless, and if you have dlopen(), why not support
normal shared libraries too?
2011-11-14 21:30:35 +00:00
Zdenek Kabelac
13dd31381c Use Makefile for daemmons/common library.
Next iteration for better fit of lvmetad compilation.

Move build of libdaemon.a into common subdir Makefile.
libdaemon.a is device-mapper target.

Build and install lvmetad as lvm2 target.
2011-09-24 20:57:49 +00:00
Zdenek Kabelac
d2c116058e CLVMD support for LVM_CLVMD_BINARY and LVM_BINARY
Read 2 environmental vars to learn about overide position for
CLVMD and LVM binaries.

We support LVM_BINARY in other script - and this way we could easily
test restart in our test-suite.
2011-09-24 20:50:35 +00:00
Petr Rockai
615534d305 A compromise integration of LVMetaD into the build: I have kept all the
daemon/common code in a single libdaemon.a, which is completely private. This
is currently linked into the lvmetad binary, and will be linked into LVM (the
client part, since static linking only picks up only symbols that are actually
used). I have also added --enable/disable-lvmetad to ./configure; although the
current default is off, I expect this to be flipped to on shortly. There's no
LVM-side support yet, but when there is, even when built, it'll still need to
be enabled by an lvm.conf option.
2011-08-31 11:31:57 +00:00
Zdenek Kabelac
3ba4a19510 Initial code layout for thin provisioning target
Only registers init_thin_segtype

Option --with-thin=internal needed for compilation.
For now useful only for developememt!
2011-08-24 08:27:49 +00:00
Alasdair Kergon
6b2717ae83 Drop CCS* variables no longer used. 2011-08-12 01:52:16 +00:00
Alasdair Kergon
40dbaac892 pre-release fixes incl make distclean and configure --with-raid=none/shared 2011-08-11 19:18:17 +00:00
Jonathan Earl Brassow
3041b72f06 Add dmeventd monitoring for RAID devices. 2011-08-11 05:00:20 +00:00
Milan Broz
7cf607705b Remove obsoleted GULM clvmd cluster locking support. 2011-08-09 18:11:00 +00:00
Alasdair Kergon
2061c0ec24 Remove support for the original dm ioctl interface version 1.
Leave the basic support for multiple versions in case we have a new version
in future.
2011-08-09 17:56:47 +00:00
Jonathan Earl Brassow
cac52ca4ce Add basic RAID segment type(s) support.
Implementation described in doc/lvm2-raid.txt.

Basic support includes:
- ability to create RAID 1/4/5/6 arrays
- ability to delete RAID arrays
- ability to display RAID arrays
Notable missing features (not included in this patch):
- ability to clean-up/repair failures
- ability to convert RAID segment types
- ability to monitor RAID segment types
2011-08-02 22:07:20 +00:00
Peter Rajnoha
395d204d9c Configure and makefile changes for newly added systemd unit files. 2011-07-28 12:57:26 +00:00
Alasdair Kergon
86ba564a9e Add missing pkg_config_init check with --enable-udev_sync. 2011-04-28 16:54:32 +00:00
Peter Rajnoha
71b29ddcc4 Require libudev >= 143 when compiling with udev support.
Old versions of libudev < 143 were experimental and unstable. Require recent
and stable versions only (version 143 is old enough anyway).
2011-04-22 11:56:41 +00:00
Zdenek Kabelac
d0df875d48 Add configure option --with-device-nodes-on
Make configurable default behaviour how to deal with device node creates.
With udev system natural options should be  'resume'.
For older systems where user expect there is node in /dev/mapper immediately
after  dmsetup create --notable  -  use 'create'

FIXME:
Code needs fixing passing this flag through udev cookie.
2011-02-04 22:17:54 +00:00
Zdenek Kabelac
349da06cfa Improve OCF dir support
Add --with-ocfdir configurable option.
Fix superfluous /usr in ocf_scriptdir instalation path.
2011-01-10 13:00:53 +00:00
Peter Rajnoha
7dfce0e467 Add new dm_prepare_selinux_context fn to libdevmapper and use it throughout.
Detect existence of new SELinux selabel interface during configure.
Use new dm_prepare_selinux_context instead of dm_set_selinux_context.

We should set the SELinux context before the actual file system object creation.
The new dm_prepare_selinux_context function sets this using the selabel_lookup
fn in conjuction with the setfscreatecon fn. If selinux/label.h interface
(that should be a part of the selinux library) is not found during configure,
we fallback to the original matchpathcon function instead.
2010-12-13 10:43:56 +00:00
Zdenek Kabelac
e40d44be8d Add OCF support
Updated patch from Florian Haas from Linux-HA project.

User needs to 'configure --enable-ocf' to get file installed
by 'make install' target by default.
User can also use 'make install_ocf' to get only ocf files installed.
With disabled (default) ocf support - no ocf files are installed.

FIXME: ocf installation path needs to be kept in sync with pacemaker.
find better way and possible also better location.
2010-11-05 16:18:38 +00:00
Zdenek Kabelac
7c9fd3ea84 Don't use floor() in _bitset_with_random_bits
Use _even_rand() function instead of floor() in _bitset_with_random_bits().
floor() function is missing in dietlibc (on architectures other than x86).
Moreover using floor() to clip rand results does not assure even result
distribution. _even_rand() uses integer arithmetic only and is designed to
return evenly distributed results.

> Looks OK to me. It took a while to decipher what is the exact meaning of
> the loop in _even_rand (to a non-pseudorandomness-expert) but I am
> fairly comfortable with it now. If I understand this correctly, it
> rejects numbers that come from an "incomplete" slice of the RAND_MAX
> space (considering the number space [0, RAND_MAX] is divided into some
> "max"-sized slices and at most a single smaller slice, between [n*max,
> RAND_MAX] for suitable n -- numbers from this last slice are discarded
> because they could distort the distribution in favour of smaller
> numbers).

Signed-off-by: Przemyslaw Iskra <sparky <at> pld-linux.org>
Reviewed-by: Petr Rockai <prockai <at> redhat.com>
2010-10-13 12:18:53 +00:00
Fabio M. Di Nitto
34b6075d68 Based on auto-detection or user requested cluster managers for clvmd,
set appropriate Required-Start and Required-Stop at configure time.

Reorder the checks for user selected cluster managers to match auto
detected ones, to be consistent in the output.

Add special case for qdiskd that´s started after cman/lock_gulmd for
RHEL-4/RHEL-5.
2010-08-23 11:37:02 +00:00
Mike Snitzer
7063efe1bd Switch to using configure --with-default-data-alignment=<NUM> to
establish DEFAULT_DATA_ALIGNMENT.  Again, 0=64KiB, 1=1MiB, 2=2MiB

Default is 1.
2010-08-20 22:24:58 +00:00
Alasdair Kergon
d1e8046f56 Various small cleanups and fixes related to monitoring. 2010-08-16 22:54:35 +00:00
Joe Thornber
52e1564fdd [MM] Make valgrind aware of the pool allocators
./configure with --enable-valgrind-pool to enable this.
2010-08-09 10:56:01 +00:00
Alasdair Kergon
b1f08e51cc Fix configure to supply DEFAULT_RUN_DIR to Makefiles. 2010-07-31 00:43:41 +00:00
Alasdair Kergon
8bae0a1ecf Change clvmd to communicate with lvm via a socket in /var/run/lvm. (mbroz)
https://bugzilla.redhat.com/show_bug.cgi?id=614248 [CVE-2010-2526]
2010-07-28 13:55:42 +00:00
Joe Thornber
66392e6660 Add a unit test for the recent changes to dm_bit_get_next() 2010-07-20 15:25:39 +00:00
Joe Thornber
15106c5064 Wire the regex tests up to the reports 2010-07-20 15:21:32 +00:00
Joe Thornber
1033d12040 Report generators for unit tests and memory checks. Configure with
--enable-testing.
2010-07-20 14:38:44 +00:00
Fabio M. Di Nitto
8c4e8a185a Add dm_create_lockfile to libdm to handle pidfiles for all daemons.
Switch dmeventd to use dm_create_lockfile and drop duplicate code.
Allow clvmd pidfile to be configurable.
Switch cmirrord and clvmd to use dm_create_lockfile.
2010-07-13 13:51:01 +00:00
Zdenek Kabelac
71082be43a Cleanups for configure:
Indent updates.
 Use AC_HELP_STRING for help string.
 Start help string with lower letter.
 Add [] around some default values i.e. [TYPE=internal].
 Skip some "" around shell assigment when not needed.
 Fix typo --with-device-gid=UID string.
2010-07-08 12:02:48 +00:00
Alasdair Kergon
d911ec67a9 Randomly select which mdas to use or ignore.
Add some missing standard configure.in checks.
2010-07-05 22:23:15 +00:00
Zdenek Kabelac
a9b601e2be Fix wrong usage of exec_prefix from previous patch introducing LVM_PATH define
Introduce lvm_exec_prefix with resolved exec_prefix.
(using same ac_default_prefix as for CLVMD_PATH)
Use lvm_exec_prefix instead of dmeventd_prefix (fixes missing ac_default_prefix)

Note: This patch is rather hot-fix as currently generate code
does not create correct code for make exec_prefix=
2010-06-07 14:31:59 +00:00
Zdenek Kabelac
b5c2529bf8 Use absolute paths in commands
clvmd restart does not work at all if clvmd binary is not in current
dir.
2010-06-03 13:50:26 +00:00
Zdenek Kabelac
8fea97b7e7 Replicator: base lvm2 support
Adding configure.in support for Replicators.
Adding basic lib lvm support for Replicators.
Adding flags REPLICATOR and REPLICATOR_LOG.
Adding segments SEG_REPLICATOR and SEG_REPLICATOR_DEV.
Adding basic methods for handling replicator metadata.
2010-05-21 12:36:30 +00:00
Alasdair Kergon
21c56e377b backup->cache 2010-05-20 22:32:44 +00:00
Alasdair Kergon
3399ae320a Add install_system_dirs makefile target.
Add configure options for system and locking directories.
2010-05-20 13:47:21 +00:00
Alasdair Kergon
da05c479a9 Generate example.conf so default lvm.conf contents can be configured. 2010-05-20 11:45:56 +00:00
Zdenek Kabelac
f7f0854eca Add UDEV_PC and SELINUX_PC substituted variables 2010-05-11 08:48:43 +00:00