| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Create a linear LV with an integrity layer above it:
lvcreate --type integrity --integrity String [options]
Create a raid LV with an integrity layer over each
raid image (for raid levels 1,4,5,6):
lvcreate --type raidN --integrity y [options]
Add an integrity layer to an existing linear LV,
or to each image of an existing raid LV:
lvconvert --integrity y LV
Remove the integrity layer from a linear LV, or
from the images of a raid LV:
lvconvert --integrity n LV
Integrity metadata:
The --integrity String specifies if the dm-integrity
metadata (checksums) should be interleaved with data
blocks, or written to a separate external LV.
--integrity external (default)
Use integrity with metadata on a separate LV.
Allows removing integrity from the LV later.
--integrity y
Same as integrity external.
--integrity n
Remove integrity (external metadata only.)
--integrity internal
Use integrity with metadata interleaved with
data on the same LV.
Only allowed with new linear LVs.
Internal integrity cannot be removed from an LV.
Around 1% of the LV size is used for integrity metadata.
Command variations:
lvcreate --type integrity -n Name -L Size VG
[Uses integrity external, the default.]
lvcreate --integrity y|external -n Name -L Size VG
[Uses type integrity, which is implied.]
lvcreate --integrity internal -n Name -L Size VG
[Uses type integrity, which is implied.]
lvcreate --type raidN --integrity y -m Num -n Name -L Size VG
[Uses type integrity for each raid image.]
lvconvert --type integrity LV
[Converts linear LV to type integrity.]
lvconvert --integrity y|external LV
[Converts linear LV to type integrity, or each
image to type integrity in a raid LV.]
Options:
--integritymetadata LV|PV
Use a specified LV for external metadata, or allocate
a integrity metadata LV(s) from the named PV.
With raid, only a PV can be specified (because multiple
metadata LVs are required.)
When this option is not used, the command allocates
integrity metadata LVs using any PVs in the VG.
--integritysettings String
set dm-integrity parameters, e.g. to use a journal
instead of bitmap, --integritysettings "mode=J".
Initialization:
When a new integrity LV is created, or integrity is added
to an LV, the kernel needs to initialize the integrity
metadata/checksums for all blocks in the LV. Integrity
checks (detecting corruption) is not performed on blocks
in the LV until they have been intialized. The progress
of integrity initialization is reported by the "copypercent"
LV reporting field (and under the Cpy%Sync lvs column.)
$ lvconvert --integrity y vg/lv
$ lvs vg/lv
LV VG Attr LSize Origin Cpy%Sync
lv vg gwi-a----- 1.00g [lv_iorig] 85.16
Examples:
$ lvcreate --integrity external -n lvex -L1G vg
$ lvs -a vg
LV VG Attr LSize Origin
lvex vg gwi-a----- 1.00g [lvex_iorig]
[lvex_imeta] vg ewi-ao---- 12.00m
[lvex_iorig] vg -wi-ao---- 1.00g
$ lvcreate --integrity internal -n lvin -L1G vg
$ lvs -a vg
LV VG Attr LSize Origin
lvin vg gwi-a----- 1.00g [lvin_iorig]
[lvin_iorig] vg -wi-ao---- 1.00g
$ lvcreate --type raid1 --integrity y -m 1 -n lver -L1G vg
$ lvs -a vg
LV VG Attr LSize Origin
lver vg rwi-a-r--- 1.00g
[lver_rimage_0] vg gwi-aor--- 1.00g [lver_rimage_0_iorig]
[lver_rimage_0_imeta] vg ewi-ao---- 12.00m
[lver_rimage_0_iorig] vg -wi-ao---- 1.00g
[lver_rimage_1] vg gwi-aor--- 1.00g [lver_rimage_1_iorig]
[lver_rimage_1_imeta] vg ewi-ao---- 12.00m
[lver_rimage_1_iorig] vg -wi-ao---- 1.00g
[lver_rmeta_0] vg ewi-aor--- 4.00m
[lver_rmeta_1] vg ewi-aor--- 4.00m
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Since VDO is also pool, the old if() case missed to know about this,
and executed unnecesserily initialization of cache pool variables.
This was usually harmless when using 'smaller' sizes of VDO pools,
but for big VDO pool size, we were reporting senseless messages
about big cache chunk sizes.
|
|
|
|
|
|
| |
Until we resolve reshape for 'stacked' devices, we need to disable it.
So users can no longer reshape i.e. thin-pool data volumes, causing
ATM bad thin-pool problems.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Added methods to vdo pool interface to allow enabling and
disabling of VDO:
* Compression
* Deduplication
|
| |
|
| |
|
|
|
|
|
| |
When a foreign VG is ignored, don't print warnings that
it is missing PVs.
|
| |
|
|
|
|
| |
Validate we capture core while original task sleeps.
|
|
|
|
|
| |
After device creation we need to wait for a cookie so it's not forgotten
in the system.
|
|
|
|
|
| |
Correct validation of prepared device and fail if the device can't
be created.
|
|
|
|
| |
Avoid endless loop if there was no 'remove' progress.
|
| |
|
|
|
|
| |
Make it visible we check for ==, >, < of same var.
|
|
|
|
|
| |
Drop 'extra' stack trace where errors are already logged from function.
Add some missing dots in messages.
|
| |
|
|
|
|
| |
Signed-off-by: Nikhil Kshirsagar <nkshirsa@redhat.com>
|
|
|
|
|
| |
Add maj:min to the task structure for RELOAD - which is now
handled in _flatten() and will just skip passing device name.
|
|
|
|
|
|
|
|
|
|
| |
When devices are created - we were not giving meaning error messages
when the failure happened on 'reload' part of creation.
With this patch we are now able to report both name and major:minor.
Enhancment is most visible with 'crypto' devices,
which are using 'secure' memory erase bit.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To write a new/repaired pv_header and label_header:
pvck --repairtype pv_header --file <file> <device>
This uses the metadata input file to find the PV UUID,
device size, and data offset.
To write new/repaired metadata text and mda_header:
pvck --repairtype metadata --file <file> <device>
This requires a good pv_header which points to one or two
metadata areas. Any metadata areas referenced by the
pv_header are updated with the specified metadata and
a new mda_header. "--settings mda_num=1|2" can be used
to select one mda to repair.
To combine all header and metadata repairs:
pvck --repair --file <file> <device>
It's best to use a raw metadata file as input, that was
extracted from another PV in the same VG (or from another
metadata area on the same PV.) pvck will also accept a
metadata backup file, but that will produce metadata that
is not identical to other metadata copies on other PVs
and other areas. So, when using a backup file, consider
using it to update metadata on all PVs/areas.
To get a raw metadata file to use for the repair, see
pvck --dump metadata|metadata_search.
List all instances of metadata from the metadata area:
pvck --dump metadata_search <device>
Save one instance of metadata at the given offset to
the specified file (this file can be used for repair):
pvck --dump metadata_search --file <file>
--settings "metadata_offset=<off>" <device>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
using --settings:
mda_offset=<offset> mda_size=<size> can be used
in place of the offset/size that normally come
from headers.
metadata_offset=<offset> prints/saves one instance
of metadata text at the given offset, in
metadata_all or metadata_search.
|
| |
|
| |
|
|
|
|
|
| |
Add cmd/fmt args to import functions so that
they can be used without the fid arg which.
|
|
|
|
|
|
| |
This reverts commit 9af1d63b4d96facb0aa055a44c2f61eac01e13f2.
fixes folded into subsequent pvck commit
|
|
|
|
|
|
| |
This reverts commit 1f4968289c9c0e2a1e850317ef173df11938b7f3.
fixes folded into subsequent pvck commit
|
|
|
|
|
|
| |
This reverts commit d67ce9e140b5691a3f75a69d6e735eec30603670.
fixes folded into subsequent pvck commit
|
|
|
|
|
|
| |
This reverts commit 0bad3977df40a70c68778ff0514d0ca712fee402.
fixes folded into subsequent pvck commit
|
|
|
|
|
|
| |
This reverts commit 153e55c20e9a3810a1862314a6465179e1b53931.
fixes folded into subsequent pvck commit
|
| |
|
|
|
|
|
|
| |
Running a reporting command on a VG now includes one
additional read to check the mda_header for any change
to the vg between scan and lock.
|
|
|
|
|
|
|
|
| |
This reverts commit 7474440d3b540d20eb4f997efeb31b881cc6ac8e.
lvs can use the scanning optimization again since it has
been changed in:
"scanning: optimize by checking text offset and checksum"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the VG lock is taken for vg_read, reread the mda_header
and compare the metadata text offset and checksum to what was
seen during label scan. If it is unchanged, then the metadata
has not changed since the label scan, and the metadata does not
need to be reread under the lock for command processing.
For commands that do not make changes (e.g. reporting), the
mda_header is reread and checked on one mda to decide if the
full metadata rereading can be skipped. For other commands
(e.g. modifying the vg) the mda_header is reread and checked
from all PVs. (These could probably just check one mda also.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The kernel MD runtime requires region size to be larger than stripe size
on striped raid layouts, thus the dm-raid target's constructor rejects
such request.
This causes e.g. an 'lvcreate --type raid10 -i3 -I4096 -R2048 -n lv vg' to fail.
Avoid failing late in the kernel by enforcing region size to be
larger or equal to stripe size.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1698225
|
|
|
|
|
|
|
|
|
|
| |
When pvcreate/pvremove prompt the user, they first release
the global lock, then acquire it again after the prompt,
to avoid blocking other commands while waiting for a user
response. This release/reacquire changes the locking
order with respect to the hints flock (and potentially other
locks). So, to avoid deadlock, use a nonblocking request
when reacquiring the global lock.
|