1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/tools
David Teigland d9e8895a96 Allow dm-integrity to be used for raid images
dm-integrity stores checksums of the data written to an
LV, and returns an error if data read from the LV does
not match the previously saved checksum.  When used on
raid images, dm-raid will correct the error by reading
the block from another image, and the device user sees
no error.  The integrity metadata (checksums) are stored
on an internal LV allocated by lvm for each linear image.
The internal LV is allocated on the same PV as the image.

Create a raid LV with an integrity layer over each
raid image (for raid levels 1,4,5,6,10):

lvcreate --type raidN --raidintegrity y [options]

Add an integrity layer to images of an existing raid LV:

lvconvert --raidintegrity y LV

Remove the integrity layer from images of a raid LV:

lvconvert --raidintegrity n LV

Settings

Use --raidintegritymode journal|bitmap (journal is default)
to configure the method used by dm-integrity to ensure
crash consistency.

Initialization

When integrity is added to an LV, the kernel needs to
initialize the integrity metadata/checksums for all blocks
in the LV.  The data corruption checking performed by
dm-integrity will only operate on areas of the LV that
are already initialized.  The progress of integrity
initialization is reported by the "syncpercent" LV
reporting field (and under the Cpy%Sync lvs column.)

Example: create a raid1 LV with integrity:

$ lvcreate --type raid1 -m1 --raidintegrity y -n rr -L1G foo
  Creating integrity metadata LV rr_rimage_0_imeta with size 12.00 MiB.
  Logical volume "rr_rimage_0_imeta" created.
  Creating integrity metadata LV rr_rimage_1_imeta with size 12.00 MiB.
  Logical volume "rr_rimage_1_imeta" created.
  Logical volume "rr" created.
$ lvs -a foo
  LV                  VG  Attr       LSize  Origin              Cpy%Sync
  rr                  foo rwi-a-r---  1.00g                     4.93
  [rr_rimage_0]       foo gwi-aor---  1.00g [rr_rimage_0_iorig] 41.02
  [rr_rimage_0_imeta] foo ewi-ao---- 12.00m
  [rr_rimage_0_iorig] foo -wi-ao----  1.00g
  [rr_rimage_1]       foo gwi-aor---  1.00g [rr_rimage_1_iorig] 39.45
  [rr_rimage_1_imeta] foo ewi-ao---- 12.00m
  [rr_rimage_1_iorig] foo -wi-ao----  1.00g
  [rr_rmeta_0]        foo ewi-aor---  4.00m
  [rr_rmeta_1]        foo ewi-aor---  4.00m
2020-04-15 12:10:32 -05:00
..
.exported_symbols generate liblvm2cmd exported symbols too 2010-06-25 18:23:10 +00:00
.gitignore tools: add generated headers to .gitignore 2017-03-10 13:13:41 +00:00
args.h Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
cmdnames.h doc: change fsf address 2016-01-21 12:11:37 +01:00
command-lines.in Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
command.c command: validate reporting of previous argument 2020-02-04 17:22:06 +01:00
command.h fix command definition for pvchange -a 2019-06-10 13:43:20 -05:00
commands.h Revert "lvs: disable scanning optimization" 2019-11-26 16:52:28 -06:00
dumpconfig.c lvmconfig: Add options to produce file preamble 2017-08-05 16:23:34 +01:00
errors.h tools: Introduce exit code EINIT_FAILED. 2017-07-26 23:18:03 +01:00
formats.c doc: change fsf address 2016-01-21 12:11:37 +01:00
license.inc pre-release 2017-03-28 16:11:35 +01:00
lv_props.h Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
lv_types.h Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
lvchange.c Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
lvconvert_poll.c debug: more display_lvname usage 2017-06-27 08:28:36 +02:00
lvconvert_poll.h build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvconvert.c Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
lvcreate.c Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
lvdisplay.c process_each_lv: add check_single_lv function 2017-02-13 08:20:10 -06:00
lvextend.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm2cmd-static.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvm2cmd.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvm2cmd.h tools: Introduce exit code EINIT_FAILED. 2017-07-26 23:18:03 +01:00
lvm2cmdline.h commands: fix memory debug for cmd defs 2017-05-01 15:27:14 -05:00
lvm-static.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm.c debug: tracing error path 2017-06-27 00:27:36 +02:00
lvmcmdlib.c dmeventd: lvm vdo support 2018-07-09 15:29:16 +02:00
lvmcmdline.c Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
lvmdiskscan.c remove unused full filter 2018-12-04 14:06:46 -06:00
lvpoll.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvreduce.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvremove.c process_each_lv: add check_single_lv function 2017-02-13 08:20:10 -06:00
lvrename.c toollib: make it possible to also process internal VGs, add 'include_internal' switch to process_each_vg fn 2016-06-20 11:33:42 +02:00
lvresize.c lvextend: refresh shared LV remotely using dlm/corosync 2019-03-21 12:38:20 -05:00
lvscan.c Remove lvmetad 2018-07-11 11:26:42 -05:00
Makefile.in makefile: fixes build for older system 2018-12-17 11:41:38 +01:00
polldaemon.c improve reading and repairing vg metadata 2019-06-07 15:54:04 -05:00
pvchange.c lvmcache: renaming functions and variables 2019-08-16 13:26:11 -05:00
pvck.c pvck: use dm_config_parse_without_dup_node_check 2020-03-04 11:32:13 -06:00
pvcreate.c move the setting of use_full_md_check flag 2019-05-21 11:51:58 -05:00
pvdisplay.c add device hints to reduce scanning 2019-01-15 10:23:47 -06:00
pvmove_poll.c pvmove: add missing synchronization 2019-08-20 12:44:39 +02:00
pvmove_poll.h doc: change fsf address 2016-01-21 12:11:37 +01:00
pvmove.c Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
pvremove.c pvcreate: call label scan prior to pvcreate_each_device 2019-04-30 14:10:27 -05:00
pvresize.c exported vg handling 2019-06-25 15:39:08 -05:00
pvscan.c cov: unused header file removal 2020-02-04 17:22:06 +01:00
reporter.c pvs: remove unnecessary label scan 2019-05-03 16:16:29 -05:00
segtypes.c doc: change fsf address 2016-01-21 12:11:37 +01:00
stub.h Remove vgconvert 2018-06-13 14:14:03 -05:00
tags.c doc: change fsf address 2016-01-21 12:11:37 +01:00
tool.h configure: avoid repeative inclusion of configure.h 2018-12-21 19:19:50 +01:00
toollib.c Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
toollib.h move pv_list code into lib 2020-04-13 10:04:14 -05:00
tools.h Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
vals.h pvck: show specific dump option values 2019-12-10 11:07:07 -06:00
vgcfgbackup.c improve reading and repairing vg metadata 2019-06-07 15:54:04 -05:00
vgcfgrestore.c locking: unify global lock for flock and lockd 2019-04-29 13:01:05 -05:00
vgchange.c vgchange: remove bogus option restriction 2019-10-21 13:29:57 -05:00
vgck.c vgck: fix updatemetadata writing different descriptions 2019-10-11 12:57:32 -05:00
vgcreate.c vgcreate/vgextend: restrict PVs with mixed block sizes 2019-08-01 10:06:47 -05:00
vgdisplay.c tidy: Add missing underscores to statics. 2017-10-18 15:58:13 +01:00
vgexport.c lvmlockd: primarily use vg_is_shared 2018-06-01 13:15:22 -05:00
vgextend.c improve reading and repairing vg metadata 2019-06-07 15:54:04 -05:00
vgimport.c exported vg handling 2019-06-25 15:39:08 -05:00
vgimportclone.c exported vg handling 2019-06-25 15:39:08 -05:00
vgmerge.c locking: unify global lock for flock and lockd 2019-04-29 13:01:05 -05:00
vgmknodes.c process_each_lv: add check_single_lv function 2017-02-13 08:20:10 -06:00
vgreduce.c add suggestion message for mirror LVs 2020-01-15 09:46:54 -06:00
vgremove.c exported vg handling 2019-06-25 15:39:08 -05:00
vgrename.c exported vg handling 2019-06-25 15:39:08 -05:00
vgscan.c locking: unify global lock for flock and lockd 2019-04-29 13:01:05 -05:00
vgsplit.c vgsplit: handle cachevol 2020-02-03 15:33:58 -06:00