]> sourceware.org Git - lvm2.git/log
lvm2.git
14 years agoReplicator: extend volume_group with list of VGs and flag
Zdenek Kabelac [Fri, 21 May 2010 12:47:46 +0000 (12:47 +0000)]
Replicator: extend volume_group with list of VGs and flag

Add pointer to linked list of opened VGs. List temporarily keeps
the information about needed or locked and opened VGs for replicator target.

Also add cmd_missing_vgs flag information for quick check and
also for possible continuos process_each_lv() usage where we need
to detect whether failure has been caused by missing VG or
some other reason.

14 years agoReplicator: extend _lv_each_dependency() with dependencies for Replicator devices
Zdenek Kabelac [Fri, 21 May 2010 12:45:18 +0000 (12:45 +0000)]
Replicator: extend _lv_each_dependency() with dependencies for Replicator devices

14 years agoReplicator: check replicator segment
Zdenek Kabelac [Fri, 21 May 2010 12:43:02 +0000 (12:43 +0000)]
Replicator: check replicator segment

Check for possible problems within replicator structures.
Used also by vg_validate.

14 years agoReplicator: new files for Replicator target
Zdenek Kabelac [Fri, 21 May 2010 12:40:05 +0000 (12:40 +0000)]
Replicator: new files for Replicator target

14 years agoReplicator: base lvm2 support
Zdenek Kabelac [Fri, 21 May 2010 12:36:30 +0000 (12:36 +0000)]
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.

14 years agoReplicator: check open_count for parents of presuspend_node
Zdenek Kabelac [Fri, 21 May 2010 12:30:35 +0000 (12:30 +0000)]
Replicator: check open_count for parents of presuspend_node

For deactivation of Replicator check in advance that all heads
have open_count == 0. For this presuspend_node is used as all
head nodes are linking this control node.

14 years agoReplicator: support deactivate of replicator-dev nodes
Zdenek Kabelac [Fri, 21 May 2010 12:27:02 +0000 (12:27 +0000)]
Replicator: support deactivate of replicator-dev nodes

Introducing dm_tree_node_set_presuspend_node() for presuspending child
node (i.e. replicator control target) before deactivation of parent node
(i.e. replicator-dev target).

This patch presents no functional change to current dtree - only
replicator target currently sets presuspend node for dev nodes.

14 years agoReplicator: libdm support
Zdenek Kabelac [Fri, 21 May 2010 12:24:15 +0000 (12:24 +0000)]
Replicator: libdm support

Introducing new API calls:
dm_tree_node_add_replicator_target()
dm_tree_node_add_replicator_dev_target().

Define new typedef dm_replicator_mode_t.

14 years agoAPI change for args of process_each_lv_in_vg()
Zdenek Kabelac [Fri, 21 May 2010 12:21:51 +0000 (12:21 +0000)]
API change for args of process_each_lv_in_vg()

Patch adds failed_lvnames to the list of parameters for process_each_lv_in_vg().
If the list is not NULL it will be filled with LV names of failing LVs
during function execution.

Application could later reiterate only on failed LVs.

14 years agoReturn ECMD_FAILED for break in process_each_lv() and process_each_segment_in_lv()
Zdenek Kabelac [Fri, 21 May 2010 12:19:22 +0000 (12:19 +0000)]
Return ECMD_FAILED for break in process_each_lv() and process_each_segment_in_lv()

14 years agopost-release
Alasdair Kergon [Thu, 20 May 2010 23:21:53 +0000 (23:21 +0000)]
post-release

14 years agoFix $(INSTALL_SCRIPT) old-v2_02_66 v2_02_66
Alasdair Kergon [Thu, 20 May 2010 22:54:58 +0000 (22:54 +0000)]
Fix $(INSTALL_SCRIPT)

14 years agobackup->cache
Alasdair Kergon [Thu, 20 May 2010 22:32:44 +0000 (22:32 +0000)]
backup->cache

14 years agopre-release
Alasdair Kergon [Thu, 20 May 2010 22:27:26 +0000 (22:27 +0000)]
pre-release

14 years agoIf unable to obtain snapshot percentage leave value blank on reports.
Alasdair Kergon [Thu, 20 May 2010 22:24:33 +0000 (22:24 +0000)]
If unable to obtain snapshot percentage leave value blank on reports.

14 years agoAdd make install_initscripts
Alasdair Kergon [Thu, 20 May 2010 14:45:14 +0000 (14:45 +0000)]
Add make install_initscripts

14 years agoAdd install_system_dirs makefile target.
Alasdair Kergon [Thu, 20 May 2010 13:47:21 +0000 (13:47 +0000)]
Add install_system_dirs makefile target.
Add configure options for system and locking directories.

14 years agoGenerate example.conf so default lvm.conf contents can be configured.
Alasdair Kergon [Thu, 20 May 2010 11:45:56 +0000 (11:45 +0000)]
Generate example.conf so default lvm.conf contents can be configured.

14 years agoInstall lvmconf script by default.
Alasdair Kergon [Thu, 20 May 2010 11:20:35 +0000 (11:20 +0000)]
Install lvmconf script by default.
Remove unnecessary versioned dmeventd plugin symlinks.

14 years agoRemove another pvchange hack involving orphan VG names.
Dave Wysochanski [Wed, 19 May 2010 15:34:10 +0000 (15:34 +0000)]
Remove another pvchange hack involving orphan VG names.

Unnecessary as a result of recent changes.

14 years agoRemove hack in pvchange to unlock orphan VG.
Dave Wysochanski [Wed, 19 May 2010 13:21:09 +0000 (13:21 +0000)]
Remove hack in pvchange to unlock orphan VG.

With agk's recent changes, the lock/unlock APIs can properly handle
orphan VG names.

14 years agoFix warnings with conversion of uuid.
Dave Wysochanski [Wed, 19 May 2010 12:12:47 +0000 (12:12 +0000)]
Fix warnings with conversion of uuid.

More cleanup of uuid casting / structures is needed but for now just
cast like the rest of the code.

14 years agoUpdate WHATS_NEW
Dave Wysochanski [Wed, 19 May 2010 11:57:05 +0000 (11:57 +0000)]
Update WHATS_NEW

14 years agoTest lvm_vgname_from_{pvid|device}.
Dave Wysochanski [Wed, 19 May 2010 11:53:30 +0000 (11:53 +0000)]
Test lvm_vgname_from_{pvid|device}.

14 years agoAdd lvm2app interfaces to lookup a vgname from a pvid and pvname.
Dave Wysochanski [Wed, 19 May 2010 11:53:12 +0000 (11:53 +0000)]
Add lvm2app interfaces to lookup a vgname from a pvid and pvname.

lvm2app forces applications to start with a volume group name,
open the volume group, then operate on individual pvs.  In some
cases the application may want to start with a device name rather
than the volume group name.  Today, if an application wants to
do this, it must iterate through all the volume groups to find
the volume group that the specific device is attached to.
These new interfaces allow the application to avoid such overhead.
Bump the lvm2app version number to 3.

14 years agoUpdate pvchange to always obtain a vg handle for each pv to process.
Dave Wysochanski [Wed, 19 May 2010 11:53:00 +0000 (11:53 +0000)]
Update pvchange to always obtain a vg handle for each pv to process.

Earlier patches added some infrastructure to lookup a vgname from
a pvname.  We now can cleanup some of the pvchange and other code
by requiring callers that want to modify some pv property:
1) lookup the vgname by the pvname
2) use the vgname to obtain a vg handle
3) get the pv handle from the vg handle

This should work going forward and be a much cleaner interface,
as we move away from pvs as standalone objects.

14 years agoAdd find_vgname_from_{pvname|pvid} functions.
Dave Wysochanski [Wed, 19 May 2010 11:52:37 +0000 (11:52 +0000)]
Add find_vgname_from_{pvname|pvid} functions.

Some commands start with a pvname, but we'd like to force users to
start with a vg handle to obtain a pv handle.  Our best option seems
to be providing a way to look up the vgname from the pvname, and then
require them to use vg_read/vg_open.

In addition to the pvname lookup function, this patch also provides a
lookup by pvid.  The lookup by pvid can be used in conjunction with
lvmcache_get_pvids to process all pvs in the system.

The pvid find function first calls lvmcache_vgname_from_pvid, which may
cause the label to be read if it is not in the cache.  If the vgname is
returned is an orphan, we then check to see if there are metadata areas,
and if not, we scan every PV on the system by calling scan_vgs_for_pvs().
In most cases we should not need to do this, and by using the info->mdas
count, we avoid calling pv_read() as prior code did.  So this patch is a
bit cleaner and should allow us to refactor more of the pv code.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoAdd lvmcache_vgname_from_pvid().
Dave Wysochanski [Wed, 19 May 2010 11:52:21 +0000 (11:52 +0000)]
Add lvmcache_vgname_from_pvid().

Add lvmcache function to lookup a vgname from a pvid.

14 years agoAdd pvid_from_devname() lvmcache function.
Dave Wysochanski [Wed, 19 May 2010 11:52:07 +0000 (11:52 +0000)]
Add pvid_from_devname() lvmcache function.

Add supporting function for mappings from devname -> pvid -> vgname.

14 years agoAdd is_global_vg and split out from is_orphan_vg.
Alasdair Kergon [Wed, 19 May 2010 02:36:33 +0000 (02:36 +0000)]
Add is_global_vg and split out from is_orphan_vg.

14 years agoValidate orphan and VG_GLOBAL lock order too.
Alasdair Kergon [Wed, 19 May 2010 02:08:50 +0000 (02:08 +0000)]
Validate orphan and VG_GLOBAL lock order too.

14 years agoNote that orphan lock is always obtained last
Alasdair Kergon [Wed, 19 May 2010 01:49:08 +0000 (01:49 +0000)]
Note that orphan lock is always obtained last

14 years agoAccept orphan VG names as parameters to lock_vol() and related functions.
Alasdair Kergon [Wed, 19 May 2010 01:16:40 +0000 (01:16 +0000)]
Accept orphan VG names as parameters to lock_vol() and related functions.

14 years agoUse is_orphan_vg in place of hard-coded prefix tests.
Alasdair Kergon [Wed, 19 May 2010 00:52:55 +0000 (00:52 +0000)]
Use is_orphan_vg in place of hard-coded prefix tests.

14 years agopost-release
Alasdair Kergon [Mon, 17 May 2010 20:18:13 +0000 (20:18 +0000)]
post-release

14 years agopre-release v2_02_65
Alasdair Kergon [Mon, 17 May 2010 18:39:01 +0000 (18:39 +0000)]
pre-release

14 years agoFix clvmd init script stop function to not deactive non-clustered volume groups.
Fabio M. Di Nitto [Mon, 17 May 2010 03:18:27 +0000 (03:18 +0000)]
Fix clvmd init script stop function to not deactive non-clustered volume groups.

https://bugzilla.redhat.com/show_bug.cgi?id=592362

14 years agoDisallow toggling the cluster attribute of a volume group if there
Jonathan Earl Brassow [Fri, 14 May 2010 15:19:42 +0000 (15:19 +0000)]
Disallow toggling the cluster attribute of a volume group if there
are active mirrors or snapshots.

We don't have the mechanisms in place to change the device-mapper
tables for those targets that have behavioral differences between
cluster and single machine instances.  Allowing users to change
the attribute but not changing the target's behavior can lead to
data corruption.

The following bugs are fixed/avoided by this patch:
235123 - vgchange -c [ny] do not change target types when necessary
289331 - RFE: switching from cluster domain to local domain needs to deactivate volume somehow
289541 - when changing from local to cluster, volumes can not appear to be deactivated

14 years agoUse -d to control level of messages sent to syslog by dmeventd.
Alasdair Kergon [Fri, 14 May 2010 14:56:39 +0000 (14:56 +0000)]
Use -d to control level of messages sent to syslog by dmeventd.
Change -d to -f to run dmeventd in foreground.
(mornfall)

14 years agoFix static build.
Alasdair Kergon [Fri, 14 May 2010 13:36:56 +0000 (13:36 +0000)]
Fix static build.

14 years agoFor lcov target there is no need to include source file dependencies
Zdenek Kabelac [Fri, 14 May 2010 13:32:36 +0000 (13:32 +0000)]
For lcov target there is no need to include source file dependencies

14 years agoAnother one internal device layer fix...
Milan Broz [Fri, 14 May 2010 12:39:52 +0000 (12:39 +0000)]
Another one internal device layer fix...

14 years agoFix empty layer detection is scan devices.
Milan Broz [Fri, 14 May 2010 12:30:43 +0000 (12:30 +0000)]
Fix empty layer detection is scan devices.

14 years agoFix device_is_usable to properly detect only internal LV names.
Milan Broz [Fri, 14 May 2010 12:03:32 +0000 (12:03 +0000)]
Fix device_is_usable to properly detect only internal LV names.

14 years agoUse /bin/bash for scripts with bashisms
Zdenek Kabelac [Fri, 14 May 2010 11:33:20 +0000 (11:33 +0000)]
Use /bin/bash for scripts with bashisms

14 years agoSkip also special lvm devices in scan (if ignore suspended is used).
Milan Broz [Thu, 13 May 2010 18:38:38 +0000 (18:38 +0000)]
Skip also special lvm devices in scan (if ignore suspended is used).

This should avoid various races between dmeventd on multiple nodes
in cluster where one node already repairing device and another
run full scan and locks the device.

14 years agoDo not print encryption key in message debug output.
Milan Broz [Thu, 13 May 2010 13:31:30 +0000 (13:31 +0000)]
Do not print encryption key in message debug output.

14 years agoCurrently if clvmd is running and user issues vgscan,
Milan Broz [Thu, 13 May 2010 13:04:03 +0000 (13:04 +0000)]
Currently if clvmd is running and user issues vgscan,
the device cache file is dumped both in vgscan and clvmd process.

Unfortunately, clvmd calls lvmcache_label_scan,
it properly destroys persistent filter, but during
persistent_filter_dump it merges old cache content back!

This causes that change in filters is not properly propagated
into device cache after vgscan on cluster.
(Only new devices are added.)

https://bugzilla.redhat.com/show_bug.cgi?id=591861

14 years agoChop up the big t-lvconvert-mirror-basic loop across 4 separate test scripts
Petr Rockai [Wed, 12 May 2010 13:15:38 +0000 (13:15 +0000)]
Chop up the big t-lvconvert-mirror-basic loop across 4 separate test scripts
(and use sourcing to avoid code duplication).

14 years agoRun tests in alphabetical (and thus stable across machines) order.
Petr Rockai [Wed, 12 May 2010 11:59:46 +0000 (11:59 +0000)]
Run tests in alphabetical (and thus stable across machines) order.

14 years agoBump the debug.log level from 4 to 9 (the numbering is different from verbose).
Petr Rockai [Wed, 12 May 2010 11:58:51 +0000 (11:58 +0000)]
Bump the debug.log level from 4 to 9 (the numbering is different from verbose).

14 years agoRevert the "repeat failed tests with -vvvv" feature. Instead, dump debug logs
Petr Rockai [Wed, 12 May 2010 11:23:16 +0000 (11:23 +0000)]
Revert the "repeat failed tests with -vvvv" feature. Instead, dump debug logs
to a file using log/file, with log/overwrite set and dump this file in
STACKTRACE. The overall effect is that only the command that ran last before
the failure has been triggered will get its debug output logged. This is
similar to how we treat coredumps.

14 years agoA fairly extensive refactor of the mirror testing code. The exhaustive
Petr Rockai [Wed, 12 May 2010 10:08:35 +0000 (10:08 +0000)]
A fairly extensive refactor of the mirror testing code. The exhaustive
lvconvert testing is now in its own test, t-lvconvert-mirror-basic ... it
doesn't do anything fancy but it does run lvconvert through a lot of
combinations.

I have also merged the remaining t-mirror-lvconvert tests into
t-lvconvert-mirror and abolished the former. The latter will be split again
later into more thematic divisions. (The previous split was rather arbitrary,
may I even say random...)

14 years agoRevert the huge device creation in t-lvconvert-mirror and downgrade the
Petr Rockai [Wed, 12 May 2010 06:09:22 +0000 (06:09 +0000)]
Revert the huge device creation in t-lvconvert-mirror and downgrade the
race-induced failure to a warning, until we have a better fix for this.

14 years agoAdd a test for activation in presence of missing devices. This partially covers
Petr Rockai [Wed, 12 May 2010 06:02:28 +0000 (06:02 +0000)]
Add a test for activation in presence of missing devices. This partially covers
the robustness requirements for system startup that we have.

14 years agoRename t-partial-activate to t-activate-partial (more activation tests coming).
Petr Rockai [Wed, 12 May 2010 05:59:24 +0000 (05:59 +0000)]
Rename t-partial-activate to t-activate-partial (more activation tests coming).

14 years agoThe "should" testing utility should actually only give a warning when the
Petr Rockai [Wed, 12 May 2010 05:55:42 +0000 (05:55 +0000)]
The "should" testing utility should actually only give a warning when the
command fails.

14 years agoImprove the "check" testing utility: slightly refactor and provide
Petr Rockai [Wed, 12 May 2010 05:55:08 +0000 (05:55 +0000)]
Improve the "check" testing utility: slightly refactor and provide
active/inactive checks.

14 years agoIf we are checking if '--nosync' was called with the mirror argument,
Jonathan Earl Brassow [Tue, 11 May 2010 21:40:11 +0000 (21:40 +0000)]
If we are checking if '--nosync' was called with the mirror argument,
then let's also check if '--mirrorlog' was called with the mirror
argument.

14 years agoAdd pkgconfigdir for placement of .pc files
Zdenek Kabelac [Tue, 11 May 2010 08:57:02 +0000 (08:57 +0000)]
Add pkgconfigdir for placement of .pc files

Use easily overideable make install pkgconfigdir variable.

14 years agoSwitch to use Requires.private for devmapper.pc and lvm2app.pc
Zdenek Kabelac [Tue, 11 May 2010 08:54:11 +0000 (08:54 +0000)]
Switch to use Requires.private for devmapper.pc and lvm2app.pc

Use Requires.private: instead of Libs.private:
Use UDEV_PC and SELINUX_PC for Require.private:

It looks like usage of Requires.private is prefered from Libs.private.
However pkg-config documentation is really poor here. But here is
short outcome:

There is a difference in Libs.private: and Requires.private: where
we specify libselinux instead of  -lselinux -lsepol.

We leave resolving of query like 'pkg-config --libs --static devmapper'
on taking proper selinux and udev libs to their .pc files instead of
hardcoding them into our .pc file which is might give incorrect answer.
- i.e. dependency of libselinux package might change and we may return
wrong list of linked libraries.

http://bugs.freedesktop.org/show_bug.cgi?id=4738
http://err.no/personal/blog/tech/2008-03-25-18-07_pkg-config,_sonames_and_Requires.private

14 years agoAdd UDEV_PC and SELINUX_PC substituted variables
Zdenek Kabelac [Tue, 11 May 2010 08:48:43 +0000 (08:48 +0000)]
Add UDEV_PC and SELINUX_PC substituted variables

14 years agoUse Require.private: field for devmapper-event.pc
Zdenek Kabelac [Tue, 11 May 2010 08:47:02 +0000 (08:47 +0000)]
Use Require.private: field for devmapper-event.pc

Move devmapper to Require.private: field and remove unneeded libs
from Libs.private: as they are dependencies of devmapper library.

14 years agoSkip unneeded 'cat' command execution.
Zdenek Kabelac [Tue, 11 May 2010 08:43:18 +0000 (08:43 +0000)]
Skip unneeded 'cat' command execution.

14 years agoPlugins do not use pthread or lvm2cmd directly.
Zdenek Kabelac [Tue, 11 May 2010 08:41:58 +0000 (08:41 +0000)]
Plugins do not use pthread or lvm2cmd directly.

Plugins are using pthread and lvm2cmd libraries indirectly
through devmapper-event-lvm2, so link only with libraries used by them.

14 years agoLink libdevmapper-event.so with libdevmapper.so.
Zdenek Kabelac [Tue, 11 May 2010 08:38:10 +0000 (08:38 +0000)]
Link libdevmapper-event.so with libdevmapper.so.
For now using $(LIBS) for a list of linked libraries to $(LIB_SHARED) library.

14 years agoLink liblvm2cmd.so with devmapper-event and devmapper libs.
Zdenek Kabelac [Tue, 11 May 2010 08:34:38 +0000 (08:34 +0000)]
Link liblvm2cmd.so with devmapper-event and devmapper libs.
and remove generic %.so: %.a target.

14 years agoHeaderfile <pthread.h> is no longer needed here
Zdenek Kabelac [Tue, 11 May 2010 08:32:22 +0000 (08:32 +0000)]
Headerfile <pthread.h> is no longer needed here

14 years agoFix truncated total size displayed by pvscan.
Alasdair Kergon [Fri, 7 May 2010 15:24:17 +0000 (15:24 +0000)]
Fix truncated total size displayed by pvscan.

14 years agoAdd a basic test for dmeventd triggering lvconvert --repair. Needs improvement.
Petr Rockai [Thu, 6 May 2010 19:01:26 +0000 (19:01 +0000)]
Add a basic test for dmeventd triggering lvconvert --repair. Needs improvement.

14 years agoAdd some basic provisions for automated testing of dmeventd.
Petr Rockai [Thu, 6 May 2010 18:54:51 +0000 (18:54 +0000)]
Add some basic provisions for automated testing of dmeventd.

14 years agoAdd new --sysinit option for vgchange and lvchange.
Peter Rajnoha [Thu, 6 May 2010 11:15:55 +0000 (11:15 +0000)]
Add new --sysinit option for vgchange and lvchange.

A shortcut for --ignorelockingfailure, --ignoremonitoring, --poll n options
and LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES environment variable used all at
once in initialisation scripts (e.g. rc.sysinit or initrd).

14 years agoAdd dm_list_splice() to join two lists.
Zdenek Kabelac [Thu, 6 May 2010 10:10:15 +0000 (10:10 +0000)]
Add dm_list_splice() to join two lists.

14 years agoInstall plugins to subdirs
Zdenek Kabelac [Thu, 6 May 2010 10:07:46 +0000 (10:07 +0000)]
Install plugins to subdirs

Target install_dm_plugin installs files to libdir/device-mapper.
Target install_lvm2_plugin installs files to libdir/lvm2.

Both targets creates relative links to libdir to keep the code
compatible with current dlopen handling.

Once we will be able to read plugins from subdir, links
could be removed.

14 years agoWhat's new.
Petr Rockai [Wed, 5 May 2010 22:38:31 +0000 (22:38 +0000)]
What's new.

14 years agoSuppress duplicate error messages about read failures and missing devices.
Petr Rockai [Wed, 5 May 2010 22:37:52 +0000 (22:37 +0000)]
Suppress duplicate error messages about read failures and missing devices.

14 years agoSpecify exactly which ioctl doesn't have a cookie set (for better debugging).
Peter Rajnoha [Mon, 3 May 2010 22:08:38 +0000 (22:08 +0000)]
Specify exactly which ioctl doesn't have a cookie set (for better debugging).

14 years agoSynchronize "remove" dm task while reverting unsuccessful "create" dm task
Peter Rajnoha [Mon, 3 May 2010 21:06:53 +0000 (21:06 +0000)]
Synchronize "remove" dm task while reverting unsuccessful "create" dm task
(with table provided).

This remove ioctl generates udev events like any other hence it needs to be
synchronized properly as well. Also, add dm task type in debug log when
setting a cookie (for better debugging).

14 years agopost-release
Alasdair Kergon [Fri, 30 Apr 2010 15:48:38 +0000 (15:48 +0000)]
post-release

14 years agotypo old-v2_02_64 v2_02_64
Alasdair Kergon [Fri, 30 Apr 2010 14:51:58 +0000 (14:51 +0000)]
typo

14 years agopre-release
Alasdair Kergon [Fri, 30 Apr 2010 14:49:42 +0000 (14:49 +0000)]
pre-release

14 years agoAdd a "should" alongside "not" to the test utilities. When a "should" command
Petr Rockai [Fri, 30 Apr 2010 14:33:39 +0000 (14:33 +0000)]
Add a "should" alongside "not" to the test utilities. When a "should" command
fails, the test will carry on but will issue a warning. The harness detects
such warnings from tests and marks tests that passed with warnings with a
special status.

14 years agochange awk path
Alasdair Kergon [Fri, 30 Apr 2010 13:58:08 +0000 (13:58 +0000)]
change awk path

14 years agoAnd be consistent with return code as well (previous commit).
Peter Rajnoha [Fri, 30 Apr 2010 13:47:11 +0000 (13:47 +0000)]
And be consistent with return code as well (previous commit).

14 years agoDon't run any complex initialisation for the "version" lvm2 command.
Peter Rajnoha [Fri, 30 Apr 2010 13:28:44 +0000 (13:28 +0000)]
Don't run any complex initialisation for the "version" lvm2 command.

We can use it even in read-only environment where a try to initialise
file-based locking fails (not to mention other processing related with
lvm2 init). Simply, we want to output the version only, nothing else.
And this should always work.

14 years agoInitialise _vginfos list staticaly so there is no problem with using uninitialised
Zdenek Kabelac [Fri, 30 Apr 2010 12:54:31 +0000 (12:54 +0000)]
Initialise _vginfos list staticaly so there is no problem with using uninitialised
variables in case, lvmcache_destory() is called without lvmcache_init().

14 years agoRelease pools for regex if there is error during processing
Zdenek Kabelac [Fri, 30 Apr 2010 12:37:04 +0000 (12:37 +0000)]
Release pools for regex if there is error during processing
(fixes error messages about unreleased pools).

14 years agoShow string with invalid pattern
Zdenek Kabelac [Fri, 30 Apr 2010 12:31:32 +0000 (12:31 +0000)]
Show string with invalid pattern
and start error message with capital letter.

14 years ago.
Alasdair Kergon [Thu, 29 Apr 2010 01:48:19 +0000 (01:48 +0000)]
.

14 years ago.
Alasdair Kergon [Thu, 29 Apr 2010 01:45:30 +0000 (01:45 +0000)]
.

14 years agoRemove no-longer-used arg_ptr_value.
Alasdair Kergon [Thu, 29 Apr 2010 01:38:12 +0000 (01:38 +0000)]
Remove no-longer-used arg_ptr_value.
Fix -M and --type to use strings not pointers that change on config refresh.

14 years agoTest all combinations of mirror conversion, both while the LV
Jonathan Earl Brassow [Wed, 28 Apr 2010 17:46:34 +0000 (17:46 +0000)]
Test all combinations of mirror conversion, both while the LV
is active and while it is in-active.

+for i in $(seq 0 4); do
+       for j in $(seq 0 4); do
+               for k in core disk mirrored; do
+                       for l in core disk mirrored; do

The testing code still needs some improvement.  I'd like to add
the ability to test specifying the PVs to be added/removed during
a convert.  It will also be important to test partial PV
specification during down converts (i.e. request to remove more
mirror images than we have provided PVs for).

14 years agoDon't attempt to convert the log type of an LV if the LV
Jonathan Earl Brassow [Wed, 28 Apr 2010 17:41:30 +0000 (17:41 +0000)]
Don't attempt to convert the log type of an LV if the LV
is not a mirror.

14 years agoAdd support for new IMPORT{db} udev rule.
Peter Rajnoha [Wed, 28 Apr 2010 13:37:36 +0000 (13:37 +0000)]
Add support for new IMPORT{db} udev rule.

This rule appeared in udev v152 and it helps us to support spurious events
where we didn't have any flags set (events originated in udevadm trigger
or the watch rule). These flags are important to direct the rule application.
Now, with the help of this rule, we can regenerate old udev db content.
To implement this correctly, we need to flag all proper DM udev events with
DM_UDEV_PRIMARY_SOURCE_FLAG. That happens automatically for all ioctls
generating events originated in libdevmapper.

14 years agoSmall indent change
Zdenek Kabelac [Wed, 28 Apr 2010 12:23:11 +0000 (12:23 +0000)]
Small indent change

14 years agoFix comment from last commit. Additionally, there is no need
Jonathan Earl Brassow [Tue, 27 Apr 2010 15:26:58 +0000 (15:26 +0000)]
Fix comment from last commit.  Additionally, there is no need
to put a comment into the WHATS_NEW file if it is a regression
that was created and fixed inside the same release window.

14 years agoPatch to fix bug 586021 and mantain historical behavior of
Jonathan Earl Brassow [Tue, 27 Apr 2010 14:57:49 +0000 (14:57 +0000)]
Patch to fix bug 586021 and mantain historical behavior of
being able to remove more images from a mirror than the
number of PVs directly specified for removal.

The effort to fix bug 581611 corrected a bug that was unnoticed
at the time.  The loop in _remove_mirror_images that looks over
the specified PVs was allowing devices that were previously
counted and moved to the end of the list to be double-counted.
This resulted in the number of devices needed for removal always
being satisfied - even if the user did not specify enough PVs
for removal to satisfy the request.  When 581611 was fixed, this
double-counting no longer took place and the result was to remove
only the minimum of the number of PVs specified or the number
that was asked to be removed.

By simply always setting 'new_area_count' (as used to be done
only in the else statement), we return to the previous behavior.
Indeed, this is exactly what the double-counting was allowing
to happen before the fix of 581611.

14 years agoMention how to get PV to LV mappings.
Alasdair Kergon [Tue, 27 Apr 2010 13:34:56 +0000 (13:34 +0000)]
Mention how to get PV to LV mappings.

14 years agoFix lvconvert error message when existing mirrored LV is not found.
Alasdair Kergon [Mon, 26 Apr 2010 18:31:58 +0000 (18:31 +0000)]
Fix lvconvert error message when existing mirrored LV is not found.

14 years agoadd comments
Alasdair Kergon [Mon, 26 Apr 2010 18:12:40 +0000 (18:12 +0000)]
add comments

This page took 0.171575 seconds and 5 git commands to generate.