| 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.
Create a linear LV with a dm-integrity layer above it:
lvcreate --type integrity --integrity String [options]
Create a raid1 LV with a dm-integrity layer over each
raid image:
lvcreate --type raid1 --integrity y [options]
Add a dm-integrity layer to an existing linear LV,
or to each image of an existing raid1 LV:
lvconvert --integrity y LV
Remove the dm-integrity layer from a linear LV, or
from the images of a raid1 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 raid1 --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 raid1 LV.]
Options:
--integritymetadata LV
Use the specified LV for external metadata.
Allows specific device placement of metadata.
Without this option, the command creates a
hidden LV (with an _imeta suffix) to hold the
metadata. (Not usable with raid1+integrity.)
--integritysettings String
set dm-integrity parameters, e.g. to use a journal
instead of bitmap, --integritysettings "mode=J".
Example:
$ 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
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
Restore WAIT_MD_DEV in teardown.
NOTE: The name of MD device may have changed.
(cherry picked from commit c2ff8876f97a5840cd9d6fcda1bec55ef6220dc3)
|
|
|
|
|
| |
After stopping MD device and rescanning the leg, it is created with
different name.
|
|
|
|
|
|
| |
This partially reverts commit c2ff8876f97a5840cd9d6fcda1bec55ef6220dc3.
Not all MD devices are stopped. Something is missing there...
|
|
|
|
|
| |
teardown fails current PREFIX is prefix of previously failed test with
leftovers in dmtable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The scanning optimization can produce warnings from
'lvs' when run concurrently with commands modifying LVs,
so disable the optimization until it can be improved.
Without the scanning optimization, lvs will always
read all PVs twice:
1. read metadata from all PVs, saving it in memory
2. for each VG
3. lock VG
4. reread metadata from all PVs in VG, replacing metadata
saved from step 1
5. run command on VG
6. unlock VG
The optimization would usually cause step 4 to be skipped,
and PVs would be read only once.
Running the command in step 5 using metadata that was not
read under the VG lock is usually fine, except for the
fact that lvs attempts to validate the metadata by comparing
it to current dm state. If other commands are modifying dm
state while lvs is running, lvs may see differences between
metadata from step 1 and dm state checked during step 5,
and print warnings.
(A better fix may be to detect the concurrent change and
fall back to rereading metadata in step 4 only when needed.)
|
| |
|
|
|
|
| |
Since we reduced created LV to 4M - dd also just 4M.
|
|
|
|
|
|
| |
This reverts commit cbabdf2fca6131660cfb5525ed9edb3f7a41525a.
and add extra comment why this code may look unused, but
in runtime is necessary.
|
|
|
|
| |
This reverts commit 70fb31b5d6863248b5adfb2581b706cbb158b30e.
|