summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* handle LV with unrecognized metadatadev-dct-unusable-lvDavid Teigland2019-10-143-34/+53
| | | | | | | | | | | | | | | | | | | | | | | If LV metadata (typically a flag) is unrecognized by lvm, then lvm should refuse to allow that LV to be used, but can continue to allow the VG, and other recognized LVs to be used. This can happen if a version of lvm containing a new feature writes metadata for an LV containing a new flag, then an old version of lvm is used to access the VG. The old lvm does not recognize the new flag. Previously, the old lvm would refuse to recognize or access the entire VG, when it should have just disallowed access to the unrecognized LV. This initial implementation for handling an unrecognized LV involves setting an internal LV_UNUSABLE flag and clearing the VISIBLE_LV flag, making the problematic LV not visible (without -a). Existing code paths generally disallow accessing an LV that's not visible. Further changes should be made to make that code distinguish LVs that are UNUSABLE as opposed to just not VISIBLE.
* tests: cvolZdenek Kabelac2019-10-142-3/+3
|
* tests: drop manipulation with 'internal' LVZdenek Kabelac2019-10-141-2/+0
| | | | | Cachevol LV is 'internal' LV and should not be 'maintained' this way while it's being used as cachevol.
* cachevol: drop no longer needed functionsZdenek Kabelac2019-10-144-274/+0
| | | | Code is no longer used/needed.
* cachevol: use lv_cache_removeZdenek Kabelac2019-10-142-4/+3
| | | | Use same routine for dropping cache.
* cachevol: improve manipulation with dm treeZdenek Kabelac2019-10-142-70/+89
| | | | | | | | | | | Enhance activation of cached devices using cachevol. Correctly instatiace cachevol -cdata & -cmeta devices with '-' in name (as they are only layered devices). Code is also a bit more compacted (although still not ideal, as the usage of extra UUIDs stored in metadata is troublesome and will be repaired later). NOTE: this patch my brink potentially minor incompatiblity for 'runtime' upgrade
* cachevol: put _cvol as protected suffix.Zdenek Kabelac2019-10-144-2/+5
| | | | | | This revert "drop cvol dm uuid suffix for cachevol LVs" commit 5191057d9df3e5b92db3f80c412b99aea1074358. Start using -cvol for DM UUID.
* cachevol: use writethrough for partial removalZdenek Kabelac2019-10-141-1/+2
| | | | | | Instead of using 'noflush' option, switch cache_mode into WRITETHROUGH which does not require flushing, when user confirmed he does not want flushing for WRITEBACK (because of (partially) missing caching PV)
* cachevol: drop LV_CACHE_VOL on detach automaticallyZdenek Kabelac2019-10-141-0/+1
| | | | | Move dropping of cachevol flag into detach function. TODO: this flag should be internal to lvm2.
* cachevol: rename converted LV to _cvolZdenek Kabelac2019-10-142-0/+30
| | | | | | | When converting existing public LV to internally used 'CacheVol' LV - rename LV to LV_cvol. When splitting CacheVol, remove _cvol suffix.
* cachevol: wipe 'normal' deviceZdenek Kabelac2019-10-142-5/+4
| | | | | | For wiping we activate and clear 'regular' devices, since in case of whole process interuption (i.e. kill -9) we leave metadata & DM table and workable state all the time.
* cache: enhance removal function to work with cvolZdenek Kabelac2019-10-141-6/+24
| | | | | To keep things simple, use same code for all cache removal functions, not just for cachepools but also cachevols.
* cache: correct conditionZdenek Kabelac2019-10-141-2/+1
|
* cache: recognize cachevol with lv_cache_removeZdenek Kabelac2019-10-141-1/+4
|
* cache: reload only when switched to cleaner policyZdenek Kabelac2019-10-142-1/+2
| | | | | Reload cache target only when lvm2 reload table with cache with clearer policy.
* lvconvert: use struct initializerZdenek Kabelac2019-10-141-6/+5
| | | | Always good to keep rest of structure initilized with zeros.
* tests: disable caching of VDOZdenek Kabelac2019-10-141-1/+5
| | | | | Disable until vdo gets fixed, then require fixed version. Otherwise test kills kernel
* lvconvert: fix return value when zeroing failsZdenek Kabelac2019-10-142-1/+2
| | | | Use correct error return code for fail path.
* vgck: let updatemetadata repair mismatched metadataDavid Teigland2019-10-115-6/+25
| | | | | | Let vgck --updatemetadata repair cases where different mdas hold indepedently valid but unmatching copies of the metadata, i.e. different text metadata checksums or text metadata sizes.
* vgck: fix updatemetadata writing different descriptionsDavid Teigland2019-10-113-1/+46
| | | | | | | | | | vgck --updatemetadata would write the same correct metadata to good mdas, and then to bad mdas, but the sequence of vg_write/vg_commit calls betwen good and bad mdas could cause a different description field to be generated for good/bad mdas. (The description field describing the command was recently included in the ondisk copy of the metadata text.)
* pvmove: remove some cmirror related codeDavid Teigland2019-10-114-85/+2
| | | | which is no longer used
* test: Minimize data written by metadata-zero-spaceMarian Csontos2019-10-091-1/+2
| | | | | The test is checking only 2 megabytes, but is rewriting much more. Bad for limited ramdisk.
* man: lvmcache note dm-cache block size issueDavid Teigland2019-10-081-0/+15
|
* 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.