diff options
author | David Teigland <teigland@redhat.com> | 2019-11-20 16:07:27 -0600 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2020-04-15 12:10:32 -0500 |
commit | d9e8895a96539d75166c0f74e58f5ed4e729e551 (patch) | |
tree | 31a570fa5dfee258072f553af32cd66988eb16a8 /configure | |
parent | b6b4ad8e28eff7476cb04c4cb93312b06605b82f (diff) | |
download | lvm2-d9e8895a96539d75166c0f74e58f5ed4e729e551.tar.gz |
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
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -918,6 +918,7 @@ enable_cache_check_needs_check with_vdo with_vdo_format with_writecache +with_integrity enable_readline enable_realtime enable_ocf @@ -1716,6 +1717,7 @@ Optional Packages: --with-vdo=TYPE vdo support: internal/none [internal] --with-vdo-format=PATH vdoformat tool: [autodetect] --with-writecache=TYPE writecache support: internal/none [none] + --with-integrity=TYPE integrity support: internal/none [none] --with-ocfdir=DIR install OCF files in [PREFIX/lib/ocf/resource.d/lvm2] --with-default-pid-dir=PID_DIR @@ -9762,6 +9764,31 @@ $as_echo "#define WRITECACHE_INTERNAL 1" >>confdefs.h esac ################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include integrity" >&5 +$as_echo_n "checking whether to include integrity... " >&6; } + +# Check whether --with-integrity was given. +if test "${with_integrity+set}" = set; then : + withval=$with_integrity; INTEGRITY=$withval +else + INTEGRITY="none" +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTEGRITY" >&5 +$as_echo "$INTEGRITY" >&6; } + +case "$INTEGRITY" in + none) ;; + internal) + +$as_echo "#define INTEGRITY_INTERNAL 1" >>confdefs.h + + ;; + *) as_fn_error $? "--with-integrity parameter invalid" "$LINENO" 5 ;; +esac + +################################################################################ # Check whether --enable-readline was given. if test "${enable_readline+set}" = set; then : enableval=$enable_readline; READLINE=$enableval |