]> sourceware.org Git - lvm2.git/commit
RAID: Add writemostly/writebehind support for RAID1
authorJonathan Brassow <jbrassow@redhat.com>
Mon, 15 Apr 2013 18:59:46 +0000 (13:59 -0500)
committerJonathan Brassow <jbrassow@redhat.com>
Mon, 15 Apr 2013 18:59:46 +0000 (13:59 -0500)
commit2e0740f7ef420c7b981bc67cb606d180701b8c1d
tree830d8fef50a2b9fc45b5ffb9b8d844d1750ec96c
parentdce8d06af7e5a14a1507bea0e64e6cc27556cbc7
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--
19 files changed:
WHATS_NEW
lib/format_text/flags.c
lib/metadata/lv.c
lib/metadata/lv_manip.c
lib/metadata/metadata-exported.h
lib/metadata/raid_manip.c
lib/raid/raid.c
lib/report/columns.h
lib/report/properties.c
lib/report/report.c
libdm/libdevmapper.h
libdm/libdm-deptree.c
man/lvchange.8.in
man/lvs.8.in
scripts/gdbinit
test/shell/lvchange-raid.sh
tools/args.h
tools/commands.h
tools/lvchange.c
This page took 0.041398 seconds and 5 git commands to generate.