summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tests: for devices filedev-dct-deviceid-33David Teigland2021-02-224-0/+1807
|
* tests: allow tests to use real devicesDavid Teigland2021-02-224-2/+75
| | | | | | | | user creates a file listing real devices they want lvm tests to use, and sets LVM_TEST_DEVICE_LIST. lvm tests can use these with prepare_real_devs and get_real_devs. Other aux functions do not work with these devs.
* device usage based on devices fileDavid Teigland2021-02-2256-190/+4564
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LVM devices file lists devices that lvm can use. The default file is /etc/lvm/devices/system.devices, and the lvmdevices(8) command is used to add or remove device entries. If the file does not exist, or if lvm.conf includes use_devicesfile=0, then lvm will not use a devices file. An existing but empty file will cause lvm to see no devices. When the devices file is in use, the regex filter is not used, and the filter settings in lvm.conf or the command line are ignored. LVM records devices in the devices file using hardware-specific IDs, such as the WWID, and attempts to use subsystem-specific IDs for virtual device types (which should ideally be as unique and stable a hardware-based ID.) These device IDs are also written in the VG metadata. When no hardware or virtual ID is available, lvm falls back using the unstable device name as the device ID. When devnames are used, lvm performs extra scanning to find devices if their devname changes, e.g. after reboot. When proper device IDs are used, an lvm command will not look at devices outside the devices file, but when devnames are used as a fallback, lvm will scan devices outside the devices file to locate PVs on renamed devices. A config setting search_for_devnames can be used to control the scanning for renamed devname entries. Related to the devices file, the new command option --devices <devnames> allows a specific list of devices to be exposed to the lvm command, overriding the devices file. The listed devices act as a sort of devices file in terms of limiting which devices lvm will see and use. Devices that are not listed will appear to be missing to the lvm command. Multiple devices files can be kept in /etc/lvm/devices, which allows lvm to be used with different, independent sets of devices, e.g. system devices do not need to be exposed to a specific application, and that application can use lvm on its own devices that are not exposed to the system. The option --devicesfile <filename> is used to select the devices file to use with the command. Without the option set, the default system devices file is used. Setting --devicesfile "" causes lvm to not use a devices file.
* command defs: add missing commasDavid Teigland2021-02-221-6/+4
| | | | even though the parser seems to work fine without them
* fix check for md raid imsm signature on 4k devicesDavid Teigland2021-02-181-0/+10
| | | | | | On devices with 4k logical block size, the imsm signature is located 8k from the end of the device, not 1k as is the case for devices with 512 LBS.
* tests: Skip test killing kernelMarian Csontos2021-02-171-1/+1
| | | | Bug 1916891
* WHATS_NEW: updatesZdenek Kabelac2021-02-171-0/+7
|
* make: generateZdenek Kabelac2021-02-171-0/+45
|
* tests: readonly snapshot thick origin can't be mergedZdenek Kabelac2021-02-171-0/+6
| | | | | When user sets snapshot thick origin as read-only - lvconvert --merge refuses to merge until user swiches origin to 'read-write'.
* lvmlocdk: correct creation of dm path vg sanlock LVZdenek Kabelac2021-02-171-2/+5
| | | | Vgname may contain '-' and needs escaping '--' for /dev/mapper path.
* tests: lvconvert vdo profile supportZdenek Kabelac2021-02-171-2/+6
|
* man: vdo drop resize restriction commentZdenek Kabelac2021-02-171-5/+0
| | | | lvm2 supports resize of cached vdo pool volumes.
* tests: check resize of cached vdopoolZdenek Kabelac2021-02-171-1/+11
|
* vdo: just one probe is enoughZdenek Kabelac2021-02-171-7/+3
| | | | | target_present_version() can handle modprobing no need to try it twice.
* lvconvert: VDO kernel support before convertingZdenek Kabelac2021-02-171-0/+8
| | | | | Early check for kernel support of VDO target before starting any conversion work.
* lvconvert: vdo may convert already formated vdoZdenek Kabelac2021-02-176-21/+46
| | | | | | | | | | User use 'lvconvert -Zn --type vdo-pool' to convert an existing vdo formated volume and skip lvm2 internal formating. This however requires user is passing proper matching parameters. For them user can use --profile|--metadataprofile option whos support has been also enhanced. TODO: add support to read values directly from formated volume.
* lvchange: remove unneeded callZdenek Kabelac2021-02-171-7/+0
| | | | Sync is already happining in activate_and_wipe_lvlist().
* lv_manip: avoid removing LV when convertingZdenek Kabelac2021-02-171-1/+3
| | | | | | | | | In some cases we use 'creation' also during conversion. Here it can be actually unwanted side effect we may remove not just newly created layers - but also original converted LV. So until we make clear how to properly revert from some errors in middle of conversion, disable removal for any 'lvconvert' commands.
* tests: lvdisplay does not crash for merged thinZdenek Kabelac2021-02-171-0/+3
|
* lvdisplay: fix show of merged thin snapshotZdenek Kabelac2021-02-171-1/+1
| | | | | | | | When lvdisplay was executed and thin snaphost has be merged to thin origin and the operation has been postponed till devices are closed, command crashed. Check LV is COW before trying to check snapshot percentage.
* tests: lvconvert thin profile conversionZdenek Kabelac2021-02-171-0/+18
|
* lvconvert: thin errorwhenfull and recalculationZdenek Kabelac2021-02-172-2/+17
| | | | | | | | | | | When converting an existing LV to thin-pool, user may now pass also '--errorwhenfull' option like with 'lvcreate'. Also recalculate chunksize when performace profile is used with conversion (again matching lvcreate). Adds missing flagging for uncropped metadata sizes.
* include lvm version in debug outputDavid Teigland2021-02-121-0/+1
|
* scan: wipe filters when dropping scanned dataDavid Teigland2021-02-101-13/+1
| | | | | | | | | | | | | | | | | | | | | | | Fix clearing persistent filter state when clearing all the state from a label_scan. label_scan reads devs and saves info in bcache, lvmcache, and in the persistent filter. In some uncommon cases, an lvm command wants to clear all info from a prior label_scan, and repeat label_scan from scratch. In these cases, info in lvmcache, bcache and the persistent filter all need to be cleared before repeating label_scan. By missing the persistent filter wiping, outdated persistent filter info, from a prior label_scan, could cause lvm to incorrectly filter devices that change between polling intervals. (i.e. if the device changes in such a way that the filtering results change.) A case where lvm wants to do multiple label_scans is a polling command (like lvconvert --merge), when lvmpolld has been disabled, so that the command itself needs to to do repeated polling checks.
* WHATS_NEW: updateZdenek Kabelac2021-02-101-0/+3
|
* gcc: drop unused assingmentZdenek Kabelac2021-02-101-1/+1
|
* gcc: ensure pointer is always definedZdenek Kabelac2021-02-101-1/+1
|
* libdm: simplify line emitter checkingZdenek Kabelac2021-02-102-13/+9
|
* device_mapper: simplify line emitter checkingZdenek Kabelac2021-02-102-14/+10
|
* label: avoid rescaning unusable DM devicesZdenek Kabelac2021-02-101-0/+13
|
* lvconvert: read-only origin cannot be mergedZdenek Kabelac2021-02-101-4/+10
| | | | | | When user sets snapshost origin as read-only, lvm will not allow simple merge and user needs to flip permission,
* lvchange: snapshot thick origin permission rw/rZdenek Kabelac2021-02-101-1/+1
| | | | | User is allowed to change permission for thick origin. FIXME: it's not quite clear why few others are prohibited to change.
* snapshot: create origin of virtual snap read onlyZdenek Kabelac2021-02-101-1/+1
| | | | | When creating old fashioned way thick virtual snapshot, use read-only 'zero' _vorigin device.
* dev-cache: remove duplicated allocationZdenek Kabelac2021-02-101-1/+1
| | | | | Merge mistake missed to remove allocation that is now postponed until it's really needed.
* dev_get_primary_dev: fix invalid path checkDavid Teigland2021-02-091-1/+6
| | | | | Fix commit bee9f4efdd81 "filter-mpath: work with nvme devices" which removed setting the path for readlink.
* dev-type: sysfs attrs without sectorsZdenek Kabelac2021-02-091-20/+36
| | | | Split function for reading attrs in sectors.
* typo: fixesZdenek Kabelac2021-02-082-2/+2
| | | | forgotten merge from last batch.
* WHATS_NEW: updatesZdenek Kabelac2021-02-081-0/+2
|
* dev-type: convert to use log_warnZdenek Kabelac2021-02-084-38/+38
| | | | | | | Keep log_error designated only for 'erroring' condition of command and replace these errors with log_warn() WARNING. Also do some indent changes.
* dev-type: use fopen for sysfs fileZdenek Kabelac2021-02-081-12/+6
| | | | | Directly open sysfs files and save extra stat() call which is not adding any extra safety in sysfs dir.
* dev-type: dev_is_pmem reuses topology read codeZdenek Kabelac2021-02-083-38/+17
|
* dev-cache: better code reuse for _add_aliasZdenek Kabelac2021-02-081-77/+35
| | | | | Move path copying into _add_alish together with hashing. Remove duplicated code.
* dev-cache: check for nvme name while adding aliasZdenek Kabelac2021-02-082-13/+6
| | | | Instead of repeated list retest, compare name once during add of alias.
* targets: use target_present_versionZdenek Kabelac2021-02-087-27/+15
| | | | Skip duplicated dm version ioctl() on every startup.
* tests: check event_activation can be disabledZdenek Kabelac2021-02-081-0/+4
|
* tests: support for resized cached LVsZdenek Kabelac2021-02-082-7/+30
| | | | Support for cached LVs is now enabled.
* lv_resize: support resizing of cached volumesZdenek Kabelac2021-02-082-77/+110
| | | | | | | | | | | | Automatically figure out resizable layer in the LV stack and resize it online. Split check for reshaped raids and postpone removal of unused space after finished reshaping after metadata archiving. Drop warning about unsupported automatic resize of monitored thin-pool. Currently there is not yet support for resize of writecache.
* lv_manip: reuse function also during reductionZdenek Kabelac2021-02-081-31/+29
| | | | | | Move function _setup_lv_size() in front of _lv_reduce() so it can be reused also in this function. Avoid propagating 0 length to upper layer.
* lv_resize: use 'bad' code path for error caseZdenek Kabelac2021-02-081-1/+1
|
* thin: check for overprovisioning only onceZdenek Kabelac2021-02-081-4/+5
|