1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib/metadata
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
..
lv_alloc.h discards: don't discard reconfigured extents 2012-06-27 22:12:01 +01:00
lv_manip.c RAID: Add writemostly/writebehind support for RAID1 2013-04-15 13:59:46 -05:00
lv.c RAID: Add writemostly/writebehind support for RAID1 2013-04-15 13:59:46 -05:00
lv.h thin: add support for external origin 2013-02-23 10:36:58 +01:00
merge.c thin: add support for external origin 2013-02-23 10:36:58 +01:00
metadata-exported.h RAID: Add writemostly/writebehind support for RAID1 2013-04-15 13:59:46 -05:00
metadata.c lvmetad: Check for reappeared PVs. 2013-04-03 12:48:28 +02:00
metadata.h lvmetad: Check for reappeared PVs. 2013-04-03 12:48:28 +02:00
mirror.c metadata: add 'allow_orphan' arg to find_pv_by_name fn 2013-03-19 14:57:31 +01:00
pv_alloc.h discards: split discard from release_pv_segment 2012-06-27 22:11:54 +01:00
pv_manip.c config: refer to config nodes using assigned IDs 2013-03-06 10:14:33 +01:00
pv_map.c logging: classify log_debug messages 2013-01-07 22:30:29 +00:00
pv_map.h Track unreserved space for all alloc policies and then permit NORMAL to place 2012-02-01 02:10:45 +00:00
pv.c pv_header_extension: add support for reading PV header extension (flags & Embedding Area) 2013-02-26 11:27:23 +01:00
pv.h pv_header_extension: add support for reading PV header extension (flags & Embedding Area) 2013-02-26 11:27:23 +01:00
raid_manip.c RAID: Add writemostly/writebehind support for RAID1 2013-04-15 13:59:46 -05:00
replicator_manip.c logging: classify log_debug messages 2013-01-07 22:30:29 +00:00
segtype.c Handle metadata with unknown segment types more gracefully. 2009-10-16 17:41:49 +00:00
segtype.h cleanup: indent line 2013-04-02 15:17:05 +02:00
snapshot_manip.c Reinstate support for format1 snapshots, but issue deprecated warning. 2011-12-20 00:02:18 +00:00
thin_manip.c thin: move update_pool_params 2013-03-13 15:13:54 +01:00
vg.c logging: classify log_debug messages 2013-01-07 22:30:29 +00:00
vg.h Add free_orphan_vg 2012-02-13 11:03:59 +00:00