1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

16 Commits

Author SHA1 Message Date
Zdenek Kabelac
b885355e76 tests: add extra dmsetup table
Strange race seems to be occuring here from time to time...
2024-04-16 21:17:42 +02:00
Zdenek Kabelac
2cb43449ee tests: fix path to dev dir
Correct some explicit references to /dev and use $DM_DEV_DIR.
2023-06-23 18:06:22 +02:00
Zdenek Kabelac
2043bb0e38 test: convert to use ext4
Modify test to check same properties with less demanding ext4.
2023-04-22 11:25:39 +02:00
David Teigland
b869a6ff7a fix fs block size detection
blkid_get_tag_value() is not a reliable way to query the fs
BLOCK_SIZE, so use the "probe" functions instead.
2022-09-09 15:50:00 -05:00
Zdenek Kabelac
6990cbc166 tests: use conv=fdatasync
When we only need wait for result - avoid using slow 'oflag=sync'
with virtual layers
2022-09-07 15:00:15 +02:00
David Teigland
4df6931c4c tests: adjust for check_devicesfile 2021-08-20 14:06:55 -05:00
Zdenek Kabelac
51ac56a05e tests: use blkid without caching
Always use blkid without caching to avoid poluting
cache stored in /run/blkid or /etc on older distros
2021-03-26 20:39:41 +01:00
Zdenek Kabelac
bc9bb534ff tests: fix cleanup for unbound variables
When loop can't handle sector-size option - failure caused double fail
for access of unbound variable
Also fix expression for 'rm' and remove loops after loop release.
2020-09-20 00:37:21 +02:00
Zdenek Kabelac
f2878a801c tests: use DIRECT io for zeroing whenver we can
Performance with direct I/O here is noticable better,
so use it instead of buffered write whenever we can.
2020-09-20 00:37:21 +02:00
Zdenek Kabelac
8e3e2c74ed tests: ensure mnt is defined before trap install 2020-09-19 17:30:51 +02:00
Zdenek Kabelac
8d40859e29 tests: resolve missing removal of loopdevice on error path
In case of test failure, loop device leaked and occupied space forever.
2020-09-18 00:31:11 +02:00
David Teigland
739827ef1c tests: add new integrity reporting fields 2020-09-01 17:13:46 -05:00
David Teigland
48872b0369 integrity: avoid increasing logical block size of active LV
When adding integrity to an active LV, avoid choosing an
integrity block size that would result in increasing the
logical block size of the LV.
2020-06-16 12:27:22 -05:00
David Teigland
a014c4f341 tests: integrity and block size 2020-06-15 16:04:40 -05:00
David Teigland
f32e85ae51 tests: expand integrity-blocksize 2020-06-11 12:46:47 -05:00
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