summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* filter: use wwid for mpath filterdev-dct-stable-filter-wwidDavid Teigland2019-08-225-7/+181
|
* exported_symbols: comment old symbolsZdenek Kabelac2019-08-073-2/+3
| | | | | | | | | | | | | | | Fix versioning for updated symbols dm_stats_create_region and dm_stats_create_region. Only the latest symbol should have global entry. Since I'm not sure what is currenlty the best option for old symbols - we added support for easy commenting of them (so we do not lose information when the symbol appeared for the first time.) Note: some old already deleted symbols should have been restored as comments.
* make: support comments in exported symbolsZdenek Kabelac2019-08-071-3/+3
| | | | | Now the lines starting with '#' in exported symbols files are treated as comments (ignored).
* vgchange: don't fail monitor command if vg is exportedDavid Teigland2019-07-311-0/+2
| | | | | | | | | When monitoring, skip exported VGs without causing a command failure. The lvm2-monitor service runs 'vgchange --monitor y', so any exported VG on the system would cause the service to fail.
* WHATS_NEW: fix large physical block sizeDavid Teigland2019-07-301-0/+1
|
* tests: large-physical-sector-sizeDavid Teigland2019-07-301-0/+43
|
* Fix rounding writes up to sector sizeDavid Teigland2019-07-254-8/+168
| | | | | | | | | | | | | | | | Do this at two levels, although one would be enough to fix the problem seen recently: - Ignore any reported sector size other than 512 of 4096. If either sector size (physical or logical) is reported as 512, then use 512. If neither are reported as 512, and one or the other is reported as 4096, then use 4096. If neither is reported as either 512 or 4096, then use 512. - When rounding up a limited write in bcache to be a multiple of the sector size, check that the resulting write size is not larger than the bcache block itself. (This shouldn't happen if the sector size is 512 or 4096.)
* vgrename: use global lockDavid Teigland2019-07-221-0/+5
| | | | | Should fix a reported problem of pvs seeing bad orphan info while vgrename was running.
* lvconvert: allow --stripes/--stripesize in 'mirror' conversionsHeinz Mauelshagen2019-07-081-3/+1
| | | | | | | | | | | This allows the creation of a striped mirror leg(s) during upconvert by adding lvconvert command line options --stripes/--stripesize for 'mirror' to tools/command-lines.in. In case multiple mirror legs are being added, all will have the same requested striped layout. Resolves: rhbz1720705
* tests: add settle wait before issue removeZdenek Kabelac2019-07-061-0/+1
| | | | | | | | | | Some older BB with older cryptsetup tool do not 'retry' on remove and when remove is issued right after 'fsck' - it might be rejected with: Device @PREFIX@-tcrypt2 is busy. Try to use udevadm settle.
* tests: fsadm-crypt.sh update mkfs parameterDavid Teigland2019-07-061-5/+5
| | | | mkfs.xfs was rejecting previously working value
* tests: split argsZdenek Kabelac2019-07-061-1/+1
| | | | Here we want args to be splited into individual strings.
* tests: use luks1 for testZdenek Kabelac2019-07-061-1/+8
| | | | | | Since we do not need anywhere luks2 - pick older format which does not require password for resize to keep the rest of test unmodified.
* tests: raise minsize of xfsZdenek Kabelac2019-07-061-1/+1
| | | | mkfs.xfs now needs at least ~1600...
* cov: avoid recursive self-inclusionZdenek Kabelac2019-07-061-1/+3
| | | | | Include: toolcontext.h -> dev-type.h -> label.h -> toolcontext.h Replace with struct predeclaration.
* cov: release iterator on error pathZdenek Kabelac2019-07-061-3/+6
| | | | Another missed release on error path.
* gcc: clean uninitialized var warningZdenek Kabelac2019-07-061-1/+1
| | | | | Some older gcc versions shows this (FP) warning: label/label.c:360: warning: â€sector’ may be used uninitialized in this function
* gcc: cleanup warning of shawhing a global dclrZdenek Kabelac2019-07-062-3/+3
| | | | | misc/lvm-globals.c:76: warning: declaration of â€use_aio’ shadows a global declaration misc/lvm-globals.h:63: warning: shadowed declaration is here
* libdm: implement search for device names for older kernelsZdenek Kabelac2019-07-061-1/+119
| | | | | | | Kernels <2.6.27 don't have /sys/dev dir - add code for looking out device name via longre seach in /sys/block This makes commands like 'dmsetup dep -o blkdevname' working.
* udev: do not overwrite ID_MODEL in 69-dm-lvm-metad.rulesPeter Rajnoha2019-07-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | We've been assigning this in 69-dm-lvm-metad.rules: ENV{ID_MODEL}="LVM PV $env{ID_FS_UUID_ENC} on /dev/$name" This was for the description to appear for each systemd device unit representing this device, for example: $systemctl -a | grep "LVM PV" dev-block-252:2.device loaded active plugged LVM PV JhxC7B-YTgk-3jIU-5GVo-c4gV-W8t3-UUz06p on /dev/vda2 2 dev-disk-by\x2did-lvm\x2dpv\x2duuid\x2dJhxC7B\x2dYTgk\x2d3jIU\x2d5GVo\x2dc4gV\x2dW8t3\x2dUUz06p.device loaded active plugged LVM PV JhxC7B-YTgk-3jIU-5GVo-c4gV-W8t3-UUz06p on /dev/vda2 2 ... However, there could be an actual ID_MODEL that people are interested in more than the fact that this is an LVM PV and so we shouldn't overwrite the value. Also, we already have a symlink /dev/disk/by-id/lvm-pv-uuid-<PV_UUID> created which is then reflected as device unit (all device's symlinks have systemd device unit representation) so we can still reach this information in systemd unit listings even without setting the ID_MODEL. Reported here: https://github.com/lvmteam/lvm2/issues/21
* pvremove/vgextend: fix using device aliases with lvmetadDavid Teigland2019-06-261-0/+9
| | | | | | These commands were looking for the requested device alias before dev_cache_scan had created the list of devs on the system, so they would fail and report the dev wasn't found.
* cov: remove unused headersZdenek Kabelac2019-06-259-9/+0
|
* cov: ensure cname exists before derefering itZdenek Kabelac2019-06-251-3/+3
| | | | | Just make it clear to analyzers cname can't be NULL. TODO: maybe exclude NULL at front of the function...
* cov: validate pagesize is not negativeZdenek Kabelac2019-06-251-0/+5
| | | | As _init_free_list() cannot accept negative numbers
* cov: clearer condition checkZdenek Kabelac2019-06-251-1/+6
| | | | Make the code more obvious.
* cov: add stack tracing for error pathsZdenek Kabelac2019-06-254-5/+10
| | | | Add missing stack reports on error paths.
* cov: check for socket_path being setZdenek Kabelac2019-06-251-1/+1
| | | | | As we check for existince on entering path let's ensure it's there also on exit path.
* cov: check lv_infoZdenek Kabelac2019-06-251-4/+5
| | | | Use lv_info results only when valid.
* cov: check result of dev_get_block_sizeZdenek Kabelac2019-06-251-1/+4
|
* cov: check result of dev_read_bytesZdenek Kabelac2019-06-251-2/+12
|
* cov: release iterator on error pathZdenek Kabelac2019-06-251-1/+4
|
* cov: unlock lvm2 mutex on error pathZdenek Kabelac2019-06-251-0/+1
| | | | | Add missing unlock call on theretical error path where we would be missing our configured command.
* tests: for cluster always use exlusive mirrorsZdenek Kabelac2019-06-211-5/+5
| | | | So to check the reason of failure is not influenced by missing cmirrord.
* tests: accept also value 512Zdenek Kabelac2019-06-201-1/+2
| | | | Older kernels provide fixed value 512 instead of 0.
* tests: properly enforce v1Zdenek Kabelac2019-06-201-2/+2
| | | | | Since with smq policy we can still pick format v2 - enforce format v1 explicitely.
* tests: drop unwanted backupZdenek Kabelac2019-06-201-1/+0
|
* tests: for cluster testing we always need exclusive mirrorsZdenek Kabelac2019-06-201-1/+1
| | | | | Cluster test would fail without exlusively activated mirror. FIXME: test is still broken, since LV2 is not active after split.
* tests: check for installed time commandZdenek Kabelac2019-06-201-1/+2
| | | | | If the /usr/bin/time command is not installed, skip test (do not want to use shells' built-in).
* tests: update resize valueZdenek Kabelac2019-06-201-1/+1
| | | | | Since we now properly extend also _pmspare - there was not enough free space to add 8extents to both volumes.
* tests: simplify some var settingsZdenek Kabelac2019-06-2013-25/+3
| | | | scan_lvs now automatically comes with extend_filter_LVMTEST
* aux: fix selecting lvmconf valuesZdenek Kabelac2019-06-201-1/+1
| | | | | | | | | | | | | For older bashes (i.e. rhel5) code can't use internal bash arrays and uses old-school greps and sorts to create configuration file. But the split of value was mismatching names with same prefix so i.e. devices/scan devices/scan_lvs was matching always the later one - fix this by expecting whitespace or '=' after the name.
* Revert "lvconvert: disable linear to mirror of active LV in cluster VG"David Teigland2019-06-191-11/+0
| | | | | | | | This reverts commit 8623e336513c6ac6fcb24aa7e2ef10b8a3a36c59. The problem this was avoiding now seems to be fixed by commit d6bce036155ae973c869bdce3ca5f824f933f599 mirror: fix monitoring change
* tests: check mirror with clvmd and dmeventdZdenek Kabelac2019-06-191-0/+41
|
* tests: fix ra checkingZdenek Kabelac2019-06-192-5/+15
| | | | | Since with some installed package like 'tuned' the value of 'RA' on PV origin device can be different, adapting tests to count with this.
* tests: replaces grep -q usageZdenek Kabelac2019-06-191-6/+6
| | | | | | | | | | | Since we use 'set -euE -o pipefail' for shell execution, any failure of any command in the 'piped' shell can result in failure of whole executed chain - resulting in typically unsually test skip, that was left unnoticed. Since checked command have usually short output, the simplest fix seems to be to let grep parse whole output instead of quiting after first match.
* mirror: fix monitoring changeZdenek Kabelac2019-06-191-2/+2
| | | | | | | | | | Commit a8921be641afe865c177e11b8859f4b937f76995 was supposedly a fix for unwanted table reload - however before final commit, the tiny change has been made that was believed to be an enhancment of original prepared patch. Unfortunatelly the function locking_is_clustered is not meant to be an equivalent test of original function. Drop this change and using original patch.
* lvconvert: disable linear to mirror of active LV in cluster VGDavid Teigland2019-06-141-0/+11
| | | | | | | Avoid bug 1711427 in which an exclusively active linear LV in a clustered VG, when upconverted to a mirror, will mistakenly use a userspace/cmirror log in _add_log() beause laopts.exclusive is not set.
* lvmcache: remove unused_duplicate_devs list from cmdDavid Teigland2019-06-063-10/+9
| | | | | | | | | Save the previous duplicate PVs in a global list instead of a list on the cmd struct. dmeventd reuses the cmd struct for multiple commands, and the list entries between commands were being freed (apparently), causing a segfault in dmeventd when it tried to use items in cmd->unused_duplicate_devs that had been saved there by the previous command.
* tests: check no_discard_passdownZdenek Kabelac2019-06-051-0/+45
| | | | Check reporting works
* tests: automatically set scan_lvs when using extend_filterZdenek Kabelac2019-06-051-1/+1
| | | | When using 'aux extend_filter' we always want to use LV as PV.