summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* dm-integrity supportdev-dct-integrity22David Teigland2020-02-1733-22/+2913
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 integrity: allow adding and removing with active LV integrity: lvextend integrity: change some log message levels integrity: remove integrity meta lv on error path tests: integrity check sync_percent tests: check integrity sync_percent on raid images not on the raid lv itself integrity: include raid10 integrity: handle adding new raid images integrity: allocate imeta on same PV as rimage and rimage
* move pv_list code into libDavid Teigland2020-02-175-279/+296
|
* thin: don't use writecache for poolmetadataDavid Teigland2020-02-131-1/+2
|
* writecache: check if cachevol is writableDavid Teigland2020-02-111-0/+5
| | | | | before trying to initialize it (since wipe_lv does not return an error if it fails to write.)
* cachevol: stop dm errors with uncaching cache with cachevolZdenek Kabelac2020-02-112-7/+8
| | | | | | | | | | | | | | Fix the anoying kernel message reported: device-mapper: cache: 253:2: metadata operation 'dm_cache_commit' failed: error = -5 which has been reported while cachevol has been removed. Happened via confusing variable - so switch the variable to commonly user '_size' which presents a value in sector units and avoid 'scaling' this as extent length by vg extent size when placing 'error' target on removal path. Patch shouldn't have impact on actual users data, since at this moment of removal all date should have been already flushed to origin device. m
* post-releaseMarian Csontos2020-02-114-2/+8
|
* pre-releasev2_03_08Marian Csontos2020-02-114-4/+8
|
* vdo: fix vdoformat when -V is specifiedZdenek Kabelac2020-02-101-8/+8
| | | | | | The previous patch improved read of pipe when lvm2 was looking for default logical size, but we clearly must read pipe also for -V case, when the logical size is already defined.
* writecache: skip zeroing in test modeDavid Teigland2020-02-071-0/+3
|
* writecache: check for invalid cachevolDavid Teigland2020-02-071-0/+5
|
* writecache: fix return valueDavid Teigland2020-02-071-4/+4
|
* raid: better place for blocking reshapesZdenek Kabelac2020-02-071-6/+7
| | | | | | | | Still the place can be better to block only particular reshape operations which ATM cause kernel problems. We check if the new number of images is higher - and prevent to take conversion if the volume is in use (i.e. thin-pool's data LV).
* writecache: prevent snapshotsDavid Teigland2020-02-061-1/+4
| | | | | | there appear to be problems with taking a snapshot of an LV with a writecache, so block it until that is understood or fixed.
* writecache: fix splitcache when origin is raidDavid Teigland2020-02-042-4/+26
|
* WHATS_NEW: updateZdenek Kabelac2020-02-041-0/+4
|
* generate: remakeZdenek Kabelac2020-02-041-27/+82
| | | | Regen man page.
* lv_manip: add extra check for existin origin_lvZdenek Kabelac2020-02-041-1/+2
| | | | | | clang: it's supposedly impossible path to hit, as we should always have origin_lv defined when running this path, but adding protection isn't a big issue to make this obvious to analyzer.
* raid: add internal error for no segmentZdenek Kabelac2020-02-041-0/+5
| | | | | clang: capture internal error when data_seg would not be defined. (invalid LV with no areas)
* lv_manip: add error handling for _reserve_areaZdenek Kabelac2020-02-041-10/+19
| | | | | | | Since _reserve_area() may fail due to error allocation failure, add support to report this already reported failure upward. FIXME: it's log_error() without causing direct command failure.
* command: validate reporting of previous argumentZdenek Kabelac2020-02-041-8/+8
| | | | | When reporting parsing error, report 'previous' argument only when there is one.
* dmeventd: nicer error path for reading pipeZdenek Kabelac2020-02-042-35/+39
| | | | | | | When _daemon_read()/_client_read() fails during the read, ensure memory allocated withing function is also release here (so caller does not need to care). Also improve code readbility a bit a for same functionality use more similar code.
* lvmlockctl: use inline initilizersZdenek Kabelac2020-02-041-4/+3
| | | | clang: ensure r_name[] is in all possible paths defined.
* lvmlockctl: ensure result value is always definedZdenek Kabelac2020-02-041-1/+3
| | | | | Ensure passed pointer gets predefined value (instead of random stack value).
* lvmlockd: move eval of ENOENTZdenek Kabelac2020-02-041-5/+2
| | | | | To avoid logging 'errors' for no real error state (ENOENT), move this evaluation upward in the code.
* cov: check error code from mutex initZdenek Kabelac2020-02-041-1/+2
|
* cov: widen before calculating min_chunk_sizeZdenek Kabelac2020-02-041-1/+1
| | | | | | | Although we expect min_chunk_size to be 32bit value, for large size of caches it might be useful to do calcs 64bit. So to avoid doing shift as signed 32bit - use unsigned 64bit from the start.
* cov: unused header file removalZdenek Kabelac2020-02-045-8/+3
| | | | | | cov: unused header removed Also ensure library header file with config settings goes first. Move inclusion of format-text.h into layout.h
* bcache: fix memleak on error pathZdenek Kabelac2020-02-041-0/+1
| | | | clang: free io on error path.
* pvck: avoid memleak of vgnameZdenek Kabelac2020-02-041-1/+2
| | | | clang: no vgname buffer leak.
* dmsetup: no memleak on failed realocationZdenek Kabelac2020-02-041-2/+4
| | | | clang: keep old buf pointer for release on failing realloc() codepath.
* tests: compatible with older kernelsZdenek Kabelac2020-02-041-1/+1
| | | | Older kernels just show syscall stacktrace.
* tests: move vgsplit writecacheDavid Teigland2020-02-042-9/+15
| | | | to a different file
* pvmove: prevent moving writecache deviceDavid Teigland2020-02-031-0/+10
|
* vgsplit: handle cachevolDavid Teigland2020-02-032-16/+56
| | | | | attached to a cache or writecache LV. Ensure PVs in cachevol are moved with the main LV.
* writecache: reject invalid high/low watermark settingDavid Teigland2020-02-031-0/+6
|
* man: lvmcache writecache watermark percentDavid Teigland2020-02-031-4/+4
|
* writecache: report status fieldsDavid Teigland2020-01-316-3/+45
| | | | | | | | | | reporting fields (-o) directly from kernel: writecache_total_blocks writecache_free_blocks writecache_writeback_blocks writecache_error The data_percent field shows used cache blocks / total cache blocks.
* man: updates to lvmcacheDavid Teigland2020-01-301-45/+54
|
* lvmlockd: use ret value in query functionDavid Teigland2020-01-291-1/+1
|
* WHATS_NEW: updateZdenek Kabelac2020-01-231-0/+2
|
* tests: add corruption write on PV testZdenek Kabelac2020-01-231-0/+56
| | | | | Test a case where PV is readable, but fails on write updating. Check the failure is reported only for a single PV.
* tests: writeerror_devZdenek Kabelac2020-01-231-0/+27
| | | | | Intruduce aux function for easy simulation of disk areas, that are 'normally' readable, but will fail on write.
* vdo: adapt for multi line vdo_format outputZdenek Kabelac2020-01-231-4/+11
| | | | | | Do not close pipeline after 1st. line parsed from vdo_format. Also reprint the output for a user so new messages from vdo_format can be seen by users.
* raid: more limitted prohibition of stacked raid usageZdenek Kabelac2020-01-231-6/+7
| | | | | We actually need to prohibit only reshaping cases which are running over multiple commands.
* man: pvck dump description improvementsDavid Teigland2020-01-221-26/+34
|
* add suggestion message for mirror LVsHeming Zhao2020-01-151-0/+2
| | | | | | | | Currently the error messages are not clear. This very easy to guide user to execute "--removemissing --force", it is dangerous and will make the LVs to be destroied. Signed-off-by: Zhao Heming <heming.zhao@suse.com>
* fix corosync.conf: no interface errorHeming Zhao2020-01-151-0/+9
| | | | | | | systemctl status corosync (version: 2.4.5) report error: parse error in config: No interfaces defined Signed-off-by: Zhao Heming <heming.zhao@suse.com>
* 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.