summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tests: add cache-single-repairdev-dct-cachevol-repair-10David Teigland2019-10-071-0/+203
|
* lvconvert: drop warnings related to missing cachevol repairDavid Teigland2019-10-071-11/+1
|
* man: lvmcache cachevol repairDavid Teigland2019-10-071-0/+96
|
* new command to replace a dm-cache cachevolDavid Teigland2019-10-075-0/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This command replaces the cachevol in a cache LV with another LV. The replacement LV should contain a repaired copy of the cachevol. When the main LV is activated, it will use the replacement cachevol for caching. The previous cachevol becomes a visible, unused LV. $ lvs -a vg LV VG Attr LSize Pool Origin [fast] vg Cwi---C--- 8.00g fast2 vg -wi------- 8.00g main vg Cwi---C--- 32.00g [fast] [main_corig] [main_corig] vg owi---C--- 32.00g $ lvconvert --replacecachevol fast mm/fast2 Replace current cachevol fast with fast2 for caching vg/main? [y/n]: y LV vg/main is now using cachevol vg/fast2 for caching. The previous cachevol vg/fast is now unused. $ lvs -a vg LV VG Attr LSize Pool Origin fast vg -wi------- 8.00g [fast2] vg Cwi---C--- 8.00g main vg Cwi---C--- 32.00g [fast2] [main_corig] [main_corig] vg owi---C--- 32.00g
* new command to repair a dm-cache cachevolDavid Teigland2019-10-075-0/+500
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When dm-cache metadata and data are placed on a cachevol, this command is used to recover from damaged cache metadata. The command runs cache_repair with input from the existing cachevol, and output to the unused destination LV in the first position arg. This writes repaired metadata to the destination LV. Then cache data is copied from the existing cachevol LV to the destination LV. If this is successful, the user can replace the damaged cachevol with the LV containing the repaired metadata and data. $ lvs -a vg LV VG Attr LSize Pool Origin [fast] vg Cwi---C--- 8.00g fast2 vg -wi------- 8.00g main vg Cwi---C--- 32.00g [fast] [main_corig] [main_corig] vg owi---C--- 32.00g $ lvconvert --repaircachevol fast vg/fast2 Erase all existing data on vg/fast2? [y/n]: y cache_repair wrote repaired metadata to vg/fast2. copying 7 GiB of cache data to vg/fast2... copied 1 GiB of 7 GiB of cache data... copied 2 GiB of 7 GiB of cache data... copied 3 GiB of 7 GiB of cache data... copied 4 GiB of 7 GiB of cache data... copied 5 GiB of 7 GiB of cache data... copied 6 GiB of 7 GiB of cache data... copied 7 GiB of 7 GiB of cache data... copied 8522825728 bytes of cache data from vg/fast to vg/fast2.
* vgremove: remove internal lvmlock LVDavid Teigland2019-10-041-0/+8
| | | | | | | | | If a VG is forcibly changed from lock_type sanlock to lock_type none, the internal lvmlock LV is left behind. If that LV is not removed before vgremove is run on the VG, then an internal check will be triggered by the hidden lvmlock LV. So, check for and remove a left over lvmlock LV during vgremove.
* tests: improve lib wipefs_aDavid Teigland2019-10-041-1/+2
| | | | | | in wipefs fallback, use limited dd and mdadm --zero-superblock to avoid writing to entire dev in case dev space is provisioned on write.
* WHATS_NEW: updateZdenek Kabelac2019-10-042-0/+7
|
* vdo: add lvs fields to query vdo volume propertiesZdenek Kabelac2019-10-044-2/+324
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add lots of vdo fields: vdo_operating_mode - For vdo pools, its current operating mode. vdo_compression_state - For vdo pools, whether compression is running. vdo_index_state - For vdo pools, state of index for deduplication. vdo_used_size - For vdo pools, currently used space. vdo_saving_percent - For vdo pools, percentage of saved space. vdo_compression - Set for compressed LV (vdopool). vdo_deduplication - Set for deduplicated LV (vdopool). vdo_use_metadata_hints - Use REQ_SYNC for writes (vdopool). vdo_minimum_io_size - Minimum acceptable IO size (vdopool). vdo_block_map_cache_size - Allocated caching size (vdopool). vdo_block_map_era_length - Speed of cache writes (vdopool). vdo_use_sparse_index - Sparse indexing (vdopool). vdo_index_memory_size - Allocated indexing memory (vdopool). vdo_slab_size - Increment size for growing (vdopool). vdo_ack_threads - Acknowledging threads (vdopool). vdo_bio_threads - IO submitting threads (vdopool). vdo_bio_rotation - IO enqueue (vdopool). vdo_cpu_threads - CPU threads for compression and hashing (vdopool). vdo_hash_zone_threads - Threads for subdivide parts (vdopool). vdo_logical_threads - Logical threads for subdivide parts (vdopool). vdo_physical_threads - Physical threads for subdivide parts (vdopool). vdo_max_discard - Maximum discard size volume can recieve (vdopool). vdo_write_policy - Specified write policy (vdopool). vdo_header_size - Header size at front of vdopool. Previously only 'lvdisplay -m' was exposing them.
* vdo: remember configure VDO write policy in metadataZdenek Kabelac2019-10-041-1/+11
| | | | | Store write_policy in vdopool metadata. In case it's not present 'auto' is selected.
* vdo: field updateZdenek Kabelac2019-10-041-6/+6
|
* vdo: introduce get_vdo_write_policy_nameZdenek Kabelac2019-10-042-0/+16
|
* vdo: correct internal API for set_vdo_write_policyZdenek Kabelac2019-10-042-3/+3
| | | | This is 'setting' function.
* vdo: keep minimum_io_size in sectorsZdenek Kabelac2019-10-045-6/+8
|
* vdo: raise VDO default bio threads to 4Zdenek Kabelac2019-10-041-1/+1
| | | | | Since 'vdo create' tends to use this setting, update lvm2 to provide same default.
* display: try to show status for inactive vdopoolZdenek Kabelac2019-10-041-1/+1
| | | | | | | | | | Since we now support activation of 'vdo' volume without explicit activation of 'vdopool' it's now possible to have active layer vdopool (-vpool) volume and having vdopool itself inactive - yet still in this case we can show available stats for this volume. But we need to show correct activation status and other standard info.
* resize: continue change for getting vdo status before resizeZdenek Kabelac2019-10-041-4/+5
| | | | | Continue commit a98b77c16455ee97f5bd4b89536a3ae4efd8e009. There needs to be error reported when status can't be obtained.
* cache: report for succesful statusZdenek Kabelac2019-10-041-4/+4
|
* dm: introduce DM_GET_TARGET_VERSIONMikulas Patocka2019-10-047-2/+45
| | | | | | | | Adds support for the DM_GET_TARGET_VERSION to dmsetup. It introduces a new comman "target-version" that will accept list of targets and print their version. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
* cmirrord: deamon links libdmZdenek Kabelac2019-10-042-2/+3
| | | | | Correct included header files for this outdated tool since it's linked with libdm, it need to use header files from this dir.
* lvmlockd: set failure flag for test modeDavid Teigland2019-10-041-0/+1
| | | | | | Set a failure flag when vg_read returns an error for test mode. The caller can segfault if there's an error with no flag set.
* spec: Fix lvm2-activation-generator man page handlingMarian Csontos2019-10-041-1/+3
| | | | | lvm2-activation-generator is not installed when systemd is not in the system.
* tests: add wipefs wrapperDavid Teigland2019-10-026-51/+53
| | | | | which falls back to using dd on old systems without the wipefs command
* tests: update to md dev nameDavid Teigland2019-10-025-30/+16
| | | | | | | | Use /dev/md33 instead of /dev/md0 to reduce chances of conflicting with an existing name. Only call 'mdadm --stop /dev/md33' for cleanup and don't use 'mdadm --stop --scan' to avoid stopping other md devs.
* test: increase size of raid10 LV allowing tests to succeed on fast storageHeinz Mauelshagen2019-10-021-2/+2
| | | | Also add health char check.
* test: add RAID lvextend resynchronization testHeinz Mauelshagen2019-10-021-0/+65
| | | | | | | | | | Due to a dm-raid target flaw fixed in target version 1.15.0, extents of raid sets don't get resynchronized when new MD bitmp pages have to be allocated due to the extension. Introduce lvextend-raid.sh to test this flaw. Related: rhbz1671964
* test: add checks for not 100% sync ratio after initiation of check/repairHeinz Mauelshagen2019-10-021-0/+4
| | | | Related: rhbz1640630
* pvck: handle PVs with zero metadata copiesDavid Teigland2019-09-302-5/+32
|
* tests: update duplicate md testsDavid Teigland2019-09-301-25/+14
| | | | adjust to recent improvements in duplicate handling
* scan: use PV device name hint for choosing duplicate PVDavid Teigland2019-09-301-2/+34
| | | | Prefer a device if its name matches the PV device name hint.
* scan: use PV size for choosing duplicate PVDavid Teigland2019-09-301-0/+41
| | | | Prefer a device if it matches the size of the PV.
* scan: add PV summary info to lvmcacheDavid Teigland2019-09-305-25/+103
| | | | | Expand the lvmcache info that is saved by the scan to include PV info from the metadata.
* pvscan: use quick activation only with matching PV device namesDavid Teigland2019-09-301-8/+22
| | | | | | | | | | | | | | | | When the PV device names in the VG metadata do not match the current PV device names seen on the system, do not use the optimized activation function (that avoids extra device scanning.) When the device names do not match, it's a clue that there could be duplicate PVs, in which case we want to scan all devicess to find any duplicates and stop the activation if found. This does not prevent autoactivating a VG from the incorrect duplicate PV, because the incorrect duplicate may appear by itself first. At that point its duplicate PV does not exist to be seen. (A future enhancement could use the WWID to strengthen this detection.)
* metadata: import device name hint from metadataDavid Teigland2019-09-303-1/+11
| | | | Start by using it in a comment for a missing PV.
* metadata: add args to metadata import functionsDavid Teigland2019-09-301-36/+65
| | | | | instead of getting them through fid arg no functional change
* dmsetup: do not treat no groups as an error in dmstats list --groupBryn M. Reeves2019-09-301-2/+4
| | | | | | Analogous to the case of a device with no regions, it is not an error to attempt to list the stats groups on a device that has no configured groups: just return success and continue.
* vdo: restore monitoring of vdo poolZdenek Kabelac2019-09-302-1/+3
| | | | Switch to -vpool layered name needs to monitor proper device.
* vdo: properly check percentage for resizeZdenek Kabelac2019-09-301-8/+5
| | | | | | | | | | Avoid checking 'lv_is_active()' since special LV types does this validation anyway what calling _percent() function and call it ONLY when none of special types is queried. This restores support for VDO resize (as with support for separate VDO pool activation, plain query for lv_is_active() is not working in this case).
* vdo: deactivate forgotten vdo poolZdenek Kabelac2019-09-301-0/+11
| | | | | | | | | | | If the linear mapping is lost (for whatever reason, i.e. test suite forcible 'dmsetup remove' linear LV, lvm2 had hard times figuring out how to deactivate such DM table. So add function which is in case inactive VDO pool LV checks if the pool is actually still active (-vpool device present) and it has open count == 0. In this case deactivation is allowed to continue and cleanup DM table.
* tests: mdadm stop in test cleanupDavid Teigland2019-09-271-0/+5
| | | | | try to clear any existing md devs remaining after a test
* tests: skip md tests if system not cleanDavid Teigland2019-09-274-4/+4
|
* tests: writecache-split check have_writecacheDavid Teigland2019-09-261-1/+1
|
* spec: enable writecacheMarian Csontos2019-09-251-0/+2
|
* build: make generateMarian Csontos2019-09-253-1/+55
|
* lvconvert: enable --uncache with dm-writecache cachevolDavid Teigland2019-09-241-6/+6
| | | | | splitcache followed by an automatic lvremove of the cachevol LV
* writecache: allow removing LV with attached writecacheDavid Teigland2019-09-241-5/+19
|
* writecache: move code into new fileDavid Teigland2019-09-245-164/+208
| | | | | | put writecache specific code in writecache_manip.c should be no functional change
* lvremove: remove attached cachevol with removed LVDavid Teigland2019-09-241-0/+6
| | | | | When an LV is removed that has an attached cachevol, also remove the cachevol LV.
* tests: update cache-single-splitDavid Teigland2019-09-241-1/+124
| | | | add some uncache commands
* lvconvert: enable --uncache with dm-cache cachevolDavid Teigland2019-09-241-14/+21
| | | | | splitcache followed by an automatic lvremove of the cachevol LV