summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* pvscan: recognize "pci" as a common symlink component in filtersdev-dct-pvscan-devlinks-2David Teigland2023-01-271-0/+2
| | | | | In case the filter strings don't include "/dev/disk", and only include "pci".
* vgchange autoactivation: skip regex filter containing symlinksDavid Teigland2023-01-276-46/+70
| | | | | | | | | | | | "vgchange -aay --autoactivation event" is called by our udev rule. When the udev rule runs, symlinks for devices may not all be created yet. If the regex filter contains symlinks, it won't work correctly. This command uses devices that already passed through pvscan. Since pvscan applies the regex filter correctly, this command inherits the filtering from pvscan and can skip the regex filter itself. See the previous commit b2d80db12e13 "pvscan: use alternate device names from DEVLINKS to check filter"
* pvscan: use alternate device names from DEVLINKS to check filterDavid Teigland2023-01-273-25/+38
| | | | | | | | | | | | pvscan --cache <dev> is called by our udev rule at a time when all the symlinks for <dev> may not be created yet (by other udev rules.) The regex filter in lvm.conf may refer to <dev> using a symlink name that hasn't yet been created, which would cause <dev> to not match the filter regex. The DEVLINKS env var, set by udev, contains all the symlink names for <dev> that have been or will be created. So, we add all these symlink names to dev->aliases, as if we had found them in /dev. This allows <dev> to be recognized by a regex filter containing a symlink for <dev>.
* lvresize: fail early if mounted LV was renamedDavid Teigland2023-01-264-0/+126
| | | | | | If a mounted LV is renamed, then fs resizing utilities will fail, so detect this condition and fail the command before any changes are made.
* Revert "lvresize: enable crypt resizing with --force"David Teigland2023-01-251-7/+3
| | | | | | | | | It looks like force was not being used to enable crypt resize, but rather to force an inconsistency between LV and crypt sizes, so this is either not needed or force in this case should have some other meaning. This reverts commit ed808a9b548ca59221d512bfb7ae581e8367fe50.
* Revert "makefiles: fix grep warning from make"dev-mcsontos-fix-make-rpmMarian Csontos2023-01-251-1/+1
| | | | | | This reverts commit 92199ad0b98586182a52e2f8cd82c06336e306f1. This breaks make rpm.
* lvresize: enable crypt resizing with --forceDavid Teigland2023-01-201-3/+7
| | | | | | | | Update previous commit "lvresize: only resize crypt when fs resize is enabled" to enable crypt resizing when --force is set and --resizefs is not set. This is because it's been allowed in the past and people have used it, but it's not a good idea.
* lvresize: only resize crypt when fs resize is enabledDavid Teigland2023-01-194-2/+37
| | | | | | | | | | | There were a couple of cases where lvresize, without --fs resize, was resizing the crypt layer above the LV. Resizing the crypt layer should only be done when fs resizing is enabled (even if the fs is already small enough due to being independently reduced.) Also, check the size of the crypt device to see if it's already been reduced independently, and skip the cryptsetup resize if it's not needed.
* makefiles: fix grep warning from makeZdenek Kabelac2023-01-161-1/+1
| | | | Remove unnecessary '\'.
* makefiles: comment out hiding dir enteringZdenek Kabelac2023-01-161-3/+4
| | | | | | While the output of building looks more polished, text editors fail to find source file from compile errors - so until we start to print all file with full paths - comment out this make build parameter.
* libdm: correcting ifdef possitionZdenek Kabelac2023-01-162-2/+6
| | | | Fix building without ioctl support.
* tests: vdo resizingZdenek Kabelac2023-01-161-0/+15
|
* vdo: resize requires active vdopool volumeZdenek Kabelac2023-01-161-0/+10
| | | | | ATM kernel VDO target does not handle resize of inactive VDO LVs so prevent users corrupting such LVs and require active such LVs.
* vdo: fix and enhance vdo constain checkingZdenek Kabelac2023-01-165-25/+89
| | | | | | | | Enhance checking vdo constains so it also handles changes of active VDO LVs where only added difference is considered now. For this also the reported informational message about used memory was improved to only list consuming RAM blocks.
* vdo: read live vdo size configurationZdenek Kabelac2023-01-165-0/+107
| | | | | | | | Introduce struct vdo_pool_size_config usable to calculate necessary memory size for active VDO volume. Function lv_vdo_pool_size_config() is able to read out this configuration out of runtime DM table line.
* vdo: check memory only in non critical sectionZdenek Kabelac2023-01-161-1/+3
| | | | | When we are actually resizing VDO device - we need to check size only in non-critical section - otherwise we are checking
* lvresize: use standard extent conversion functionZdenek Kabelac2023-01-161-1/+2
| | | | | We need to validate whether the requested resizing size can be expressed with given extent_size.
* fix typolilinjie2023-01-114-6/+6
| | | | | Signed-off-by: lilinjie <lilinjie@uniontech.com> (cherry picked from commit 81b1f5bc3bac0e2e9099b67162da7d1a4995c5f4)
* lvmlockd: Fix syntax error in previous commitMarian Csontos2023-01-111-1/+1
|
* lvmlockd: fix report of lv_active_exclusively for special lv typesDavid Teigland2023-01-103-23/+44
| | | | | | | | | | | | Cover a case missed by the recent commit e0ea0706d "report: query lvmlockd for lv_active_exclusively" Fix the lv_active_exclusively value reported for thin LVs. It's the thin pool that is locked in lvmlockd, and the thin LV state was mistakenly being queried and not found. Certain LV types like thin can only be activated exclusively, so always report lv_active_exclusively true for these when active.
* tests: vgimportclone with incomplete pv list and nomda pvDavid Teigland2023-01-051-1/+20
|
* vgimportclone: fix importing PV without metadataDavid Teigland2023-01-051-2/+4
| | | | | | If one of the PVs in the VG does not hold metadata, then the command would fail, thinking that PV was from a different VG. Also add missing free on that error path.
* tests: lvresize-fs-crypt using helper only for crypt devDavid Teigland2023-01-031-0/+25
|
* lvresize: fix cryptsetup resize in helperDavid Teigland2023-01-031-1/+1
| | | | | | | | typo used "cryptresize" as command name this affects cases where the file system is resized independently, and then the lvresize command is used which only needs to resize the crypt device and the LV.
* doc: fix typos in documentationSamanta Navarro2023-01-0328-61/+61
| | | | Typos found with codespell.
* post-releaseMarian Csontos2023-01-034-3/+9
|
* pre-releaseMarian Csontos2022-12-224-4/+4
|
* WHATS_NEW: updatev2_03_18Marian Csontos2022-12-221-0/+4
|
* pvscan: free unused device_idZdenek Kabelac2022-12-201-0/+2
| | | | Fix memleak in function.
* cov: use long type for time_t calcsZdenek Kabelac2022-12-201-2/+2
| | | | Some for y38k - calculations can handle 64b time_t.
* cov: fix buffer size usageZdenek Kabelac2022-12-201-1/+1
| | | | Count with extra 1 byte for buffer end '\0'.
* cov: remove unused header filesZdenek Kabelac2022-12-203-3/+0
|
* vdo: fix reader error pathZdenek Kabelac2022-12-201-1/+1
| | | | Nothing to be closed on this error path.
* lvextend: fix overprovisioning check for thin lvsDavid Teigland2022-12-151-2/+3
| | | | | | | | 18722dfdf4d3 lvresize: restructure code mistakenly changed the overprovisioning check from applying to all lv_is_thin_type lvs to only lv_is_thin_pool lvs, so it no longer applied when extending thin lvs. The result was missing warning messages when extending thin lvs.
* writecache: support settings metadata_only and pause_writebackDavid Teigland2022-12-087-1/+84
| | | | Two new settings for tuning dm-writecache.
* lvchange: handle unrecognized writecache settingDavid Teigland2022-12-081-0/+5
| | | | It was being ignored.
* device_id: fix segfault verifying serial for non-pvDavid Teigland2022-12-022-2/+83
| | | | | | | The recent change that verifies sys_serial system.devices entries using the PVID did not exclude non-PV devices from being checked. The verification code would attempt to use du->pvid which was null for the non-PVs causing a segfault.
* device_id: check return value of label_read_pvidDavid Teigland2022-12-011-2/+3
| | | | for covscan
* device_id: _get_devs_with_serial_numbers add missing freeDavid Teigland2022-12-011-7/+9
| | | | on malloc failure path
* device_id: add null id->name null checkDavid Teigland2022-12-011-2/+2
| | | | for covscan
* lvmcache: fix strncpy len for wwidDavid Teigland2022-12-011-5/+5
|
* lvmlockd: fix missing closedirDavid Teigland2022-12-011-1/+2
| | | | | in get_local_nodeid from recent lock purge feature: lvmlockd: purge the lock resources left in previous lockspace
* lvmdbusd: Add command_log_selection to command lineTony Asleson2022-11-291-16/+17
| | | | Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2145114
* lvmdbusd: Move get_error_msg to utilsTony Asleson2022-11-292-20/+20
| | | | Moving this so we can re-use outside of lvm_shell_proxy.
* lvmdbustest: Add test to ensure error collectionTony Asleson2022-11-291-0/+21
| | | | Recreates https://bugzilla.redhat.com/show_bug.cgi?id=2145114
* man: dmsetup concise format consitencyZdenek Kabelac2022-11-251-1/+1
| | | | Use <name> consistenly.
* dmsetup: fix udev event handling for createZdenek Kabelac2022-11-252-5/+10
| | | | | | | | | | | | | | | | | | | | With newer kernels (>5.13) DM_CREATE no longer generates uevent for DM devices without table. There are even no sysfs block device entries in such case, although device has asigned major:minor and it is being listed by 'dmsetup info'. So this patch calculates amount of 'table' lines and in case no table line comes from cmdline or stdin - waiting on cookie is avoided generically instead of disabling just case with option --notable - which then also skipped handling of an option --addnodeoncreate (which is however historical and should be avoided) As a result there should be no leaking udev cookies and endlessly waiting commands like this: dmsetup create mytestdev </dev/null
* configure: updateZdenek Kabelac2022-11-251-4/+107
|
* lvmpolld: fix `strerror_r` check for muslSam James2022-11-251-1/+1
| | | | | | | | | | | We can't assume that strerror_r returns char* just because _GNU_SOURCE is defined. We already call the appropriate autoconf test, so let's use its result (STRERROR_R_CHAR_P). Note that in configure, _GNU_SOURCE is always set, but we add a defined guard just in case for futureproofing. Bug: https://bugs.gentoo.org/869404
* configure: allow for overriding of `readelf`David Seifert2022-11-253-2/+4
| | | | | | | This allows users to use e.g. `llvm-readelf` on systems with binutils as default. Bug: https://bugs.gentoo.org/840628