1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/test/shell
Jonathan Brassow ff64e3500f RAID: Add scrubbing support for RAID LVs
New options to 'lvchange' allow users to scrub their RAID LVs.
Synopsis:
	lvchange --syncaction {check|repair} vg/raid_lv

RAID scrubbing is the process of reading all the data and parity blocks in
an array and checking to see whether they are coherent.  'lvchange' can
now initaite the two scrubbing operations: "check" and "repair".  "check"
will go over the array and recored the number of discrepancies but not
repair them.  "repair" will correct the discrepancies as it finds them.

'lvchange --syncaction repair vg/raid_lv' is not to be confused with
'lvconvert --repair vg/raid_lv'.  The former initiates a background
synchronization operation on the array, while the latter is designed to
repair/replace failed devices in a mirror or RAID logical volume.

Additional reporting has been added for 'lvs' to support the new
operations.  Two new printable fields (which are not printed by
default) have been added: "syncaction" and "mismatches".  These
can be accessed using the '-o' option to 'lvs', like:
	lvs -o +syncaction,mismatches vg/lv
"syncaction" will print the current synchronization operation that the
RAID volume is performing.  It can be one of the following:
        - idle:   All sync operations complete (doing nothing)
        - resync: Initializing an array or recovering after a machine failure
        - recover: Replacing a device in the array
        - check: Looking for array inconsistencies
        - repair: Looking for and repairing inconsistencies
The "mismatches" field with print the number of descrepancies found during
a check or repair operation.

The 'Cpy%Sync' field already available to 'lvs' will print the progress
of any of the above syncactions, including check and repair.

Finally, the lv_attr field has changed to accomadate the scrubbing operations
as well.  The role of the 'p'artial character in the lv_attr report field
as expanded.  "Partial" is really an indicator for the health of a
logical volume and it makes sense to extend this include other health
indicators as well, specifically:
        'm'ismatches:  Indicates that there are discrepancies in a RAID
                       LV.  This character is shown after a scrubbing
                       operation has detected that portions of the RAID
                       are not coherent.
        'r'efresh   :  Indicates that a device in a RAID array has suffered
                       a failure and the kernel regards it as failed -
                       even though LVM can read the device label and
                       considers the device to be ok.  The LV should be
                       'r'efreshed to notify the kernel that the device is
                       now available, or the device should be 'r'eplaced
                       if it is suspected of failing.
2013-04-11 15:33:59 -05:00
..
000-basic.sh Update tests 2012-03-16 13:00:05 +00:00
activate-minor.sh Relax the active-minor test a bit. 2012-03-16 11:36:51 +00:00
activate-missing-segment.sh Partial activation working, expect success in tests. 2012-05-17 12:03:30 +00:00
activate-missing.sh Update tests 2012-03-16 13:00:05 +00:00
activate-partial.sh Update tests 2012-03-16 13:00:05 +00:00
clvmd-restart.sh Tidy the shell tests into their own subdir. We now have: 2011-11-21 00:15:42 +00:00
covercmd.sh test: resync is for mirror devices 2012-10-15 14:31:41 +02:00
discards-thin.sh thin: fix forbidden discards checks 2013-02-05 14:38:16 +01:00
dmeventd-restart.sh Sleep longer in the test so it really dies properly 2012-03-20 13:35:46 +00:00
dumpconfig.sh Add comment about slow startup of dmeventd 2012-03-16 19:13:09 +00:00
fsadm.sh Update tests 2012-03-16 13:00:05 +00:00
inconsistent-metadata.sh TEST: Workaround for lvmetad vs inconsistent metadata. 2012-09-26 17:26:23 +02:00
listings.sh Update tests 2012-03-16 13:00:05 +00:00
lock-blocking.sh Update tests 2012-03-16 13:00:05 +00:00
lvchange-mirror.sh Update tests 2012-03-16 13:00:05 +00:00
lvchange-partial.sh Test (RAID): Test for RAID10 activations when devices are missing 2013-01-28 12:32:33 -06:00
lvchange-raid.sh RAID: Add scrubbing support for RAID LVs 2013-04-11 15:33:59 -05:00
lvconvert-mirror-basic-0.sh Update tests 2012-03-16 13:00:05 +00:00
lvconvert-mirror-basic-1.sh Update tests 2012-03-16 13:00:05 +00:00
lvconvert-mirror-basic-2.sh Update tests 2012-03-16 13:00:05 +00:00
lvconvert-mirror-basic-3.sh Update tests 2012-03-16 13:00:05 +00:00
lvconvert-mirror-basic.sh Update tests 2012-03-16 13:00:05 +00:00
lvconvert-mirror.sh mirror: 'lvconvert --resync' should reset LV_NOTSYNCED on corelog mirror 2012-09-19 11:16:45 -05:00
lvconvert-raid10.sh test: split raid tests 2012-10-09 12:22:26 +02:00
lvconvert-raid.sh TEST: Re-add testing of lvconvert-raid for kernels < 3.2 2012-10-15 15:43:15 -05:00
lvconvert-repair-dmeventd.sh Update tests 2012-03-16 13:00:05 +00:00
lvconvert-repair-policy.sh Update tests 2012-03-16 13:00:05 +00:00
lvconvert-repair-replace.sh Update tests 2012-03-16 13:00:05 +00:00
lvconvert-repair-snapshot.sh Re-enable tests for snapshots of mirrors. 2012-05-17 08:04:11 +00:00
lvconvert-repair-transient-dmeventd.sh Update tests 2012-03-16 13:00:05 +00:00
lvconvert-repair-transient.sh Update tests 2012-03-16 13:00:05 +00:00
lvconvert-repair.sh TEST: Conditionalize RAID tests on whether the dm-raid module exists 2012-07-25 09:43:28 -05:00
lvconvert-thin-external.sh tests: lvconvert external origin 2013-04-02 15:17:31 +02:00
lvconvert-thin.sh tests: update thin testing 2012-11-27 14:10:46 +01:00
lvconvert-twostep.sh Update tests 2012-03-16 13:00:05 +00:00
lvcreate-large-raid10.sh test: move raid test to separate tests 2012-10-08 14:49:21 +02:00
lvcreate-large-raid.sh test: move raid test to separate tests 2012-10-08 14:49:21 +02:00
lvcreate-large.sh test: move raid test to separate tests 2012-10-08 14:49:21 +02:00
lvcreate-mirror.sh Update tests 2012-03-16 13:00:05 +00:00
lvcreate-missing.sh lvmetad: Mark PVs visible to lvmetad but not to us as MISSING. 2013-04-03 11:40:29 +02:00
lvcreate-operation.sh Improve test suite 2012-03-28 11:10:08 +00:00
lvcreate-pvtags.sh Update tests 2012-03-16 13:00:05 +00:00
lvcreate-raid10.sh test: move raid10 test into separate test files 2012-10-09 16:38:12 +02:00
lvcreate-raid.sh test: move raid10 test into separate test files 2012-10-09 16:38:12 +02:00
lvcreate-repair.sh Improve test suite 2012-03-28 11:10:08 +00:00
lvcreate-small-snap.sh Update tests 2012-03-16 13:00:05 +00:00
lvcreate-striped-mirror.sh Tidy the shell tests into their own subdir. We now have: 2011-11-21 00:15:42 +00:00
lvcreate-thin-external.sh tests: lvconvert external origin 2013-04-02 15:17:31 +02:00
lvcreate-thin-power2.sh test: update thin discards testing 2012-12-11 12:05:48 +01:00
lvcreate-thin-snap.sh test: drop clustered flag control from thin tests 2012-10-10 21:22:12 +02:00
lvcreate-thin.sh test: coverage 2012-10-14 23:14:48 +02:00
lvcreate-usage.sh lv_manip: fix regresion from bf2741376d 2012-11-21 12:15:09 +01:00
lvextend-percent-extents.sh Update tests 2012-03-16 13:00:05 +00:00
lvextend-snapshot-dmeventd.sh test: snapshot_extend_threshold -> snapshot_autoextend_threshold 2012-08-27 14:04:21 +02:00
lvextend-snapshot-policy.sh test: snapshot_extend_threshold -> snapshot_autoextend_threshold 2012-08-27 14:04:21 +02:00
lvm-init.sh Update tests 2012-03-16 13:00:05 +00:00
lvmcache-exercise.sh Update tests 2012-03-16 13:00:05 +00:00
lvmetad-disabled.sh lvmetad: Warn if lvmetad is running but disabled. 2012-10-10 13:54:29 +02:00
lvmetad-dump.sh test: Add lvmetad-dump.sh. 2012-10-11 20:32:25 +02:00
lvmetad-lvm1.sh pvscan --cache: Also read metadata from LVM1 PVs (BZ 863401). 2012-10-10 21:55:24 +02:00
lvmetad-no-cluster.sh lvmetad: Disable and warn when locking_type is 3. 2012-10-25 14:31:08 +02:00
lvmetad-override.sh test: Check that overriding use_lvmetad with --config works. 2012-10-30 09:16:15 +01:00
lvmetad-pvs.sh Update tests 2012-03-16 13:00:05 +00:00
lvmetad-pvscan-cache.sh TEST: Only run the pvscan --cache test with lvmetad active. 2012-10-08 07:23:13 +02:00
lvmetad-pvscan-nomda.sh lvmetad: Fix autoactivation for MDA-less PVs. 2012-12-12 13:19:04 +01:00
lvmetad-restart.sh test: Check that lvmetad is refreshed correctly on restart. 2012-10-10 13:54:36 +02:00
lvmetad-test.sh TEST: Add lvmetad-test; checks --test with lvmetad. 2012-07-30 11:21:55 +02:00
lvmetad-warning.sh lvmetad: Fix the fix for 813766 (lvmetad connection warning). 2012-10-12 11:22:47 +02:00
lvresize-mirror.sh Update tests 2012-03-16 13:00:05 +00:00
lvresize-raid10.sh test: move raid10 test into separate test files 2012-10-09 16:38:12 +02:00
lvresize-raid.sh test: move raid10 test into separate test files 2012-10-09 16:38:12 +02:00
lvresize-rounding.sh Expect failure if the reduction doesn't really happen 2012-04-24 12:17:49 +00:00
lvresize-usage.sh Update tests 2012-03-16 13:00:05 +00:00
mdata-strings.sh test: update global_filter 2012-10-12 17:59:11 +02:00
metadata-balance.sh Update tests 2012-03-16 13:00:05 +00:00
metadata-dirs.sh Update tests 2012-03-16 13:00:05 +00:00
metadata.sh Update tests 2012-03-16 13:00:05 +00:00
mirror-names.sh Improve test suite 2012-03-28 11:10:08 +00:00
mirror-vgreduce-removemissing.sh Improve test suite 2012-03-28 11:10:08 +00:00
name-mangling.sh Update tests 2012-03-16 13:00:05 +00:00
nomda-missing.sh Update tests 2012-03-16 13:00:05 +00:00
nomda-restoremissing.sh Automatically restore MISSING PVs with no MDAs. 2012-11-25 20:41:56 +01:00
pool-labels.sh Update tests 2012-03-16 13:00:05 +00:00
pv-duplicate.sh Update tests 2012-03-16 13:00:05 +00:00
pv-min-size.sh Update tests 2012-03-16 13:00:05 +00:00
pv-range-overflow.sh Update tests 2012-03-16 13:00:05 +00:00
pvchange-usage.sh Update tests 2012-03-16 13:00:05 +00:00
pvcreate-metadata0.sh Update tests 2012-03-16 13:00:05 +00:00
pvcreate-operation-md.sh Update test for dmevent restart 2012-03-20 10:48:59 +00:00
pvcreate-operation.sh pvcreate: fix leak on error path 2012-10-19 15:32:21 +02:00
pvcreate-usage.sh Update tests 2012-03-16 13:00:05 +00:00
pvmove-basic.sh Improve test suite 2012-03-28 11:10:08 +00:00
pvremove-usage.sh Update tests 2012-03-16 13:00:05 +00:00
read-ahead.sh Update tests 2012-03-16 13:00:05 +00:00
snapshot-autoumount-dmeventd.sh test: speedup a bit 2012-10-14 23:17:33 +02:00
snapshot-lvm1.sh test: update using exclusive activation 2013-02-05 14:39:11 +01:00
snapshot-merge.sh Improve test suite 2012-03-28 11:10:08 +00:00
snapshots-of-mirrors.sh Re-enable tests for snapshots of mirrors. 2012-05-17 08:04:11 +00:00
tags.sh Update tests 2012-03-16 13:00:05 +00:00
test-partition.sh Update tests 2012-03-16 13:00:05 +00:00
thin-autoumount-dmeventd.sh thin: add support to unmount volumes 2012-10-14 23:19:20 +02:00
thin-defaults.sh tests: update thin testing 2012-11-27 14:10:46 +01:00
thin-restore.sh tests: update thin testing 2012-11-27 14:10:46 +01:00
topology-support.sh test: Skip the topology test if setting up scsi_debug fails. 2012-10-11 11:51:04 +02:00
unknown-segment.sh Tidy the shell tests into their own subdir. We now have: 2011-11-21 00:15:42 +00:00
unlost-pv.sh TEST: Workaround for lvmetad vs inconsistent metadata. 2012-09-26 17:26:23 +02:00
vgcfgbackup-usage.sh Update tests 2012-03-16 13:00:05 +00:00
vgchange-maxlv.sh Update tests 2012-03-16 13:00:05 +00:00
vgchange-partial.sh TEST: Add lvchange-partial.sh and vgchange-partial.sh to the test suite 2012-10-10 11:47:04 -05:00
vgchange-sysinit.sh Update tests 2012-03-16 13:00:05 +00:00
vgchange-usage.sh Update tests 2012-03-16 13:00:05 +00:00
vgcreate-usage.sh Update tests 2012-03-16 13:00:05 +00:00
vgextend-restoremissing.sh Update tests 2012-03-16 13:00:05 +00:00
vgextend-usage.sh Update tests 2012-03-16 13:00:05 +00:00
vgimportclone.sh test: Invalidate .cache after vgimportclone. 2013-04-03 22:08:46 +02:00
vgmerge-operation.sh Update tests 2012-03-16 13:00:05 +00:00
vgmerge-usage.sh Update tests 2012-03-16 13:00:05 +00:00
vgreduce-removemissing-snapshot.sh Disallow snapshots of mirror segment types. 2012-05-01 19:21:24 +00:00
vgreduce-usage.sh Update tests 2012-03-16 13:00:05 +00:00
vgrename-usage.sh Update tests 2012-03-16 13:00:05 +00:00
vgsplit-operation.sh Update tests 2012-03-16 13:00:05 +00:00
vgsplit-stacked.sh Update tests 2012-03-16 13:00:05 +00:00
vgsplit-usage.sh Update tests 2012-03-16 13:00:05 +00:00