summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* scan: simplify md superblock checking codedev-dct-md-superblocksDavid Teigland2019-09-191-77/+62
|
* scan: detect md ddf and imsm superblocksDavid Teigland2019-09-191-1/+104
|
* tests: check vdoZdenek Kabelac2019-09-171-6/+25
|
* vdo: enhance activation with layer -vpoolZdenek Kabelac2019-09-176-12/+45
| | | | | | | | | | | | | | | | | | | | | | | | Enhance 'activation' experience for VDO pool to more closely match what happens for thin-pools where we do use a 'fake' LV to keep pool running even when no thinLVs are active. This gives user a choice whether he want to keep thin-pool running (wihout possibly lenghty activation/deactivation process) As we do plan to support multple VDO LVs to be mapped into a single VDO, we want to give user same experience and 'use-patter' as with thin-pools. This patch gives option to activate VDO pool only without activating VDO LV. Also due to 'fake' layering LV we can protect usage of VDO pool from command like 'mkfs' which do require exlusive access to the volume, which is no longer possible. Note: VDO pool contains 1024 initial sectors as 'empty' header - such header is also exposed in layered LV (as read-only LV). For blkid we are indentified as LV with UUID suffix - thus private DM device of lvm2 - so we do not need to store any extra info in this header space (aka zero is good enough).
* thin: activate layer pool aas read-only LVZdenek Kabelac2019-09-172-0/+6
| | | | | | | | | | | | When lvm2 is activating layered pool LV (to basically keep pool opened, the other function used to be 'locking' be in sync with DM table) use this LV in read-only mode - this prevents 'write' access into data volume content of thin-pool. Note: since EMPTY/unused thin-pool is created as 'public LV' for generic use by any user who i.e. wish to maintain thin-pool and thins himself. At this moment, thin-pool appears as writable LV. As soon as the 1st. thinLV is created, layer volume will appear is 'read-only' LV from this moment.
* devices: crypto skipZdenek Kabelac2019-09-172-0/+3
| | | | Devices with UUID signature CRYPT-SUBDEV are internal crypto devices.
* tests: pool conversionZdenek Kabelac2019-09-171-0/+16
| | | | Test conversion of cached LV.
* lvconvert: improve validation thin and cache pool conversionZdenek Kabelac2019-09-172-5/+48
| | | | | Limit convertible LVs to thin-pool and cache-pools. Also fix return code on interal error path to return ECMD_FAILED.
* Revert "tests: drop unnecessary pid from LVMTEST prefix"David Teigland2019-09-161-1/+1
| | | | | | This reverts commit 51c105702f24d64f1adc25a692ef37e20878cec5. it seems the test system still needs this for some reason
* Revert "lvmlockd: use commonly used define NOTIFYDBUS_SUPPORT"David Teigland2019-09-162-8/+15
| | | | | | This reverts commit 71af650760c2b75b3c267277f47d8ba235421300. It disabled sd_notify() which broke 'systemctl start lvmlockd'.
* tests: drop unnecessary pid from LVMTEST prefixDavid Teigland2019-09-121-1/+1
|
* tests: don't change real test outputDavid Teigland2019-09-121-14/+0
|
* tests: metadata-zero-space more debuggingDavid Teigland2019-09-121-1/+1
|
* tests: unnecessary braces causes test failuresDavid Teigland2019-09-121-1/+1
|
* tests: skip some without wipefsDavid Teigland2019-09-125-0/+9
|
* tests: more debug in metadata-zero-spaceDavid Teigland2019-09-121-0/+2
|
* tests: use standard md devicesDavid Teigland2019-09-125-114/+169
|
* tests: metadata-zero-space add info for debuggingDavid Teigland2019-09-111-0/+3
|
* tests: skip without xxdDavid Teigland2019-09-112-8/+4
|
* tests: open-file-limit skip without prlimitDavid Teigland2019-09-111-0/+2
|
* tests: allow-mixed-block-sizes skip with older losetupDavid Teigland2019-09-111-0/+2
|
* tests: cache-single tests require version 1 10David Teigland2019-09-112-2/+2
|
* pvscan: allow use of noudevsync optionDavid Teigland2019-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | When pvscan is used to activate a VG via an asynchronous service (i.e. lvm2-pvscan), there is no requirement that the command wait for udev to create device nodes before returning. It's possible that waiting for udev is slow enough to cause the service running the command to time out. So, allow the --noudevsync option to be given to pvscan to skip waiting for udev. (This commit is not changing the lvm2-pvscan service itself to use --noudevsync.) Still unknown is whether there are any complex LV activation cases in which lvm itself requires access to a device node, in which case the udev wait could be needed by lvm itself. (When running an activation command directly from the command line, it's generally expected that the activated LVs are ready to use when the command is finished, so lvm waits for udev to finish creating the dev nodes.)
* lvchange: add --resync help/manual text relative to 'R' attributeHeinz Mauelshagen2019-09-061-0/+1
| | | | | | | Add information that --resync clears the 'R' attribute on not initially synchronized mirror/RAID LVs. Related: 1708299
* tests: metadata-bad-text.sh with lvmlockdDavid Teigland2019-09-051-0/+5
| | | | skip part of test that doesn't apply
* bcache: change log level for prefetch messageDavid Teigland2019-09-031-1/+1
| | | | | The "new new blocks" message was printed as an error but it's not an error condition.
* pvscan: avoid full scan for activationDavid Teigland2019-09-036-114/+568
| | | | | | | | | | | | | | | | | | | When an online PV completed a VG, the standard activation functions were used to activate the VG. These functions use a full scan of all devs. When many pvscans are run during startup and need to activate many VGs, scanning all devs from all the pvscans can take a long time. Optimize VG activation in pvscan to scan only the devs in the VG being activated. This makes use of the online file info that was used to determine the VG was complete. The downside of this approach is that pvscan activation will not detect duplicate PVs and block activation, where a normal activation command (which scans all devices) would.
* vgextend: check missing device during block size checkDavid Teigland2019-09-031-0/+3
| | | | | Checking the block size when a device is missing could trigger a segfault.
* fix segfault for invalid characters in vg nameDavid Teigland2019-08-291-1/+2
| | | | | | | | | | | Fixes a regression from commit ba7ff96faff0 "improve reading and repairing vg metadata" where the error path for a vg name with invalid charaters was missing an error flag, which led to the caller not recognizing an error occured. Previously, an error flag was hidden in the old _vg_make_handle function.
* hints: check for malloc failureDavid Teigland2019-08-281-1/+2
|
* hints: fix copy of filterDavid Teigland2019-08-281-11/+68
| | | | | | | | Only the first entry of the filter array was being included in the copy of the filter, rather than the entire thing. The result is that hints would not be refreshed if the filter was changed but the first entry was unchanged.
* fix duplicate pv size checkDavid Teigland2019-08-271-24/+0
| | | | | | | | | | | | | | | | | Fixes a segfault in the recent commit e01fddc57: "improve duplicate pv handling for md components" While choosing between duplicates, the info struct is not always valid; it may have been dropped already. Remove the code that was still using the info struct for size comparisons. The size comparisons were a bogus check anyway because it was just preferring the dev that had already been chosen, it wasn't actually comparing the dev size to the PV size. It would be good to use a dev/PV size comparison in the duplicate handling code, but the PV size is not available until after vg_read, not from the scan.
* Fix converting dbus.UInt types to stringVojtech Trefny2019-08-271-16/+19
| | | | | | | | | | | | | | | | | | | | With Python 3.8 converting these directly to string using str() no longer works, we need to convert these to integer first. On Python 3.8: >>> str(dbus.Int64(1)) 'dbus.Int64(1)' On Python 3.7 (and older): >>> str(dbus.UInt64(1)) '1' This is probably related to removing __str__ function from method from int (dbus.UInt is subclass of int) which happened in 3.8, see https://docs.python.org/3.8/whatsnew/3.8.html Signed-off-by: Vojtech Trefny <vtrefny@redhat.com>
* activation: use cmd pending mem for pending_deleteZdenek Kabelac2019-08-273-19/+23
| | | | | | | | | | | | | Since we need to preserve allocated strings across 2 separate activation calls of '_tree_action()' we need to use other mem pool them dm->mem - but since cmd->mem is released between individual lvm2 locking calls, we rather introduce a new separate mem pool just for pending deletes with easy to see life-span. (not using 'libmem' as it would basicaly keep allocations over the whole lifetime of clvmd) This patch is fixing previous commmit where the memory was improperly used after pool release.
* configure: continue build if prlimit is missingZdenek Kabelac2019-08-262-2/+14
|
* configure: check for prlimitZdenek Kabelac2019-08-264-3/+8
| | | | | | Update configure and make code compilable if prlimit() is not present. Since the code is suspicious do not cope yet with it's replacement with set/getrlimit().
* dmsetup: missed trailing newlineZdenek Kabelac2019-08-261-1/+1
|
* lv_manip: add synchronizationsZdenek Kabelac2019-08-264-3/+34
| | | | | | | | | | | | New udev in rawhide seems to be 'dropping' udev rule operations for devices that are no longer existing - while this is 'probably' a bug - it's revealing moments in lvm2 that likely should not run in a single transaction and we should wait for a cookie before submitting more work. TODO: it seem more 'error' paths should always include synchronization before starting deactivating 'just activated' devices. We should probably figure out some 'automatic' solution for this instead of placing sync_local_dev_name() all over the place...
* cache: improve vgremove loopZdenek Kabelac2019-08-262-0/+8
| | | | | | | | | | Support internal removal of 'cache origin' volume - which we do not normally expose to a user - however internal processing loops may hit this condition (depending on order of list LVs). So when this operation is internally requested - we automatically try to remove it's 'holding' LV (cache LV) - which will also remove the origin.
* snapshot: always activateZdenek Kabelac2019-08-261-7/+1
| | | | | | | | | Drop the 'cluster-only' optimization so we do resume ALL device before we try to wait on cookie before 'removal' operation. It's more correct order of operation - alhtough possibly slightly less efficient - but until we have correct list of operations 'in-progress' we can't do anything better.
* activation: extend handling of pending_deleteZdenek Kabelac2019-08-263-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | With previous patch 30a98e4d6710a543692d40d11428ae4baea11b7b we started to put devices one pending_delete list instead of directly scheduling their removal. However we have operations like 'snapshot merge' where we are resuming device tree in 2 subsequent activation calls - so 1st such call will still have suspened devices and no chance to push 'remove' ioctl. Since we curently cannot easily solve this by doing just single activation call (which would be preferred solution) - we introduce a preservation of pending_delete via command structure and then restore it on next activation call. This way we keep to remove devices later - although it might be not the best moment - this may need futher tunning. Also we don't keep the list of operation in 1 trasaction (unless we do verify udev symlinks) - this could probably also make it more correct in terms of which 'remove' can be combined we already running 'resume'.
* dmsetup: debug printZdenek Kabelac2019-08-202-0/+2
| | | | | | | Udev debugging is a bit tricky, so to more easily pair cookie ID, which is the lowest 16 bit - print cookie as hexa number. This simplify pairing of processed cookies while the 'higher bit flags' are changed for the same cookie.
* activation: add synchronization pointZdenek Kabelac2019-08-202-8/+13
| | | | | | | | | | | Resuming of 'error' table entry followed with it's dirrect removal is now troublesame with latest udev as it may skip processing of udev rules for already 'dropped' device nodes. As we cannot 'synchronize' with udev while we know we have devices in suspended state - rework 'cleanup' so it collects nodes for removal into pending_delete list and process the list with synchronization once we are without any suspended nodes.
* pvmove: add missing synchronizationZdenek Kabelac2019-08-202-0/+3
| | | | | | Between 'resume' and 'remove' we need to wait for udev to synchronize, otherwise udev may 'skip' resume event processing if the udev node is already gone.
* pvmove: correcting read_ahead settingZdenek Kabelac2019-08-202-13/+35
| | | | | | | | | | | | | | When pvmove is finished, we do a tricky operation since we try to resume multiple different device that were all joined into 1 big tree. Currently we use the infromation from existing live DM table, where we can get list of all holders of pvmove device. We look for these nodes (by uuid) in new metadata, and we do now a full regular device add into dm tree structure. All devices should be already PRELOAD with correct table before entering suspend state, however for correctly working readahead we need to put correct info also into RESUME tree. Since table are preloaded, the same table is skip and resume, but correct read ahead is now set.
* man lvmthin: remove nonexistent topicDavid Teigland2019-08-191-2/+0
|
* configure: Fix setting of CLDFLAGS defaultMarian Csontos2019-08-192-6/+6
|
* configure: Fix the default in help stringMarian Csontos2019-08-191-1/+1
|
* pvscan: disable sleeping and retrying for udevDavid Teigland2019-08-164-0/+23
| | | | | | When systemd is running pvscans, udev may not be entirely initialized, so the pvscan should not sleep and retry waiting for udev info.
* bcache: increase max allowed bcache sizeDavid Teigland2019-08-161-2/+2
| | | | from 128MB to 512MB (the default remains 8MB)