summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* make: generatelvm2-2.03.16-2.el9rhel-9.1.0Zdenek Kabelac2022-07-141-0/+12
| | | | (cherry picked from commit c0f8e6675c62332263acdc7c3c2f61eca20bd60f)
* exit with error when --devicesfile name doesn't existDavid Teigland2022-07-1412-17/+46
| | | | (cherry picked from commit 92b4fcf57f3c6d212d06b72b097e1a06e6efb84b)
* pvdisplay: restore --reportformat optionDavid Teigland2022-07-141-2/+2
| | | | | | | | | | Fixes commit b8f4ec846 "display: ignore --reportformat" by restoring the --reportformat option to pvdisplay. Adding -C to pvdisplay turns the command into a reporting command (like pvs, vgs, lvs) in which --reportformat can be useful. (cherry picked from commit db5277c97155632ce83e1125e348eda97c871968)
* filter-mpath: get wwids from sysfs vpd_pg83David Teigland2022-07-148-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. (cherry picked from commit 3b0f9cec7e999c33f17714358d2b469bda6967d2)
* filter-mpath: handle other wwid types in blacklistDavid Teigland2022-07-141-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. (cherry picked from commit c302903dbab1d5fd05b344c654bed83c9ecb69f8)
* devices file: fail if --devicesfile filename doesn't existDavid Teigland2022-07-142-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. (cherry picked from commit bfe072e4388b530cbf5369be8a8f1305220198bf)
* devices file: move clean up after command is runDavid Teigland2022-07-142-2/+1
| | | | | | | devices_file_exit wasn't being called between lvm_shell commands, so the file lock wouldn't be released. (cherry picked from commit 9dfa6f38793f6b5f7de2a4148ab2f7790e3c39da)
* pre-releasev2_03_16Marian Csontos2022-05-184-6/+12
|
* make: generateMarian Csontos2022-05-1845-90/+135
|
* toollib: fix segfault when handling selection with historical LVsPeter Rajnoha2022-05-052-3/+5
| | | | | | | | | | | | | 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.
* make: generateZdenek Kabelac2022-05-0345-66/+170
|
* vdo: support --vdosettingsZdenek Kabelac2022-05-0313-39/+313
| | | | | | | | 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-05-021-2/+3
|
* filter-mpath: use multipath blacklistDavid Teigland2022-04-223-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.
* tests: devicesfile-edit.sh fix loop file nameDavid Teigland2022-04-211-2/+2
| | | | don't remove dash from loop file name
* devices file: remove extraneous unlock in vgchange -uDavid Teigland2022-04-131-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-04-081-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.
* filters: remove unused internal filterDavid Teigland2022-04-064-99/+1
|
* filter: remove unused EAGAIN case and flagDavid Teigland2022-04-0610-77/+8
| | | | | The case of filters returning EAGAIN and using the FILTER_AFTER_SCAN flag is no longer used.
* lvmdevices: --deldev using device idDavid Teigland2022-04-067-7/+80
| | | | | When used with --deviceidtype, --deldev can specify a device id to remove.
* vgimportdevices: fix incorrect deviceidtype usageDavid Teigland2022-04-061-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.
* pvscan: warn about /dev/sda excluded by devices fileDavid Teigland2022-04-011-0/+28
| | | | | | | | | | In most installations, /dev/sda* or /dev/vda* should be included in system.devices because the root, home, etc LVs are usually on sda or vda. Add a special case warning when a pvscan autoactivation command sees that /dev/sda* or /dev/vda* are excluded by system.devices, either not listed or having a different device id.
* change messages about filtered devicesDavid Teigland2022-04-015-11/+11
| | | | | | 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.
* lvmdevices update: correct multipath entriesDavid Teigland2022-04-012-0/+49
| | | | | Remove multipath components. Add multipath devs that have multipath components listed.
* devices file: warn about missing multipath entryDavid Teigland2022-04-015-5/+38
| | | | | | | | | | | Warn if a scsi device is listed in the devices file that is used by a multipath device that is not listed. This will happen if a scsi device is listed in the devices file and then an mpath device is set up to use it. The way to correct this would be to remove the devices file entry for the component device and add a new entry for the multipath device.
* thin: fix message processing on thin-pool extensionZdenek Kabelac2022-03-303-1/+80
| | | | | | 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.
* fix args entry for nolockingDavid Teigland2022-03-251-1/+1
| | | | typo in previous commit
* Move nolocking warning to man pageDavid Teigland2022-03-252-5/+3
| | | | | | It's more logical to warn about --nolocking in the man page before it's used rather than after it's used and too late. Also, warnings are usually for things the user may not know.
* vgchange monitor: don't use udev infoDavid Teigland2022-03-251-0/+11
| | | | | vgchange --monitor y is run during startup when udev is being initialized and is not yet ready to be used.
* pvscan: don't use udev for external device infoDavid Teigland2022-03-091-5/+3
| | | | | pvscan is used to populate udev info, so it can't expect to use that udev info.
* writecache: check memory usageDavid Teigland2022-03-011-0/+69
| | | | | warn if writecache neds > 50% of system memory, and confirm if writecache needs > 90% of system memory.
* devices: only close PVs on LVs when scan_lvs is enabledDavid Teigland2022-03-011-2/+4
| | | | This code is only needed when lvm scans PVs that are stacked on LVs.
* devices: use dev-cache aliases handling from label scan functionsDavid Teigland2022-02-283-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-02-2410-8/+75
| | | | | | | | | | 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-02-242-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-02-244-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-02-243-59/+9
| | | | | | 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-02-215-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-02-211-0/+12
|
* man: update cachesettings option descriptionDavid Teigland2022-02-161-6/+7
| | | | to be more consistent with man page description
* man lvmcache: add more writecache cachesettings infoDavid Teigland2022-02-161-12/+39
|
* dev_manager: use list info for preset devsZdenek Kabelac2022-02-161-8/+14
| | | | | In some cases we can also use cached info obtained from DM_DEVICE_LIST also to avoid extra ioctl check for present devices.
* dev_manager: do not query for open_countZdenek Kabelac2022-02-161-1/+1
| | | | Oepn count is not used along this code path.
* clang: possible better compilation with musl cZdenek Kabelac2022-02-161-0/+1
| | | | | | Try to help resolving reported compilation problem with clang & musl C. https://github.com/lvmteam/lvm2/issues/61
* clang: add extra checkZdenek Kabelac2022-02-161-1/+1
| | | | Make clang happier.
* dev_manager: failing status is not internal errorZdenek Kabelac2022-02-161-1/+1
| | | | | | | Different target type for LV it's not an internal error. i.e. when target type is replaced with 'error' type - it should be reported as regular warning and not cause interruption of command with internall error.
* dev_manager: fix dm_task_get_device_listZdenek Kabelac2022-02-161-1/+7
| | | | | | | | | With very old version of DM target driver we have to avoid trying to use newuuid setting - otherwise we get error during ioctl preparation phase. Patch is fixing regression from commit: 988ea0e94c79a496f2619eab878fd9db6168711d
* tests: skip vgchange-pvs-online.sh on rhel5David Teigland2022-02-151-0/+3
| | | | the /dev/mapper/ paths to test devices don't seem to work there
* devices file: do not clear PVID of unread devicesDavid Teigland2022-02-104-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.)
* tests: udev-pvscan-vgchange fix service waitDavid Teigland2022-02-071-14/+1
| | | | | | | As a result of removing -r from systemd-run in commit fbd8b0cf43dc67f51f86f060dce748f446985855 this test needs to change how it handles the transient services.