1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/tools
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
..
.exported_symbols generate liblvm2cmd exported symbols too 2010-06-25 18:23:10 +00:00
.gitignore More .gitignore files for an in-source-tree build. 2012-06-08 16:34:43 +01:00
args.h RAID: Add scrubbing support for RAID LVs 2013-04-11 15:33:59 -05:00
cmdnames.h Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
commands.h RAID: Add scrubbing support for RAID LVs 2013-04-11 15:33:59 -05:00
dmsetup.c dmsetup: fix 'splitname -o' to not fail if used without '-c' 2013-03-12 13:01:57 +01:00
dumpconfig.c cleanup: get rid of compiler's warning about possible unitialized variable 2013-03-06 12:53:27 +01:00
formats.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvchange.c RAID: Add scrubbing support for RAID LVs 2013-04-11 15:33:59 -05:00
lvconvert.c mirror: Fix overly-concerning warning on mirror up-convert failure. 2013-04-10 16:47:04 -05:00
lvcreate.c thin: lvcreate external origin snapshot support 2013-04-02 15:17:31 +02:00
lvdisplay.c Rework the toollib interface (process_each_*) on top of new vg_read. 2009-07-01 17:00:50 +00:00
lvextend.c Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
lvm2cmd-static.c Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
lvm2cmd.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvm2cmd.h Keep the LVM-based dmeventd plugins from trying to manipulate the dmeventd 2011-10-19 08:46:26 +00:00
lvm2cmdline.h Support repetition of --addtag and --deltag arguments. 2010-11-11 17:29:05 +00:00
lvm-static.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvm.c config: refer to config nodes using assigned IDs 2013-03-06 10:14:33 +01:00
lvmchange.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvmcmdlib.c cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
lvmcmdline.c cmdline: add arg_long_option_name 2013-04-02 15:16:53 +02:00
lvmdiskscan.c Few more close and dev_close trace 2012-03-01 21:12:37 +00:00
lvreduce.c Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
lvremove.c cleanup: add proper cast for force_t 2012-10-03 15:06:17 +02:00
lvrename.c config: add silent mode 2012-08-25 20:35:48 +01:00
lvresize.c config: refer to config nodes using assigned IDs 2013-03-06 10:14:33 +01:00
lvscan.c config: add silent mode 2012-08-25 20:35:48 +01:00
Makefile.in lvmetad: lvm depends on libdaemonclient.a 2013-01-04 23:10:38 +00:00
polldaemon.c config: refer to config nodes using assigned IDs 2013-03-06 10:14:33 +01:00
polldaemon.h Start using 64-bit status flags - most of the code already handles them. 2011-09-06 18:49:31 +00:00
pvchange.c pv_write: clean up non-orphan format1 PV write 2013-03-25 15:08:26 +01:00
pvck.c Move the core of the lib/config/config.c functionality into libdevmapper, 2011-08-30 14:55:15 +00:00
pvcreate.c config: refer to config nodes using assigned IDs 2013-03-06 10:14:33 +01:00
pvdisplay.c cleanup: uint64_t casts 2012-08-23 14:37:21 +02:00
pvmove.c metadata: add 'allow_orphan' arg to find_pv_by_name fn 2013-03-19 14:57:31 +01:00
pvremove.c config: add silent mode 2012-08-25 20:35:48 +01:00
pvresize.c config: add silent mode 2012-08-25 20:35:48 +01:00
pvscan.c config: refer to config nodes using assigned IDs 2013-03-06 10:14:33 +01:00
reporter.c config: refer to config nodes using assigned IDs 2013-03-06 10:14:33 +01:00
segtypes.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
stub.h Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
toollib.c thin: move update_pool_params 2013-03-13 15:13:54 +01:00
toollib.h thin: move update_pool_params 2013-03-13 15:13:54 +01:00
tools.h cmdline: add arg_long_option_name 2013-04-02 15:16:53 +02:00
vgcfgbackup.c config: add silent mode 2012-08-25 20:35:48 +01:00
vgcfgrestore.c thin: allow restore with --force 2012-11-27 14:08:24 +01:00
vgchange.c cleanup: switch log_error to log_warn 2012-10-17 15:41:35 +02:00
vgck.c Make vgck warn about missing PVs. 2010-07-27 20:05:29 +00:00
vgconvert.c config: refer to config nodes using assigned IDs 2013-03-06 10:14:33 +01:00
vgcreate.c cleanup: swap return values 2012-10-17 15:37:26 +02:00
vgdisplay.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
vgexport.c config: add silent mode 2012-08-25 20:35:48 +01:00
vgextend.c config: add silent mode 2012-08-25 20:35:48 +01:00
vgimport.c vgimport: Allow '--force' to import VGs with missing PVs. 2013-02-20 16:37:41 -06:00
vgmerge.c config: add silent mode 2012-08-25 20:35:48 +01:00
vgmknodes.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
vgreduce.c RAID: Make 'vgreduce --removemissing' work with RAID LVs 2013-02-20 14:52:46 -06:00
vgremove.c Make force_t enum usage obvious 2012-02-27 10:06:58 +00:00
vgrename.c Implement devices/global_filter. 2012-09-26 14:49:15 +02:00
vgscan.c lvmetad: Make vgscan --cache an alias to pvscan --cache. 2012-09-26 17:26:23 +02:00
vgsplit.c cleanup: swap return values 2012-10-17 15:37:26 +02:00