1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/test/shell
Jonathan Brassow 2e0740f7ef RAID: Add writemostly/writebehind support for RAID1
'lvchange' is used to alter a RAID 1 logical volume's write-mostly and
write-behind characteristics.  The '--writemostly' parameter takes a
PV as an argument with an optional trailing character to specify whether
to set ('y'), unset ('n'), or toggle ('t') the value.  If no trailing
character is given, it will set the flag.
Synopsis:
        lvchange [--writemostly <PV>:{t|y|n}] [--writebehind <count>] vg/lv
Example:
        lvchange --writemostly /dev/sdb1:y --writebehind 512 vg/raid1_lv

The last character in the 'lv_attr' field is used to show whether a device
has the WriteMostly flag set.  It is signified with a 'w'.  If the device
has failed, the 'p'artial flag has priority.

Example ("nosync" raid1 with mismatch_cnt and writemostly):
[~]# lvs -a --segment vg
  LV                VG   Attr      #Str Type   SSize
  raid1             vg   Rwi---r-m    2 raid1  500.00m
  [raid1_rimage_0]  vg   Iwi---r--    1 linear 500.00m
  [raid1_rimage_1]  vg   Iwi---r-w    1 linear 500.00m
  [raid1_rmeta_0]   vg   ewi---r--    1 linear   4.00m
  [raid1_rmeta_1]   vg   ewi---r--    1 linear   4.00m

Example (raid1 with mismatch_cnt, writemostly - but failed drive):
[~]# lvs -a --segment vg
  LV                VG   Attr      #Str Type   SSize
  raid1             vg   rwi---r-p    2 raid1  500.00m
  [raid1_rimage_0]  vg   Iwi---r--    1 linear 500.00m
  [raid1_rimage_1]  vg   Iwi---r-p    1 linear 500.00m
  [raid1_rmeta_0]   vg   ewi---r--    1 linear   4.00m
  [raid1_rmeta_1]   vg   ewi---r-p    1 linear   4.00m

A new reportable field has been added for writebehind as well.  If
write-behind has not been set or the LV is not RAID1, the field will
be blank.
Example (writebehind is set):
[~]# lvs -a -o name,attr,writebehind vg
  LV            Attr      WBehind
  lv            rwi-a-r--     512
  [lv_rimage_0] iwi-aor-w
  [lv_rimage_1] iwi-aor--
  [lv_rmeta_0]  ewi-aor--
  [lv_rmeta_1]  ewi-aor--

Example (writebehind is not set):
[~]# lvs -a -o name,attr,writebehind vg
  LV            Attr      WBehind
  lv            rwi-a-r--
  [lv_rimage_0] iwi-aor-w
  [lv_rimage_1] iwi-aor--
  [lv_rmeta_0]  ewi-aor--
  [lv_rmeta_1]  ewi-aor--
2013-04-15 13:59:46 -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 writemostly/writebehind support for RAID1 2013-04-15 13:59:46 -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