summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* dm-integrity supportdev-dct-integrity20David Teigland2020-01-1731-57/+2278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* move pv_list code into libDavid Teigland2020-01-145-279/+296
|
* WHATS_NEW: updateZdenek Kabelac2020-01-131-0/+2
|
* tests: update for readaheadZdenek Kabelac2020-01-132-12/+11
|
* vdo: avoid running initialization of cache pool varsZdenek Kabelac2020-01-131-7/+9
| | | | | | | | 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.
* raid: disallow reshape of stacked LVsZdenek Kabelac2020-01-131-0/+6
| | | | | | 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.
* WHATS_NEW: VDO lvmdbusd addsTony Asleson2020-01-091-0/+2
|
* lvmdbusd: Add function to convert LV into a VDO poolVojtech Trefny2020-01-093-0/+78
|
* lvmdbusd: Add VDO enable/disable compress & dedupVojtech Trefny2020-01-093-2/+118
| | | | | | | Added methods to vdo pool interface to allow enabling and disabling of VDO: * Compression * Deduplication
* tests: Some lvmdbus tests require larger PVsMarian Csontos2019-12-181-1/+3
|
* tests: VDO detection in dbus testsdev-mcsontos-tests-201912Marian Csontos2019-12-161-4/+7
|
* drop warnings about missing pvs in foreign vgsDavid Teigland2019-12-111-2/+5
| | | | | When a foreign VG is ignored, don't print warnings that it is missing PVs.
* pvck: show specific dump option valuesDavid Teigland2019-12-106-2/+17
|
* tests: improve secure testZdenek Kabelac2019-12-101-2/+4
| | | | Validate we capture core while original task sleeps.
* test: fix missing waiting on udevZdenek Kabelac2019-12-101-3/+3
| | | | | After device creation we need to wait for a cookie so it's not forgotten in the system.
* test: fail on device createZdenek Kabelac2019-12-101-1/+5
| | | | | Correct validation of prepared device and fail if the device can't be created.
* test: aux setupZdenek Kabelac2019-12-101-6/+6
| | | | Avoid endless loop if there was no 'remove' progress.
* clenaup: simpler formZdenek Kabelac2019-12-101-7/+6
|
* vg_read: use else for 3 caseZdenek Kabelac2019-12-101-9/+2
| | | | Make it visible we check for ==, >, < of same var.
* debug: enhance messagesZdenek Kabelac2019-12-101-20/+20
| | | | | Drop 'extra' stack trace where errors are already logged from function. Add some missing dots in messages.
* debug: avoid to slashes in debug messageZdenek Kabelac2019-12-101-1/+1
|
* debug: print VG name in log messages for segment errorsNikhil Kshirsagar2019-12-101-3/+3
| | | | Signed-off-by: Nikhil Kshirsagar <nkshirsa@redhat.com>
* libdm: set maj:min while creating and reloading deviceZdenek Kabelac2019-12-101-0/+6
| | | | | Add maj:min to the task structure for RELOAD - which is now handled in _flatten() and will just skip passing device name.
* libdm: support device RELOAD with maj:min and devname setZdenek Kabelac2019-12-102-4/+11
| | | | | | | | | | 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.
* man pvck: describe settingsDavid Teigland2019-12-061-0/+46
|
* update option description for settingsDavid Teigland2019-12-061-1/+2
|
* pvck: deal with coverity warningsDavid Teigland2019-12-021-41/+57
|
* post-releaseMarian Csontos2019-11-304-2/+8
|
* pre-releasev2_03_07Marian Csontos2019-11-304-6/+8
|
* build: make generateMarian Csontos2019-11-301-12/+233
|
* pvck: use zalloc in more placesDavid Teigland2019-11-271-7/+3
|
* pvck: repair headers and metadataDavid Teigland2019-11-279-103/+1946
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* pvck: dump functions cleanup args and return valsDavid Teigland2019-11-271-32/+36
|
* pvck: dump show most recent metadataDavid Teigland2019-11-271-1/+23
|
* pvck: allow disk locations to be specifiedDavid Teigland2019-11-273-86/+134
| | | | | | | | | | | | 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.
* pvck: move some arg processingDavid Teigland2019-11-271-66/+37
|
* scan: add simple scan to find a pvidDavid Teigland2019-11-272-0/+72
|
* metadata: add vg_from_config_treeDavid Teigland2019-11-275-22/+42
| | | | | Add cmd/fmt args to import functions so that they can be used without the fid arg which.
* Revert "cov: use zalloc"David Teigland2019-11-271-3/+6
| | | | | | This reverts commit 9af1d63b4d96facb0aa055a44c2f61eac01e13f2. fixes folded into subsequent pvck commit
* Revert "pvck: check result of dev_get_size"David Teigland2019-11-271-2/+1
| | | | | | This reverts commit 1f4968289c9c0e2a1e850317ef173df11938b7f3. fixes folded into subsequent pvck commit
* Revert "cov: fix mem leaking buffer"David Teigland2019-11-271-22/+14
| | | | | | This reverts commit d67ce9e140b5691a3f75a69d6e735eec30603670. fixes folded into subsequent pvck commit
* Revert "cov: avoid passing NULL to strstr function"David Teigland2019-11-271-5/+5
| | | | | | This reverts commit 0bad3977df40a70c68778ff0514d0ca712fee402. fixes folded into subsequent pvck commit
* Revert "cov: check for retvalue"David Teigland2019-11-271-4/+1
| | | | | | This reverts commit 153e55c20e9a3810a1862314a6465179e1b53931. fixes folded into subsequent pvck commit
* scanning: use bool type for _scan_text_mismatchDavid Teigland2019-11-271-13/+7
|
* tests hints: update check for io countDavid Teigland2019-11-261-4/+6
| | | | | | 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.
* Revert "lvs: disable scanning optimization"David Teigland2019-11-261-1/+1
| | | | | | | | 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"
* scanning: optimize by checking text offset and checksumDavid Teigland2019-11-267-9/+168
| | | | | | | | | | | | | | 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.)
* bcache: add invalidate_bytes functionDavid Teigland2019-11-264-0/+22
|
* lvcreate: ensure striped raid region size is at least stripe sizeHeinz Mauelshagen2019-11-262-0/+8
| | | | | | | | | | | | | 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
* pvcreate,pvremove: fix reacquiring global lock after promptDavid Teigland2019-11-264-6/+16
| | | | | | | | | | 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.