mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
2e0740f7ef
'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-- |
||
---|---|---|
.. | ||
blkdeactivate.8.in | ||
clvmd.8.in | ||
cmirrord.8.in | ||
dmeventd.8.in | ||
dmsetup.8.in | ||
fsadm.8.in | ||
lvchange.8.in | ||
lvconvert.8.in | ||
lvcreate.8.in | ||
lvdisplay.8.in | ||
lvextend.8.in | ||
lvm.8.in | ||
lvm.conf.5.in | ||
lvmchange.8.in | ||
lvmconf.8.in | ||
lvmdiskscan.8.in | ||
lvmdump.8.in | ||
lvmetad.8.in | ||
lvmsadc.8.in | ||
lvmsar.8.in | ||
lvreduce.8.in | ||
lvremove.8.in | ||
lvrename.8.in | ||
lvresize.8.in | ||
lvs.8.in | ||
lvscan.8.in | ||
Makefile.in | ||
pvchange.8.in | ||
pvck.8.in | ||
pvcreate.8.in | ||
pvdisplay.8.in | ||
pvmove.8.in | ||
pvremove.8.in | ||
pvresize.8.in | ||
pvs.8.in | ||
pvscan.8.in | ||
vgcfgbackup.8.in | ||
vgcfgrestore.8.in | ||
vgchange.8.in | ||
vgck.8.in | ||
vgconvert.8.in | ||
vgcreate.8.in | ||
vgdisplay.8.in | ||
vgexport.8.in | ||
vgextend.8.in | ||
vgimport.8.in | ||
vgimportclone.8.in | ||
vgmerge.8.in | ||
vgmknodes.8.in | ||
vgreduce.8.in | ||
vgremove.8.in | ||
vgrename.8.in | ||
vgs.8.in | ||
vgscan.8.in | ||
vgsplit.8.in |