summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* label_scan: add new implementation for async and syncdev-dct-new-scan-10David Teigland2017-10-243-57/+957
| | | | | | | | | | | | | | | This adds the implementation without using it in the code. The code still calls label_read() on each individual device to do scanning. Calling the new label_scan() will use async io if async io is enabled in config settings. If not enabled, or if async io fails, label_scan() will fall back to using synchronous io. If only some aio ops fail, the code will attempt to perform synchronous io on just the ios that failed. Uses linux aio system calls, not the posix wrappers which are messier and may not have all the latest linux capabilities.
* command: add settings to enable async ioDavid Teigland2017-10-244-0/+53
| | | | | There are config settings to enable aio, and to configure the concurrency and read size.
* io: add low level async io supportDavid Teigland2017-10-2410-0/+458
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The interface consists of: - A context struct, one for the entire command. - An io struct, one per io operation (read). - dev_async_context_setup() creates an aio context. - dev_async_context_destroy() destroys an aio context. - dev_async_alloc_ios() allocates a specified number of io structs, along with an associated buffer for the data. - dev_async_free_ios() frees all the allocated io structs+buffers. - dev_async_io_get() gets an available io struct from those allocated in alloc_ios. If none are available, it will allocate a new io struct if under limit. - dev_async_io_put() puts a used io struct back into the set of unused io structs, making it available for get. - dev_async_read_submit() start an async read io. - dev_async_getevents() collect async io completions.
* tests:check lvconvert with /dev in vglvnameZdenek Kabelac2017-10-241-0/+8
|
* lvconvert: fixing extraction of vgnameZdenek Kabelac2017-10-242-69/+39
| | | | | | | | | | | | | | | | | Correction to function for extracting vgname out of lvconvert parameters. Avoid repeating some checks. Add code to handle generic options which may provide vgname in its argument and compare them all so they match to a single vgname (otherwise it's a error). Extract default (envvar) vgname only when no position nor optional vgname is found. Fixing regression instroduce with patchset started with commit: 1e2420bca85da9a37570871cd70192e9ae831786 (2.02.169)
* fsadm: refactor resize_crypt functionOndrej Kozina2017-10-241-28/+32
| | | | | | | | | split resize_crypt function in two. a) Detect proper dm-crypt device type and count new --size value for cryptsetup resize command. b) Perform the resize
* fsadm: rename local variables to avoid confusionOndrej Kozina2017-10-241-11/+11
|
* test: add regression test for fsadm bugOndrej Kozina2017-10-241-2/+60
| | | | | | | the bug in LUKS grow/shrink decision in fsadm was masked due to fact that default LVM2 extent size was larger than LUKS1 default data offset for dm-crypt mapping. The new test address this bug.
* fsadm: fix bug in LUKS grow/shrink decision branchOndrej Kozina2017-10-241-1/+1
|
* fsadm: add luks specific error message for small devicesOndrej Kozina2017-10-241-0/+4
|
* tests: check stacked cache dataLV of thin-poolZdenek Kabelac2017-10-232-0/+84
|
* lvcreate: skip checking for name restriction for cachingZdenek Kabelac2017-10-232-1/+2
| | | | | | | | | | | | | lvcreate supports a 'conversion' when caching LV. This normally worked fine, however in case passed LV was thin-pool's data LV with suffix _tdata we have failed to early. As the easiest fix looks dropping validation of name when caching type is select - such name check will happen later once the VG is opened again and properly detect if the LV with protected name already exists and can be converted, or will be rejected as ambigiuous operation requiring user to specify --type cache | --type cache-pool.
* lvextend: detect stacked cache lv used for thinpoolZdenek Kabelac2017-10-232-1/+3
| | | | | Ensure, that cacheLV is not tried to be resize until full support is added.
* lvconvert: preserve names of converted LVZdenek Kabelac2017-10-232-11/+12
| | | | | When prompting and warning for conversion, remember initial LV names, so after conversion is finished, correct original names are printed.
* test: remove 'should's from test to test target status race fixHeinz Mauelshagen2017-10-191-8/+6
|
* liblvm: Move lib code used exclusively into metadata-liblvm.cAlasdair G Kergon2017-10-189-673/+727
| | | | Also remove some redundant function definitions from metadata.h.
* tidy: Add missing underscores to statics.Alasdair G Kergon2017-10-1837-362/+358
|
* libdm: fix typo in libdevmapper.pcZdenek Kabelac2017-10-182-1/+2
| | | | Fixing name for RT libraries and using RT_LIBS.
* lvmlockd: check error for sanlock access to lvmlock LVDavid Teigland2017-10-173-6/+18
| | | | | When the sanlock daemon does not have permission to access the lvmlock LV, make the error messages more helpful.
* device: Separate errors for dev not found and filtered.Alasdair G Kergon2017-10-175-4/+18
| | | | | | | | Replaced the confusing device error message "not found (or ignored by filtering)" by either "not found" or "excluded by a filter". (Later we should be able to say which filter.) Left the the liblvm code paths alone.
* tests: check external origin is monitoredZdenek Kabelac2017-10-161-0/+47
|
* thin: monitor also external originZdenek Kabelac2017-10-162-1/+9
| | | | | Add missing monitoring for external origin LVs and add -real suffix for UUID used for monitoring of external origin.
* configure: autoreconfMarian Csontos2017-10-161-26/+1
|
* replicator: remove the codeDavid Teigland2017-10-1322-1859/+7
| | | | | It has not been used in a long time and is not expected to be used further.
* Update WHATS_NEWMarian Csontos2017-10-131-2/+4
|
* lvcreate: allow 100%FREE creation of "--type mirror" to workHeinz Mauelshagen2017-10-121-0/+7
| | | | | | | | | | Fixes the following case with 3PVs and 3 legs "mirror" LV: # lvcreate -l100%FREE --type mirror -m2 vg3 Insufficient free space for log allocation for logical volume . Unable to allocate extents for mirror log. Related: rhbz1269533
* test: "Disable" lvconvert-raid-reshapeMarian Csontos2017-10-121-0/+5
| | | | | ...when running from ramdisk. This causes test failure, so it is kept on eyes.
* test: update fsadm-crypt to pass with legacy cryptsetupOndrej Kozina2017-10-111-41/+56
|
* fsadm: implement 'check' for a fs on top of LUKSOndrej Kozina2017-10-111-7/+16
|
* fsadm: fail 'check' explicitly on unsupported fs typeOndrej Kozina2017-10-111-2/+5
|
* fsadm: respect DM_DEV_DIR variableOndrej Kozina2017-10-111-3/+3
|
* activation: fix activation lockZdenek Kabelac2017-10-112-6/+13
| | | | | | | | | | | | | | | | | | | | | | Activation lock has a primary purpose to serialize locking of individual LV in case there is no other protecting mechanism for parallel execution. However in the case an activated LV is composed from several other LVs, noone should be able to manipulate with those LVs as well. This patch add a very 'naive' global VG activation locking in this case. In the future we may introduce smarter function detecting minimal closed graph components if this will appear as bottleneck Patch checks if the VG Write lock is held - in this case we do not need any more locking - command has exclusive access to VG. In case we have clustered VG and we are activating an LV which does not need other LVs - we also do not need any more locks. In all other cases take respective lock - for single LV - use lvid, for complex LVs use vgname.
* activation: fix locking resource name for activation lockZdenek Kabelac2017-10-112-2/+3
| | | | | | Avoid cutting away 1st. character for activation lock. Unlike with VG name locks like #orphan we should not cut-off 1st. characted from resource name.
* test: fsadm-crypt.sh fixesOndrej Kozina2017-10-101-4/+4
| | | | | use conservative 'luksOpen' command instead fix reiserfs tests on plain crypt devices
* fsadm: minor fixes for crypt supportOndrej Kozina2017-10-101-2/+2
| | | | | drop useless asterisk expansion enforce matching string prefix by adding ^
* test: add fsadm crypt testOndrej Kozina2017-10-101-0/+529
|
* fsadm: add support for crypt devicesOndrej Kozina2017-10-103-5/+146
|
* thin: Improve overprovisioning and repair warnings.Alasdair G Kergon2017-10-093-7/+12
|
* raid: cleanup raid4/5/6/10 validation checkHeinz Mauelshagen2017-10-091-4/+6
|
* raid: fix validation check for raid0 segment data_offset memberHeinz Mauelshagen2017-10-091-1/+1
| | | | Commit 2f754b73ffdaa95af4a6d703e31b76d4efbf7a36 missed one.
* lvcreate: fix region size on striped RaidLVsHeinz Mauelshagen2017-10-091-5/+12
| | | | | | | | | | | | | | | | Creating striped RaidLVs with lv size not divisible by region size caused the region size to be adjusted: # lvcreate --type raid5 -n region_check.32.00m_3 -i 3 -L 1g --nosync -R 32.00m raid_sanity Using default stripesize 64.00 KiB. Rounding size 1.00 GiB (256 extents) up to stripe boundary size <1.01 GiB(258 extents). WARNING: New raid5 won't be synchronised. Don't read what you didn't write! Using reduced mirror region size of 8.00 MiB Logical volume region_check.32.00m_3 created. Fix by not imposing "mirror" constraints on "raid". Resolves: rhbz1404007
* raid: fix validation checks for segment data_offset memberHeinz Mauelshagen2017-10-091-2/+2
| | | | | Commit 222e1e3acee399b0acf31565f784716d67c465a8 was not valuing special case of data_ofset member equal to 1.
* raid: return previous reshape space allocation properlyHeinz Mauelshagen2017-10-091-3/+5
| | | | Fix returning previous allocation of reshape space.
* man: regenerateAlasdair G Kergon2017-10-062-6/+11
|
* post-releaseAlasdair G Kergon2017-10-064-2/+8
|
* pre-releasev2_02_175Alasdair G Kergon2017-10-064-6/+11
|
* vgmerge: Fix intermediate metadata corruptionAlasdair G Kergon2017-10-066-8/+25
| | | | | | | | | | | vgmerge suffers from a similar problem to the one fixed in commit 8146548d25e9104f0d530d943290d448c1994c0a ("vgsplit: Fix intermediate metadata corruption.") When merging, splitting or renaming VGs, use a new PV status flag PV_MOVED_VG to mark the PVs that hold metadata with the old VG name and use this to provide PV-level granularity instead of incorrectly assuming all PVs in the VG are the same.
* dmeventd: ensure systemd service gets stopped on shutdownThomas Lamprecht2017-10-051-1/+2
| | | | | | | | | | | | | | | | | | | | Add these for dmeventd systemd unit (dm-event.service): Before: shutdown.target Conflicts: shutdown.target This will cause the dmeventd to be properly stopped at shutdown (after all the dmeventd clients unregistered their devices from monitoring) with dm-event.service's stop action (there's no direct action defined for the "stop" so systemd sends SIGTERM instead). Before, we let dmeventd to get killed only as part of the very last SIGTERM/SIGKILL for all the remaining processes late in the shutdown sequence so we may have missed some logs if dmeventd encountered an error during its shutdown (logging facilities are already off at this late time in shutdown sequence). Ref: https://www.redhat.com/archives/lvm-devel/2017-October/msg00000.html
* fsadm: add --helpZdenek Kabelac2017-10-052-1/+2
| | | | | Newer version of blockdev tool needs --help as the tool is no longer printing help without this option like it used to in past.
* dmeventd: schedule exit on breakZdenek Kabelac2017-10-052-5/+9
| | | | | | | | | | | | | | | | | | | | When dmeventd receives SIGTERM/INT/HUP/QUIT it validates if exit is possible. If there was any device still monitored, such exit request used to be ignored/refused. This 'usually' worked reasonably well, however if there is very short time period between last device is unmonitored and signal reception - there was possibility such EXIT was ignored, as dmeventd has not yet got into idle state even commands like 'vgchange -an' has already finished. This patch changes logic towards scheduling EXIT to the nearest point when there is no monitored device. EXIT is never forgotten. NOTE: if there is only a single monitored device and someone sends SIGTERM and later someone uses i.e. 'lvchange --refresh' after unmonitoring dmeventd will exit and new instance needs to be started.