summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* thin: fix message processing on thin-pool extensionwip-8.8.0Zdenek Kabelac2022-11-293-1/+83
| | | | | | | | When thin-pool had queued some delete message on extension operation such message has been 'lost' and thin-pool kernel metadata has been left with a thin volume that no longer existed for lvm2 metadata. (cherry picked from commit 09371131469f7398c597a5fb30dc565859253cc2)
* vgimportdevices: fix locking when creating devices fileDavid Teigland2022-11-283-6/+12
| | | | | | | Take the devices file lock before creating a new devices file. (Was missed by the change to preemptively create the devices file prior to setup_devices(), which was done to improve the error path.)
* vgimportdevices: change result when devices are not addedDavid Teigland2022-11-282-13/+336
| | | | | | | | | | | | | | | | | | | | When using --all, if one VG is skipped, continue adding other VGs, and do not return an error from the command if some VGs are added. (A VG is skipped if it's missing PVs.) If the command fails during devices file setup or device scanning, then remove the devices file if it has been newly created by the command, and exit with an error. If devices from a named VG are not imported (e.g. the VG is missing devices), then remove the devices file if it has been newly created by the command, and exit with an error. If --all VGs are being imported, and no devices are found to include in the devices file, then remove the devices file if it has been newly created by the command, and exit with an error.
* lvmdbusd: Set LVM_COMMAND_PROFILE=lvmdbusdlvm2-2.03.14-7.el8Tony Asleson2022-11-281-1/+3
| | | | | | | We need this to prevent lvm from interleaving the JSON output with errors written to stderr. (cherry picked from commit a5e6947d74f7b88f7f0df4328a923ad82a970634)
* lvconvert: correct test support for vdo-poolZdenek Kabelac2022-11-283-2/+10
| | | | (cherry picked from commit d0697be5004af0e040b1f746e619b8075350bc46)
* devices file: fix pvcreate --uuid matching pvid entry with no device idDavid Teigland2022-11-022-3/+17
| | | | | | pvcreate with --uuid would segfault if a devices file entry matched the specified pvid, but the devices file entry had no device_id, which could happen if the entry has a devname idtype.
* apply multipath_component_detection=0 to duplicate PV handlinglvm2-2.03.14-6.el8rhel-8.7.0David Teigland2022-11-022-3/+10
| | | | | | | multipath_component_detection=0 has always applied to the filter-based component detection. Also apply this setting to the duplicate-PV handling which also eliminates multipath components (based on duplicate PVs having the same wwid.)
* exit with error when --devicesfile name doesn't existDavid Teigland2022-07-0612-17/+46
|
* build: Fix make rpm with VERSION_DM without dashMarian Csontos2022-06-151-1/+1
| | | | | | | When building RPM from a branch based on a release tag the expected -git suffix is missing breaking the script producing error like following one: error: line 215: Unterminated rich dependency: (2021-53.ge36b180a6.el9: Requires: device-mapper-devel >= 1.02.181 (2021-53.ge36b180a6.el9
* filter-mpath: get wwids from sysfs vpd_pg83David Teigland2022-06-098-43/+454
| | | | | | | | | to compare with wwids in /etc/multipath/wwids when excluding multipath components. The wwid printed from the sysfs wwid file may not be the wwid used in multipath wwids. Save the wwids found for each device on dev->wwids to avoid repeating reading and parsing the sysfs files.
* vdo: fix conversion of vdo_slab_size_mbZdenek Kabelac2022-06-091-11/+2
| | | | | | | | | | | | When converting VDO volume, the parameter vdo_slabSize was incorrectly copied as vdo_blockMapCacheSize, however this parameter is then no longer used for any table line creation so the wrong value was only stored in metadata. Also use just single get_kb_size_with_unit_ and remove it's duplicate functionality with get_mb_size_with_unit_. Use $VERB for vdo remove call.
* filter-mpath: handle other wwid types in blacklistDavid Teigland2022-06-091-5/+6
| | | | | | | Fixes commit 494372b4eed0c8f6040e3357939eb7511ac25745 "filter-mpath: use multipath blacklist" to handle wwids with initial type digits 1 and 2 used for t10 and eui ids. Originally recognized type 3 naa.
* devices file: fail if --devicesfile filename doesn't existDavid Teigland2022-06-092-0/+13
| | | | | | | A typo of the filename after --devicesfile should result in a command error rather than the command falling back to using no devices file at all. Exception is vgcreate|pvcreate which create a new devices file if the file name doesn't exist.
* devices file: move clean up after command is runDavid Teigland2022-06-092-1/+1
| | | | | devices_file_exit wasn't being called between lvm_shell commands, so the file lock wouldn't be released.
* toollib: fix segfault when handling selection with historical LVsPeter Rajnoha2022-06-091-3/+4
| | | | | | | | | | | | | When processing historical LVs inside process_each_lv_in_vg for selection, we need to use dummy "_historical_lv" for select_match_lv. This is because a historical LV is not an actual LV, but only a tiny representation with subset of original properties that we recorded (name, uuid...). To use the same processing functions we use for full-fledged non-historical LVs, we need to use the prefilled "_historical_lv" structure which has all the other missing properties hard-coded.
* vdo: support --vdosettingsZdenek Kabelac2022-06-0912-39/+312
| | | | | | | | Allow to use --vdosettings with lvcreate,lvconvert,lvchange. Support settings currenly only configurable via lvm.conf. With lvchange we require inactivate LV for changes to be applied. Settings block_map_era_length has supported alias block_map_period.
* improve description of devices optionDavid Teigland2022-06-091-2/+3
|
* filter-mpath: use multipath blacklistDavid Teigland2022-06-093-12/+342
| | | | | | | | Explicit wwid's from these sections control whether the same wwid in /etc/multipath/wwids is recognized as a multipath component. Other non-wwid keywords are not used, and may require disabling the use of the multipath wwids file in lvm.conf.
* devices file: remove extraneous unlock in vgchange -uDavid Teigland2022-06-091-4/+3
| | | | | vgchange -u exit path was unlocking the devices file in cases when it wasn't needed, which produced an warning.
* lvmlockd: return error from vgcreate init_vg_sanlockDavid Teigland2022-06-091-2/+2
| | | | | | in vgcreate for shared sanlock vg, if sanlock_write_resource returns an unexpected error, then make init_vg_sanlock fail which will cause the vgcreate to fail.
* vgimportdevices: fix incorrect deviceidtype usageDavid Teigland2022-06-091-2/+1
| | | | | | | | When a VG has PVs with different device id types, it would try to use the idtype of the previous PV in the loop. This would produce an unncessary warning, or could lead to using the devname idtype when a better idtype is available.
* change messages about filtered devicesDavid Teigland2022-06-094-9/+9
| | | | | | Change messages that refer to devices being "excluded by filters" to say just "excluded". This will avoid mistaking the word "filters" with the lvm.conf filter setting.
* writecache: check memory usageDavid Teigland2022-06-091-0/+69
| | | | | warn if writecache neds > 50% of system memory, and confirm if writecache needs > 90% of system memory.
* devices: use dev-cache aliases handling from label scan functionsDavid Teigland2022-06-093-112/+36
| | | | | | The label scan functions where doing some device alias validation which is now better handled by the dev-cache layer, so just use that.
* devices: fix dev_name assumptionsDavid Teigland2022-06-0910-8/+68
| | | | | | | | | | dev_name(dev) returns "[unknown]" if there are no names on dev->aliases. It's meant mainly for log messages. Many places assume a valid path name is returned, and use it directly. A caller that wants to use the path from dev_name() must first check if the dev has any paths with dm_list_empty(&dev->aliases).
* devices: initial use of existing optionDavid Teigland2022-06-092-5/+5
| | | | | | | Use dev_cache_get_existing() in a few common, high level locations where it's obvious that only existing dev-cache entries are wanted. This can be expanded and used in more locations (or dev_cache_get can stop creating new entries.)
* devices: drop incorrect paths from aliases listDavid Teigland2022-06-094-98/+164
| | | | | | | | | | | | along with some basic checks for cases when a device has no aliases. lvm itself creates many situations where a struct device has no valid paths, when it activates and opens an LV, does something with it, e.g. zeroing, and then closes and deactivates it. (dev-cache is intended for PVs, and the use of LVs should be moved out of dev-cache in a future patch.)
* devices: simplify dev_cache_get_by_devtDavid Teigland2022-06-094-60/+10
| | | | | | remove unused args, and no callers need or want a repeated dev_cache_scan if there is no dev from the lookup.
* writecache: display block size from lvsDavid Teigland2022-06-095-0/+29
| | | | | lvs was missing the ability to display writecache block size. now possible with lvs -o writecache_block_size
* man lvmcache: mention writecache memory usageDavid Teigland2022-06-091-0/+12
|
* devices file: do not clear PVID of unread devicesDavid Teigland2022-06-094-0/+37
| | | | | | | | | | | | | | | | In a certain disconnected state, a block device is present on the system, can be opened, reports a valid size, reports the correct device id (wwid), and matches a devices file entry. But, reading the device can still fail. In this case, device_ids_validate() was misinterpreting the read error as the device having no data/label on it (and no PVID). The validate function would then clear the PVID from the devices file entry for the device, thinking that it was fixing the devices file (making it consistent with the on disk state.) Fix this by not attempting to check and correct a devices file entry that cannot be read. Also make this case explicit in the hints validation code (which was doing the right thing but indirectly.)
* lvmdevices: make deldev work for missing deviceDavid Teigland2022-06-093-20/+20
|
* lvmdevices: fix checks when adding entriesDavid Teigland2022-06-091-105/+48
| | | | | | | Removes some incorrect and unnecessary checks for other entries when adding a new devices. The removed checks and corrections were mostly redundant with what is already done by device id matching. Other checking is reworked so the warnings are a bit different.
* devices: exclude md components when duplicate pvs are seenDavid Teigland2022-05-251-19/+149
| | | | | | | | Improve handling of md components that get through the filter, like the previous improvement for multipath. If md components get through the filter and trigger duplicate PV code, then eliminate any devs entirely that are not an md device.
* devices: exclude multipath components based on matching wwidDavid Teigland2022-05-256-9/+323
| | | | | | | | | | | | If multipath component devices get through the filter and cause lvm to see duplicate PVs, then check the wwid of the devs and drop the component devices as if they had been filtered. If a dm mpath device was found among the duplicates then use that as the PV, otherwise do not use any of the components as the PV. "duplicate PVs" associated with multipath configs will no longer stop commands from working.
* Revert "pvcreate: overwrite partition header with -f"stable-2.03.14David Teigland2022-01-185-28/+5
| | | | | | This reverts commit a5c37afdca97d6565ea02bc4bc7d52f360823cd3. This commit did not properly recognize GPT cases.
* lvmdevices check: error exit if update is neededDavid Teigland2022-01-144-27/+24
| | | | | | | | . error exit means that lvmdevices --update would make a change. . remove check of PART field from --check because it isn't used. . unlink searched_devnames file to ensure check|update will search
* pvcreate: overwrite partition header with -fDavid Teigland2022-01-145-5/+28
| | | | | | | $ pvcreate /dev/sdc Cannot use /dev/sdc: device is partitioned $ pvcreate -f /dev/sdc Physical volume "/dev/sdc" successfully created.
* make: generatelvm2-2.03.14-3.el8Marian Csontos2022-01-044-72/+27
|
* man lvmautoactivation: replace systemctl with journalctlrhel-8.6.0David Teigland2021-12-201-1/+1
|
* lvcreate: include recent optionsDavid Teigland2021-12-201-0/+4
| | | | | The permitted option list in lvcreate has not kept up with command-lines.in.
* man: add section about static autoactivationDavid Teigland2021-12-201-7/+41
|
* device_id: handle wwid with spaces or control charactersDavid Teigland2021-12-201-4/+6
| | | | | non-standard wwid can be reported from sysfs with spaces/etc. replace with "_"
* print warning about unrecognized journal option valueDavid Teigland2021-12-201-0/+1
|
* devices file: don't write in test modeDavid Teigland2021-12-201-0/+3
|
* tests devicesfile-devname.sh drop mdadm chunkDavid Teigland2021-12-201-1/+1
|
* spec: Add lvmautoactivation man pageMarian Csontos2021-12-201-0/+1
|
* man: lvmautoactivationDavid Teigland2021-12-204-37/+309
| | | | new topical man page describing autoactivation
* fix spelling of pruningDavid Teigland2021-12-201-1/+1
|
* display: ignore --reportformatDavid Teigland2021-12-202-6/+21
| | | | | Using the option would do nothing useful but would print extraneous braces.