summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* dm-integrity supportdev-dct-integrity7David Teigland2019-12-0426-6/+1538
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a linear LV with a dm-integrity layer added above it. The dm-integrity layer stores checksums of the data written to the LV, and returns an error if data read from the LV does not match the previously saved checksum. lvcreate --type integrity --integrity String [options] 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) Store integrity metadata on a separate LV. Allows removing integrity from the LV later. --integrity internal Store integrity metadata interleaved with data on the same LV. Around 1% of the LV size will be used for integrity metadata. --integrity y Enable default integrity settings (external). Command variations: lvcreate --type integrity -n Name -L Size VG [Uses integrity external, the default.] lvcreate --integrity external -n Name -L Size VG [Uses type integrity, which is implied.] lvcreate --integrity y -n Name -L Size VG [Uses integrity external, the default, and uses type integrity, which is implied.] lvcreate --integrity internal -n Name -L Size VG [Uses type integrity, which is implied.] lvconvert --integrity none|n LV [Removes external integrity.] 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. --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 -wi-a----- 1.00g [lvex_iorig] [lvex_imeta] vg -wi-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 -wi-a----- 1.00g [lvin_iorig] [lvin_iorig] vg -wi-ao---- 1.00g Zeroing: After a new integrity LV is created, zeroes are written to the entire LV to initialize integrity metadata (checksums). Without this initialization, the LV will return read errors for any unwritten (and uninitialized) data. A large LV may take a long time to zero. The -Zn option can be used to disable the whole-LV zeroing, or the lvcreate command can be canceled while zeroing the new LV. In either case, the user may write to the entire LV to initialize the integrity metadata themselves.
* tests: add more tracing infoZdenek Kabelac2019-11-151-0/+2
|
* tests: reduce amount of written dateZdenek Kabelac2019-11-151-1/+1
| | | | Since we reduced created LV to 4M - dd also just 4M.
* revert "dmeventd: vdo plugin link lvm library"Zdenek Kabelac2019-11-151-0/+8
| | | | | | This reverts commit cbabdf2fca6131660cfb5525ed9edb3f7a41525a. and add extra comment why this code may look unused, but in runtime is necessary.
* Revert "hints: rewrite function"David Teigland2019-11-141-13/+26
| | | | This reverts commit 70fb31b5d6863248b5adfb2581b706cbb158b30e.
* Revert "debug: enhance debug messages"David Teigland2019-11-141-22/+20
| | | | This reverts commit e92d3bd1f75d335fba5303c433516ea4ebe5cab1.
* tests: enusure lib is initilizedZdenek Kabelac2019-11-141-1/+1
|
* debug: enhance debug messagesZdenek Kabelac2019-11-141-20/+22
|
* hints: drop unneeded memsetZdenek Kabelac2019-11-141-1/+0
| | | | strncpy will zero buffer itself.
* hints: no need to check for NULL before freeZdenek Kabelac2019-11-141-12/+6
| | | | free() itself checks for NULL.
* cov: use zallocZdenek Kabelac2019-11-141-6/+3
| | | | Instead of malloc() memset() -> zalloc()
* cov: add explicit ret value ignoringZdenek Kabelac2019-11-141-2/+2
| | | | We don't need to check for any error result codes here.
* cov: remove unused headersZdenek Kabelac2019-11-143-4/+0
|
* cov: more checks for failing syscallsZdenek Kabelac2019-11-142-2/+4
|
* dmeventd: vdo plugin link lvm libraryZdenek Kabelac2019-11-141-3/+0
| | | | | | | Since we fixed linking of proper version of 'libdevmapper' with linking lvm2 plugin correctly - we already have correct function available linked with internal lvm library. So drop unneeded include of parsing function.
* cov: inline _build_desc_writeZdenek Kabelac2019-11-141-25/+6
| | | | | | Embed function into the code, since the function is actually simpler written this as there are no memleak troubles with failing allocation error path.
* hints: check for _touch_hintsZdenek Kabelac2019-11-141-2/+3
| | | | Exit when !_touch_hints().
* hints: fix mem leaking buffersZdenek Kabelac2019-11-141-0/+5
|
* hints: validate allocation resultZdenek Kabelac2019-11-141-2/+4
|
* hints: validate sscanf resultsZdenek Kabelac2019-11-141-5/+8
|
* hints: allocate hint only when neededZdenek Kabelac2019-11-141-12/+18
| | | | | | | Avoid mem leaking hint on every loop continue and allocate hint only when it's going to be added into list. Switch to use 'dm_strncpy()' and validate sizes.
* hints: rewrite functionZdenek Kabelac2019-11-141-26/+13
|
* pvck: check result of dev_get_sizeZdenek Kabelac2019-11-141-1/+2
| | | | Don't use garbage value for later computations.
* cov: fix mem leaking bufferZdenek Kabelac2019-11-141-14/+22
| | | | | Free allocated buffer on function's exit. Also check for fwrite() results.
* cov: avoid passing NULL to strstr functionZdenek Kabelac2019-11-141-5/+5
| | | | When 'str1' would be NULL, there is no point to run 2nd. strstr().
* cov: check for retvalueZdenek Kabelac2019-11-141-1/+4
|
* cov: fix memleak for duplicate deviceZdenek Kabelac2019-11-141-14/+15
| | | | | | For dev_in_device_list() != 0 allocated 'devl' was actually leaking - so instead allocate 'devl' only when !dev_in_device_list() and indent code around.
* cov: check for NULLZdenek Kabelac2019-11-144-7/+6
| | | | | | | | | | | Since we check for NULL pointers earlier we need to be consistent across function - since the NULL would applies across whole function. When dropping 'mda' check - we are actually already dereferencing it before - so it can't be NULL at that places (and it's validated before entering _read_mda_header_and_metadata).
* devtype: simplify codeZdenek Kabelac2019-11-141-26/+13
| | | | Update code with simpler form and check for fclose().
* cov: fix memory leakZdenek Kabelac2019-11-141-1/+3
| | | | | Reapply 23cc7ddc50e2800a6dc248de897a4c88c1514160 to internal version of libdm.
* fix dev_unset_last_byte after write errorHeming Zhao2019-11-133-8/+4
| | | | | | | | | | | | | | | | | | | dev_unset_last_byte() must be called while the fd is still valid. After a write error, dev_unset_last_byte() must be called before closing the dev and resetting the fd. In the write error path, dev_unset_last_byte() was being called after label_scan_invalidate() which meant that it would not unset the last_byte values. After a write error, dev_unset_last_byte() is now called in dev_write_bytes() before label_scan_invalidate(), instead of by the caller of dev_write_bytes(). In the common case of a successful write, the sequence is still: dev_set_last_byte(); dev_write_bytes(); dev_unset_last_byte(); Signed-off-by: Zhao Heming <heming.zhao@suse.com>
* WHATS_NEW: updateZdenek Kabelac2019-11-111-0/+1
|
* tests: add test of resize of different segtypesZdenek Kabelac2019-11-111-1/+12
|
* lvextend: fix resizing volumes of different segtypeZdenek Kabelac2019-11-111-0/+2
| | | | | | | | | | | | | | | | | | When resizing 2 volumes like thin-pool and it's metadata and they would be of a different type - command would be actually expecting both LVs being of a same segtype - and would throw an error in case they are different. This patch fixes is by setting a new segtype from last segment of 2nd. extented device. Also it fixes the possible 'percentage' extension setup that might have been used for 'primary' volume - while the 'secondary' LV always goes with direct size - as we do not support 'percentage' setup for them This affects maily usage of thin-pool where the extension of thin-pool data size may also lead to extension of metadata size.
* tests: add extra settleZdenek Kabelac2019-11-111-0/+4
| | | | | To avoid removing, while 'add' might not have been processed yet. (when emulating reboot in pvmove-restart)
* tests: skip unneeded status checkZdenek Kabelac2019-11-111-6/+5
| | | | If 'remove' was succesful - we can break loop immediatelly.
* daemons: check for non-zero thread_idZdenek Kabelac2019-11-111-1/+2
| | | | Do not call pthread_join if thread_id would be 0.
* daemon: better error path handling for shutdownZdenek Kabelac2019-11-111-7/+16
| | | | | Report errors for open in better order. Ensure descriptors are not leaked.
* cov: ensure read_ahead is availableZdenek Kabelac2019-11-111-1/+1
| | | | Make sure read_ahead pointer is not NULL when quering for RA.
* cov: missing checks of syscallsZdenek Kabelac2019-11-111-3/+6
| | | | Check for sigprocmask errors
* gcc: avoid declaration shadowingZdenek Kabelac2019-11-111-3/+3
| | | | dev_name is global in device.h
* man: adjust 'disks' to 'devices' as used throughoutHeinz Mauelshagen2019-11-071-4/+4
|
* test: Fix metadata-zero-space with long VG namesMarian Csontos2019-11-061-4/+6
|
* tests: be happy with less then 90 percentZdenek Kabelac2019-11-011-1/+4
| | | | | | Thin metadata evolve between kernel version, so it's not always precisely predictible its usage - so let's met test happy, when it gets bellow 90%.
* tests: skip test if scsi_debug is not availableZdenek Kabelac2019-11-011-1/+1
|
* tests: slowdown delay of raidZdenek Kabelac2019-11-011-1/+1
| | | | Slowdown 'delay' more.
* tests: conversion only of exclusive lvZdenek Kabelac2019-11-011-1/+1
| | | | We can 'cache' only exclusively active LV in cluster.
* tests: avoid checking command result in clusterZdenek Kabelac2019-11-011-4/+10
| | | | | | | | | | | | When running cluster test with clvmd, the actual 'monitoring' happens in cluster - so the 'already monitored' message is also logged within clvmd code and the command cannot see such effect. clvmd was incapable to report this information back to command so it cannot be displayed this way. Add 'lvs -o+seg_monitor' validation which also works in clustered mode.
* WHATS_NEW: updateZdenek Kabelac2019-10-311-0/+1
|
* activation: drop removed declarationZdenek Kabelac2019-10-311-2/+0
| | | | | Seems this function has been removed long time ago with: 3e781ea446bb7ddc9a494cbba6b6104dd51c3910