Fix test-utils.h for rhel4 backward compatability.
for losetup, break out of the loop when successful setup of loop device,
and only look at 7 loop devices (default loop module setting)
for blockdev, use old option if new one is not available
prajnoha [Thu, 4 Dec 2008 15:54:26 +0000 (15:54 +0000)]
Added displayable_lvs_in_vg and lv_is_displayable functions to deal with
the counts of visible LVs from user's perspective consistently throughout
the code.
Dave Wysochanski [Mon, 17 Nov 2008 18:20:13 +0000 (18:20 +0000)]
Fix "lvremove -f vgname" when vgname contains snapshots.
Prior to this patch, "lvremove -f vgname" would fail if vgname contained
one or more snapshot LVs. Now this passes, but has a side-effect.
If you issue "lvremove vgname" where vgname contains one or more snaps,
you will get an extra "y/n" prompt to remove the same snapshot.
Example:
$ lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
lvsnap vgtest swi-a- 16.00M lvtest 0.05
lvtest vgtest owi-a- 64.00M
$ lvremove vgtest
Do you really want to remove active logical volume "lvsnap"? [y/n]: n
Logical volume "lvsnap" not removed
Do you really want to remove active logical volume "lvsnap"? [y/n]: n
Logical volume "lvsnap" not removed
Command failed with status code 5.
Fixing this will most likely require modification of the iterator
function, process_each_lvs_in_vg() to iterate over snaps in some
cases (e.g. lvs, vgdisplay -v) but not in others (lvremove).
Petr Rockai [Mon, 10 Nov 2008 12:36:23 +0000 (12:36 +0000)]
Use separate locking directory for each of the tests, as they never share a
volume group, or physical devices for that matter. Hopefully fixes occasional
test errors due to locking failures. Patch by jstava.
Petr Rockai [Fri, 7 Nov 2008 01:30:03 +0000 (01:30 +0000)]
Set LD_LIBRARY_PATH in init.sh, as it is required to run dmsetup now as well,
which otherwise picks up the system version of libdevmapper, which is a pretty
bad idea.
Alasdair Kergon [Thu, 23 Oct 2008 11:21:04 +0000 (11:21 +0000)]
Fix temp table activation in mirror conversions not to happen in other cmds.
Fix temp table in mirror conversions to use always-present error not zero.
Alasdair Kergon [Fri, 17 Oct 2008 10:57:15 +0000 (10:57 +0000)]
Use temp table to set device size when converting mirrors.
(Avoids having same mirror table loaded twice concurrently by first
using a 'zero' table to set the size of the device so when mirror
table is preloaded it doesn't have to be activated immediately.)
Milan Broz [Mon, 13 Oct 2008 12:06:30 +0000 (12:06 +0000)]
Fix snapshot monitoring library to not cancel monitoring invalid snapshot.
snapshot DSO unregistered itself when snapshot changed state to invalid.
This can cause a race (and several timeouts), when for example another snapshot
is added and in the middle of operation (suspend/resume) the monitoring thread
unregister itself.
Fix it by keeping the snapshot monitored after invalidation - just reset
threshold to not really print any messages to syslog.
Petr Rockai [Mon, 6 Oct 2008 16:55:30 +0000 (16:55 +0000)]
Add a workaround for missing `losetup -s` by jstava, and a print a stacktrace
on errors (also by jstava). Currently requires bash, a fix for that may come
later -- explicitly using bash to run tests in the meantime.
Petr Rockai [Tue, 30 Sep 2008 21:43:16 +0000 (21:43 +0000)]
Improve harness.sh output: also mention failing test's name near the end of its
output. Avoids the need to scroll back just to see which failing test you are
looking at.