1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 01:55:10 +03:00
lvm2/lib
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
..
activate Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
cache scanning: optimize by checking text offset and checksum 2019-11-26 16:52:28 -06:00
cache_segtype cachevol: move flag setting after taking archive 2019-10-17 13:03:50 +02:00
commands Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
config vdo: raise VDO default bio threads to 4 2019-10-04 17:31:55 +02:00
datastruct build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
device Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
display display: try to show status for inactive vdopool 2019-10-04 17:31:55 +02:00
error device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
filters devs: rename dev_is_md dev_is_md_component 2019-05-21 11:44:39 -05:00
format_text Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
freeseg device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
integrity Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
label hints: free hint list in error exit path 2020-03-03 12:25:34 -06:00
locking lvmlockd: use transient LV lock when creating snapshot 2020-03-09 12:25:26 -05:00
log logging: remove unused code 2019-02-28 10:30:54 -06:00
lvmpolld device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
metadata Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
mirror pvmove: remove some cmirror related code 2019-10-11 11:31:42 -05:00
misc Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
mm memlock: extend exception list 2018-07-02 10:24:20 +02:00
notify build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
properties build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
raid Merge branch '2018-06-04-data-structs' 2018-06-08 14:21:07 +01:00
report Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
snapshot Merge branch '2018-06-04-data-structs' 2018-06-08 14:21:07 +01:00
striped device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
thin Merge branch '2018-06-04-data-structs' 2018-06-08 14:21:07 +01:00
unknown device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
uuid build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
vdo vdo: remember configure VDO write policy in metadata 2019-10-04 17:31:55 +02:00
writecache writecache: working real dm uuid suffix for wcorig lv 2020-02-20 17:13:43 -06:00
zero device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
Makefile.in Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00