1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

1770 Commits

Author SHA1 Message Date
Heinz Mauelshagen
bb9789f2b3 test: fix/enhance lvcreate-large-raid*.sh
Multi-step extend to even larger raid10 LV lvcreate-large-raid.sh.

Comment fixes.
2016-08-09 18:16:01 +02:00
Heinz Mauelshagen
48e14390c1 test: fix lvcreate-large-raid.sh
RAID6 LVs may not be created with --nosync or data corruption
may occur in case of device failures.  The underlying MD raid6
personality used to drive the RaidLV performs read-modify-write
updates on stripes and thus relies on properly written parity
(P and Q Syndromes) during initial synchronization.

Once on it, enhance test to create/extend more and
larger RaidLVs and check sync/nosync status.
2016-08-09 17:45:37 +02:00
Heinz Mauelshagen
3d3f62e10a test: add lvconvert-raid-takeover.sh
Commit 76ef2d15d8 introduced
raid0 <-> raid4 takeover and full mirror <-> raid1 support.

Add tests for these conversions.

Tests exposed a kernel semantics change freezing resynchronization
on conversions from raid0[_meta] -> raid4 or adding raid1 legs
because kernel kept the RAID mapped device in 'frozen' state unless
an 'idle' message was sent or the table was reloaded (kernel patch pending).
2016-08-09 14:17:26 +02:00
Alasdair G Kergon
175e0905d5 test: Drop --mirrorlog when not a mirror. 2016-08-08 18:43:54 +01:00
Heinz Mauelshagen
7d6cf12554 lvcreate: reject '--nosync' option for RAID6 LVs
The MD raid6 personality being used to drive lvm raid6 LVs does
read-modify-write updates to any stripes and thus relies on correct
P and Q Syndromes being written during initial synchronization or
it may fail reconstructing proper user data in case of SubLVs failing.

We may not allow the '--nosync' option on
creation of raid6 LVs for that reason.

Update/fix 'man lvcreate' in that regard.

add lvcreate-raid-nosync.sh test script.

- Resolves rhbz1358532
2016-08-08 13:52:35 +02:00
Heinz Mauelshagen
d2c3b23e6d lvchange: Allow device specification when requesting a repair
'lvchange --resync LV' or 'lvchange --syncaction repair LV' request the
RAID layout specific parity blocks in raid4/5/6 to be recreated or the
mirrored blocks to be copied again from the master leg/copy for raid1/10,
thus not allowing a rebuild of a particular PV.

Introduce repeatable option '--[raid]rebuild PV' to allow to request
rebuilds of specific PVs in a RaidLV which are known to contain corrupt
data (e.g. rebuild a raid1 master leg).

Add test lvchange-rebuild-raid.sh to test/shell doing rebuild
variations on raid1/10 and 5; add aux function check_status_chars
to support the new test.

 - Resolves rhbz1064592
2016-08-05 16:01:46 +02:00
Zdenek Kabelac
02ddd48c11 tests: updates for new raid allocation logic
(with backward compatible settings user as well to check old logic
is still available when needed).
2016-07-28 16:37:20 +02:00
Zdenek Kabelac
9ad30b0b38 tests: check we don't warn when converting to thin LV
Tool produced warning for non-zeroing thin-pools.
2016-07-27 16:20:57 +02:00
Zdenek Kabelac
0c3a09f1d7 tests: adapt for new cache-pool zeroing 2016-07-27 16:20:57 +02:00
Peter Rajnoha
f66ae6e80f tests: add pv-ext-update.sh test
Tests automatic update of PV header (its "extension" part) to recent
version.
2016-07-27 12:17:21 +02:00
Zdenek Kabelac
7fc1617819 tests: check thin resize of raid10 2016-07-22 14:41:47 +02:00
Zdenek Kabelac
9d19c1075f tests: enforce flush of cache target
Since now  lvm command no longer is flushing cache target with status
query - enforce it with extra status.
2016-07-19 17:39:46 +02:00
Zdenek Kabelac
d2bb19e883 tests: check fail path on cache creation 2016-07-15 15:49:01 +02:00
Zdenek Kabelac
a57bf37cdb tests: require better cache driver
Version 1.4 can't handle this test without killing itself.
2016-07-15 15:49:01 +02:00
Zdenek Kabelac
0b773eecd9 tests: skip more cache tests for older driver 2016-07-13 21:52:14 +02:00
Zdenek Kabelac
07587c2699 tests: resize of filesystem
Test for https://bugzilla.redhat.com/1354396
2016-07-13 21:52:14 +02:00
Zdenek Kabelac
957480f4b9 tests: remove more test
Try to remove more tests before confusing older driver to death.
2016-07-12 13:20:56 +02:00
Zdenek Kabelac
1891fa8272 tests: cache error message changes too often
Until lvconvert stabilize, avoid testing resulting error message.
2016-07-12 13:20:56 +02:00
Zdenek Kabelac
06a9dab730 tests: skip some tests for older cache driver
Cache target 1.4 on f19 kernel shows error, skipping some tests...
2016-07-11 15:45:28 +02:00
Zdenek Kabelac
6336b5dedf tests: reduce amount of pvcreates
Reduce number of evualted pvcreate commands.
Since 0 is default value used to fill missing params,
and 0 is also 1st. value in array, it's being tested.

Drop unused data_alignment_offset.
2016-07-11 15:29:28 +02:00
Zdenek Kabelac
8756297a8d tests: increase max lines for clvmd
Clvmd is a bit more verbose long time running process so
let it live with more logged lines.

Also fix typo in warn message from last commit.
2016-07-11 14:45:25 +02:00
Zdenek Kabelac
34c55d98ee tests: add LVM_LOG_FILE_MAX_LINES
When logging to epoch files we would like to prevent creating too large
log files otherwise a spining command could fulfill available space
very easily and quickly.

Limit for to 100000 per command.
2016-07-11 12:43:28 +02:00
Zdenek Kabelac
e5d1f3d6c5 tests: using mkfs config file
Use more predictable local config when creating ext4.
2016-07-04 17:41:10 +02:00
Zdenek Kabelac
2063d6bb06 tests: add line for mixing dmeventd with log
TODO: it might be better to log dmeventd messages with test output
just like we do with clvmd - maybe we will switch to this one
instead of extra  DMEVENTD log file in future....
2016-07-04 17:41:09 +02:00
Zdenek Kabelac
b91390c211 tests: add mke2fs.conf
Add config for mkfs to get more predicatable results
when using mkfs across variety of distributions.

In future maybe use this per all tests as default.
For now user has to specify in a test MKE2FS_CONFIG envvar to use it.
2016-07-04 17:40:25 +02:00
Zdenek Kabelac
2981d1e798 tests: try to force remove higher minor first
When force removing thin-pool we loose 'real' access to hidden device,
and if such pool is in suspended state, any thin volume cannot be
dropped. It likely should be also checked by dmsetup, but meanwhile
apply simple logic -  try to force remove first all higher minors first
with assumption we first create thin-pool and then thin volume
and there are usually not being released lower dm numbers to
get the order wrong.
2016-07-04 17:40:24 +02:00
Zdenek Kabelac
b0d8a524a2 tests: test foreign users of thin-pool
Note: dmeventd should not need any notification and automatically
try to resize again when there is some metadata change.
2016-07-01 00:44:49 +02:00
Zdenek Kabelac
458918b319 thin: fix link validation for unused thin-pool
This patch fixes link validation for used thin-pool.
Udev rules correctly creates symlinks only for unused new thin-pool.
Such thin-pool can be used by foreing apps (like Docker) thus
has  /dev/vg/lv link.
However when thin-pool becomes used by thinLV - this link is no
longer exposed to user - but internal verfication missed this
and caused messages like this to be printed upon 'vgchange -ay':

The link /dev/vg/pool should have been created by udev but it was not
found. Falling back to direct link creation.

And same with 'vgchange -an':
The link /dev/vg/pool should have been removed by udev but it is still
present. Falling back to direct link removal.

This patch ensures only unused thin-pool has this link.
2016-07-01 00:44:46 +02:00
David Teigland
2282f53ac7 lvconvert: rework routing of operations
Add new logic to identify each unique operation and route
it to the correct function to perform it.  The functions
that perform the conversions remain unchanged.

This new code checks every allowed combination of LV type
and requested operation, and for each valid combination
calls the function that performs that conversion.

The first stage of option validation which checks for
incompatible combinations of command line options, is done
done before process_each is called.  This is unchanged.
(This new code will allow that first stage validation to
be simplified in a future commit.)

The second stage of checking options against the specific
LV type is done by this new code.  For each valid combination
of operation + LV type, the new code calls an existing
function that implements it.

With this in place, the ad hoc checks for valid combinations
of LV types and operations can be removed from the existing
code in a future commit.

(The #if 0 is used to keep the patch clean, and the
disabled code will be removed by a following patch.)
2016-06-29 16:55:27 -05:00
Tony Asleson
6f216692b4 lvmdbustest: Comment out refresh check for LV create
When we test Vg.LvCreateRaid some of the hidden LVs volume type go from
'I' to 'i' between the time it takes us to create the LV and
the time it takes to call into refresh to verify the service is up to date.
This is a fairly rare occurance.
2016-06-28 13:36:32 -05:00
Zdenek Kabelac
5070e7fcf7 tests: update test for modified output
We now print  vg/lv  for lv resized volume
2016-06-24 00:39:15 +02:00
Zdenek Kabelac
fc174f6b74 tests: smaller number of devs created to fill metadata 2016-06-24 00:39:14 +02:00
Zdenek Kabelac
a67a5d4655 tests: aux prepare_thin_metadata 2016-06-23 14:59:29 +02:00
David Teigland
ebd2758dab vgimportclone: add native command
This is cleaner and more efficient than the script.
The args and usage are unchanged.
2016-06-22 13:13:10 -05:00
Tony Asleson
2d384954ad lvmdbusd: Remove duplicate test code 2016-06-10 16:05:03 -05:00
Tony Asleson
a1febff857 lvmdbusd: Add test for DataLv & MetaDataLv
Added tests which expose an issue found with these properties.
2016-06-10 16:05:03 -05:00
Zdenek Kabelac
a5d65b4a51 tests: check losetup -P is correctly handled
Validate pvcreate will not overwrite partitioned loop device.
2016-06-01 17:37:52 +02:00
Zdenek Kabelac
d73a83e8cf tests: extend prepare_loop
Treat args after size  as 'extra' params for losetup.
2016-06-01 17:37:52 +02:00
Peter Rajnoha
cfe7d2368c tests: add dmstats to CLEAN_TARGETS for make clean 2016-05-31 09:14:23 +02:00
Zdenek Kabelac
7d4d0ff606 tests: check thin is not flushed for status
We finally approach a moment where we generally avoid
flushing thin-pool with every lvs command...
2016-05-27 17:25:52 +02:00
Zdenek Kabelac
43dfc2011c tests: stacked snapshot merge 2016-05-27 15:47:24 +02:00
Zdenek Kabelac
a67adbfe2e tests: check cache_mode change on cachepool 2016-05-27 15:47:24 +02:00
David Teigland
757f7d5508 test: lvmetad-disabled 2016-05-23 12:01:11 -05:00
David Teigland
3d3efd7ab8 test: lvmetad-pvscan-filter
update for pvscan changes
2016-05-23 12:00:25 -05:00
David Teigland
9b640c3684 pvscan: use process_each_vg for autoactivate
This refactors the code for autoactivation.  Previously,
as each PV was found, it would be sent to lvmetad, and
the VG would be autoactivated using a non-standard VG
processing function (the "activation_handler") called via
a function pointer from within the lvmetad notification path.

Now, any scanning that the command needs to do (scanning
only the named device args, or scanning all devices when
there are no args), is done first, before any activation
is attempted.  During the scans, the VG names are saved.
After scanning is complete, process_each_vg is used to do
autoactivation of the saved VG names.  This makes pvscan
activation much more similar to activation done with
vgchange or lvchange.

The separate autoactivate phase also means that if lvmetad
is disabled (either before or during the scan), the command
can continue with the activation step by simply not using
lvmetad and reverting to disk scanning to do the
activation.
2016-05-23 11:57:32 -05:00
Zdenek Kabelac
6247364caf tests: test change of cache mode 2016-05-19 18:40:14 +02:00
Zdenek Kabelac
197066c863 lvchange: allow change of cache mode
Add support for active cache LV.
Handle --cachemode args validation during command line processing.
Rework some lvm2 internal to use lvm2 defined  CACHE_MODE  enums
indepently on libdm defines and use enum around the code instead
of passing and comparing strings.
2016-05-19 18:40:14 +02:00
David Teigland
f3d508630d test: process-each-duplicate-pvs
skip on RHEL5 where DEV_USED_FOR_LV doesn't work
because it depends on a newer bit of sysfs.
2016-05-11 09:35:42 -05:00
David Teigland
fa130722cb test: vgcfgbackup-lvm1
The lvm1 part of vgcfgbackup-usage.
2016-05-06 09:00:00 -05:00
David Teigland
f194d5f169 test: vgcfgbackup-usage
Split the lvm1 part into a separate test.
2016-05-06 09:00:00 -05:00