summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* raid: more validation checks for RAID segmentsdev-lvmguy-more-validation-for-raidHeinz Mauelshagen2017-08-181-4/+43
| | | | Upgrade commit 222e1e3acee399b0acf31565f784716d67c465a8 with more checks.
* lvmlockd: zero extended lvmlock LVDavid Teigland2017-08-151-1/+41
| | | | | | | After the internal lvmlock LV (holding sanlock leases) is extended to hold more leases, it needs to be zeroed. sanlock expects to see either zeroed blocks or blocks initialized with leases.
* lvmlockd: reduce io impact for finding sanlock lv free lock offsetZhang Huan2017-08-152-3/+24
| | | | | | | | | | currently, lvcreate for sanlock find the free lock offset from the beginning of the lvmlock every time. after created thousands of lvs, it will issue thousands of read ios for lvcreate to find free lock offset. remeber the last free lock offset will greatly reduce the impact Signed-off-by: Zhang Huan <zhanghuan@huayun.com>
* test: pvcreate-bootloaderarea: pvcreate --restorefile --bootloaderarea not ↵Peter Rajnoha2017-08-151-3/+0
| | | | | | | supported anymore The fact that this combination is not supported anymore is tested already in pvcreate-operation.sh test.
* pvcreate: fix check for 2nd mda at end of disk fits if using pvcreate ↵Peter Rajnoha2017-08-153-21/+42
| | | | | | | | | | | | | | | | | | | | | | | --restorefile Fix code checking that the 2nd mda which is at the end of disk really fits the available free space and avoid any DA and MDA interleaving when we already have DA preallocated. This mainly applies when we're restoring a PV from VG backup using pvcreate --restorefile where we may already have some DA preallocated - this means the PV was in a VG before with already allocated space from it (the LVs were created). Hence we need to avoid stepping into DA - the MDA can never ever be inside in such case! The code responsible for this calculation was already in _text_pv_add_metadata_area fn, but it had a bug in the calculation where we subtracted one more sector by mistake and then the code could still incorrectly allocate the MDA inside existing DA. The patch also renames the variable in the code so it doesn't confuse us in future. Also, if the 2nd mda doesn't fit, don't silently continue with just 1 MDA (at the start of the disk). If 2nd mda was requested and we can't create that due to unavailable space, error out correctly (the patch also adds a test to shell/pvcreate-operation.sh for this case).
* raid: more validation checks for segment data_offset memberHeinz Mauelshagen2017-08-141-4/+6
| | | | Upgrade commit fb641c342343ac48cc623c8079900b1f4f395a69 with additional checks.
* pvcreate: Use maximum metadata area size with --restorefileAlasdair G Kergon2017-08-112-0/+10
| | | | | | If the PV was originally created with a larger-than-default metadata area the restored one wasn't and might not even be large enough to hold the metadata!
* pvcreate: Wipe cached bootloaderarea when wiping label.Alasdair G Kergon2017-08-113-6/+8
| | | | | | Previously the cache remembered an existing bootloaderarea and reinstated it (without even checking for overlap) when asked to write out the PV. pvcreate could write out an incorrect layout.
* pvcreate: Disallow --bootloaderareasize with --restorefile.Alasdair G Kergon2017-08-112-0/+3
| | | | | The backup file already holds the bootloader area details to use so don't overcomplicate things.
* commands: recognize lvm command -?David Teigland2017-08-091-1/+3
| | | | and interpret it as lvm command -h
* commands: recognize -? for helpDavid Teigland2017-08-091-2/+6
| | | | | It's not known when this last worked, but there has been documentation suggesting it worked, so enable it.
* lvmlockd: global name doesn't apply to sanlockDavid Teigland2017-08-071-1/+1
| | | | | When adopting locks, we shouldn't skip the special dlm global lockspace name when using sanlock.
* lvmlockd: fix lm running check during adoptionDavid Teigland2017-08-072-7/+5
| | | | | When trying to adopt locks in startup, we want to ignore a lock manager that isn't running, not fail.
* lvmconfig: Add options to produce file preambleAlasdair G Kergon2017-08-0511-46/+100
| | | | | Use --withgeneralpreamble and --withlocalpreamble instead of concatenating files.
* dmsetup: Add --concise to dmsetup create.Alasdair G Kergon2017-08-043-10/+316
| | | | | | | | Add the new concise format to dmsetup create, either as a single command-line parameter or from stdin. Based on patches submitted by Enric Balletbo i Serra <enric.balletbo@collabora.com>.
* ioctl: Allow minor without major.Alasdair G Kergon2017-08-042-5/+6
| | | | | There's no need to insist on a major number being supplied when the code's going to override it if it's wrong anyway.
* tests: update checked messageZdenek Kabelac2017-08-021-2/+2
|
* tests: update makefilesZdenek Kabelac2017-08-012-4/+4
|
* makefiles: add DEFS_$@ for cxxZdenek Kabelac2017-08-011-1/+1
| | | | | Add DEFS_$@ for c++ (used only by test suite...) Just to pair plain C build rules.
* makefiles: script executable missed dynamicZdenek Kabelac2017-08-011-1/+1
| | | | | Add missing ELDFLAGS when linking binary. Also pass CFLAGS for cases where we build code coverage compilation.
* makefiles: fix tested varsZdenek Kabelac2017-08-011-6/+6
| | | | | For resolving usability of DEBUG_MEM - check proper translated make vars for proper value.
* configure: tune BUILD_DMEVENTDZdenek Kabelac2017-08-015-21/+19
| | | | | | | | | | Drop 'DMEVENT' make variable and use BUILD_DMEVENTD like with other daemons. NOTE: by default we do not build dmeventd - maybe time to change as lot of build targets basically do need dmeventd... Switch to use SYSTEMD_LIBS and avoid linking systemd library with every linked tool when dbus notification are enabled. (TODO add missing testing for lib presence)
* configure: improve test for realtime clockZdenek Kabelac2017-08-016-18/+40
| | | | | | | | | | Check first if we need to even link -lrt - since clock functions are normally emebeded with recent glibc (>=2.17) Use standard RT_LIBS name. Avoid duplicate test for realtime clock with lvmlockd Show better error message when realtime clock support is missing or disabled. Link RT_LIBS explicitely with lvmlockd and lvmetad.
* tests: update makefileZdenek Kabelac2017-08-011-11/+4
|
* makefiles: cleanupsZdenek Kabelac2017-08-014-10/+9
|
* makefiles: fixing linkingZdenek Kabelac2017-08-0114-93/+63
| | | | | | | | | | | Avoid adding -g more then once for debug builds. Avoid enabling DEBUG_MEM when we build multithreaded tools. Link executables with -fPIE -pie and --export-dynamic LDFLAGS Introduce PROGS_FLAGS to add option to pass flags for external libs. Link lvm2 internally library only when really used. Link DAEMON_LIBS with daemons. Pass VALGRIND_CFLAGS internally Set shell failure mode on couple places.
* makefiles: use gcc warns with gcc onlyZdenek Kabelac2017-08-011-0/+2
| | | | Avoid passing 'gcc' warning options to non-gcc compiler
* makefiles: RT_LIBZdenek Kabelac2017-08-013-3/+3
| | | | | Link -lrt directly only with libdevmapper. All other users get dependency transiently.
* libdm: log_warnZdenek Kabelac2017-08-011-10/+10
| | | | | No real effect anyway - function returs '1' in all paths, but just make sure we do not have 'log_error()' on non-error path.
* man: fix generated pathsZdenek Kabelac2017-08-013-4/+6
| | | | Use user configured paths instead of some developers paths ;)
* thin: warn about too big chunks sizeZdenek Kabelac2017-08-013-6/+13
| | | | | | | lvm2 warned about zeroing and too big chunksize (>=512KiB), but only during lvconvert, so lvcreate was creating thin-pools without any warning about possible slowness of thin provisioning because of zeroing.
* toolcontext: Improve invalid units error message.Alasdair G Kergon2017-07-271-3/+4
|
* tools: Introduce exit code EINIT_FAILED.Alasdair G Kergon2017-07-264-7/+10
| | | | Replace -1 (reported as 255) by 4.
* dmsetup: Add minor number to concise table output format.Alasdair G Kergon2017-07-252-5/+4
| | | | | When using this new format for input, it'll sometimes help to be able to specify the minor number.
* make generateAlasdair G Kergon2017-07-253-69/+208
|
* dmsetup: Add concise table output format.Alasdair G Kergon2017-07-253-11/+69
| | | | | | | | | | | | | | | | | | | | | | Create a new table output format that concisely shows multiple devices on one line. dmsetup table --concise [device...] <dev_name>,<uuid>,<flags>[,<table>]*[;<dev_name>,<uuid>,<flags>[,<table>]*]* Table lines are separated by commas. Devices are separated by semi-colons. Flags is currently 'ro' or 'rw' (and might be extended in a yet-to-be-defined way in future). Any comma, semi-colon or backslash within a field is quoted by a preceding backslash. The format can later be supplied as input to dmsetup or even to the booting kernel as an alternative way to set up devices. Based on patches submitted by Enric Balletbo i Serra <enric.balletbo@collabora.com>.
* commands: expand comment on configuring option valsDavid Teigland2017-07-241-10/+38
|
* man: remove hyphen escapes from sourceDavid Teigland2017-07-241-43/+43
| | | | they are escaped by running sed in makefile
* vgchange: split out code for systemidDavid Teigland2017-07-244-52/+68
| | | | | Use the command definitions to separate the implementation of vgchange systemid from the rest of vgchange.
* vgchange: split out code for lockstart and lockstopDavid Teigland2017-07-244-67/+89
| | | | | Use the command definitions to separate the implementation of lockstop and lockstart from the rest of vgchange.
* vgchange: separate change locktype and allow recoveryDavid Teigland2017-07-245-237/+329
| | | | | | | | | | | | | | | | | | | | Add an independent command definition for "vgchange --locktype", and split the implementation out of the set of common metadata changes. It is unlike normal metadata changes, and can only be run by itself. (Changing the lock type is similar in principle to changing the VG name or the VG system ID; it effects the ability of any host to see or access the VG.) At some point this command lost the ability to forcibly change the lock type of a shared VG to "none" (making it a local VG). This can be necessary to repair shared VGs (e.g. recovery steps that occur in vg_read are disabled for shared VGs because they are not locked properly, or recovering sanlock locks when the PV holding them is lost.) "vgchange --locktype none --lockopt force VG" is used as the method of forcing the shared VG to become local so that it can be repaired.
* tidy: declaration names match implementationZdenek Kabelac2017-07-209-46/+46
| | | | | Put in sync some naming used for function declaration and actual in-code implementation.
* raid: reshape synchronization pointZdenek Kabelac2017-07-202-0/+14
| | | | | Give udev time to get in sync and give md-core time to wake up after table reload.
* post-releaseAlasdair G Kergon2017-07-204-2/+8
|
* pre-releasev2_02_173Alasdair G Kergon2017-07-204-6/+8
|
* raid: avoid lv_size compiler warningAlasdair G Kergon2017-07-201-2/+2
| | | | warning: declaration of ‘lv_size’ shadows a global declaration
* raid: move syncing with udev into functionZdenek Kabelac2017-07-202-7/+8
| | | | | | | | | | | | | Since _deactivate_and_remove_lvs() is used in more then one place, move the needed udev synchronization into this function so other users automatically get correct fs state before next dm manipulation. Assumption here is that this udev synchronization 'delay' may also prevent to 'early' table reloads which might cause kernel problems for md-core - but we may need more generic time-limited reload frequency for raid devices. Note: on udev-less system there will be almost no delay.
* tests: aus.sh fix md teardownZdenek Kabelac2017-07-201-5/+6
| | | | | | | Commit 8a912d6dbcc34ce2b76a0104c39de7aa0480c512 missed the wrong logic, we use 2 vars 'dev' & 'mddev' and their usage can't be mixed. So correctly separate them so mddev keeps name of MD device.
* tidy: drop unneeded castZdenek Kabelac2017-07-209-18/+17
| | | | Avoid casting to the same type.
* tidy: name all parametersZdenek Kabelac2017-07-201-1/+1
|