summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tests: add udev-pvscan-vgchangedev-dct-pvscan-list-6David Teigland2021-04-071-0/+221
| | | | uses real devices, tests udev rule and systemd unit
* add pvscan-udev-initrd.shDavid Teigland2021-04-011-0/+57
| | | | | | | | pvscan wrapper for use in the initrd lvm udev rule. Finds the intersection of complete VG/LVs reported by pvscan, and the VG/LVs specified on boot cmdline. The resulting VG or LVs are printed as env-vars that the udev rule can IMPORT, and pass to vgchange/lvchange.
* new udev and systemd autoactivationDavid Teigland2021-04-016-2/+99
| | | | | | | | | | | | | | | | | | new udev rule: 69-dm-lvm.rules . calls pvscan directly on the added device . pvscan output indicates if a complete VG can be activated . the complete VG name to activate is set in env var LVM_VG_NAME_COMPLETE . this replaces 69-dm-lvm-meta.rules new unit file: lvm-vgchange@.service . udev rule above starts this using systemctl start if LVM_VG_NAME_COMPLETE is set . the service runs vgchange -aay on the vg . this replaces lvm2-pvscan@.service
* logging: to the systemd journalDavid Teigland2021-03-319-1/+159
| | | | | | | | | | | | | Configure via lvm.conf log/journal or command line --journal. Possible values: "command" records command information. "output" records default command output. "debug" records full command debugging. Multiple values can be set in lvm.conf as an array. One value can be set in --journal which is added to values set in lvm.conf
* pvscan: add options listlvs listvg checkcompleteDavid Teigland2021-03-319-99/+422
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pvscan --cache <dev> . read only dev . create online file for dev pvscan --listvg <dev> . read only dev . list VG using dev pvscan --listlvs <dev> . read only dev . list VG using dev . list LVs using dev pvscan --cache --listvg [--checkcomplete] <dev> . read only dev . create online file for dev . list VG using dev . [check online files and report if VG is complete] pvscan --cache --listlvs [--checkcomplete] <dev> . read only dev . create online file for dev . list VG using dev . list LVs using dev . [check online files and report if VG is complete] . [check online files and report if LVs are complete] [--vgonline] can be used with --checkcomplete, to enable use of a vg online file. This results in only the first pvscan command to see the complete VG to report 'VG complete', and others will report 'VG finished'. This allows the caller to easily run a single activation of the VG. [--udevoutput] can be used with --cache --listvg --checkcomplete, to enable an output mode that prints LVM_VG_NAME_COMPLETE='vgname' that a udev rule can import, and prevents other output from the command (other output causes udev to ignore the command.) The list of complete LVs is meant to be passed to lvchange -aay, or the complete VG used with vgchange -aay. When --checkcomplete is used, lvm assumes that that the output will be used to trigger event-based autoactivation, so the pvscan does nothing if event_activation=0 and --checkcomplete is used. Example of listlvs ------------------ $ lvs -a vg -olvname,devices LV Devices lv_a /dev/loop0(0) lv_ab /dev/loop0(1),/dev/loop1(1) lv_abc /dev/loop0(3),/dev/loop1(3),/dev/loop2(1) lv_b /dev/loop1(0) lv_c /dev/loop2(0) $ pvscan --cache --listlvs --checkcomplete /dev/loop0 pvscan[35680] PV /dev/loop0 online, VG vg incomplete (need 2). VG vg incomplete LV vg/lv_a complete LV vg/lv_ab incomplete LV vg/lv_abc incomplete $ pvscan --cache --listlvs --checkcomplete /dev/loop1 pvscan[35681] PV /dev/loop1 online, VG vg incomplete (need 1). VG vg incomplete LV vg/lv_b complete LV vg/lv_ab complete LV vg/lv_abc incomplete $ pvscan --cache --listlvs --checkcomplete /dev/loop2 pvscan[35682] PV /dev/loop2 online, VG vg is complete. VG vg complete LV vg/lv_c complete LV vg/lv_abc complete Example of listvg ----------------- $ pvscan --cache --listvg --checkcomplete /dev/loop0 pvscan[35684] PV /dev/loop0 online, VG vg incomplete (need 2). VG vg incomplete $ pvscan --cache --listvg --checkcomplete /dev/loop1 pvscan[35685] PV /dev/loop1 online, VG vg incomplete (need 1). VG vg incomplete $ pvscan --cache --listvg --checkcomplete /dev/loop2 pvscan[35686] PV /dev/loop2 online, VG vg is complete. VG vg complete
* all: fix typosSamanta Navarro2021-03-3030-60/+60
|
* man: show config options with commentsZdenek Kabelac2021-03-301-2/+2
|
* man: describe profile support lvmcache.7Zdenek Kabelac2021-03-301-48/+112
| | | | | | Add missing description for profile usage with cache pool. List cache-pools as first option for dm-cache as it provides better performance and more functionality over cachevols.
* man: writecache missed for --typeZdenek Kabelac2021-03-305-11/+11
| | | | Add missing writecache type into man pages.
* libdm: use libdm header util.hZdenek Kabelac2021-03-302-1/+42
| | | | Avoid using lvm header for libdm build.
* device_mapper: remove unused linesZdenek Kabelac2021-03-303-119/+0
| | | | No need for versioning history in internal version.
* configure: support builds without versioningZdenek Kabelac2021-03-3010-16/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | Not all libc (like musl, uclibc dietlibc) libraries support full symbol version resolution in runtime like glibc. Add support to not generate symbol versions when compiling against them. Additionally libdevmapper.so was broken when compiled against uclibc. Runtime linker loader caused calling dm_task_get_info_base() function recursively, leading to segmentation fault. Introduce --with-symvers=STYLE option, which allows to choose between gnu and disabled symbol versioning. By default gnu symbol versioning is used. __GNUC__ check is replaced now with GNU_SYMVER. Additionally ld version script is included only in case of gnu option, which slightly reduces output size. Providing --without-symvers to configure script when building against uclibc library fixes segmentation fault error described above, due to lack of several versions of the same symbol in libdevmapper.so library. Based on: https://patchwork.kernel.org/project/dm-devel/patch/20180831144817.31207-1-m.niestroj@grinn-global.com/ Suggested-by: Marcin Niestroj <m.niestroj@grinn-global.com>
* tests: sleep tunningZdenek Kabelac2021-03-284-52/+16
| | | | | Check different sleep properties for lvmpolld. Use aux remove_dm_devs.
* tests: add aux remove_dm_devsZdenek Kabelac2021-03-281-0/+22
| | | | | Add function to remove DM devices and dies if some device can't be removed.
* tests: bash quotesZdenek Kabelac2021-03-286-630/+627
|
* tests: test_pv_symlinks works only with /dev dirZdenek Kabelac2021-03-281-0/+3
| | | | Skip test with LVM_TEST_DEVDIR != /dev
* tests: fix unfinished check for 4.18 kernelZdenek Kabelac2021-03-281-2/+2
|
* tests: ensure raid is synchronizedZdenek Kabelac2021-03-271-0/+2
|
* tests: reoder killing orderZdenek Kabelac2021-03-271-6/+6
| | | | | We need to stop pvmove while still in progress, so restart lvmpolld after pvmoving devices are gone
* tests: fight with losetup creation errorZdenek Kabelac2021-03-271-3/+14
| | | | Try losetup few times in loop if we can succeed.
* tests: restore removed prefixZdenek Kabelac2021-03-271-1/+1
| | | | During debugging this prefix was unintentionally lost, restore.
* tests: use known path for test in findZdenek Kabelac2021-03-271-1/+1
| | | | | Actually make sure which 'test' binary is executed. Since we used to have 'test' binary in tests.
* tests: for 4.18 use already 1.20 logicZdenek Kabelac2021-03-271-1/+4
| | | | | | | | Looks like there was some missed versioning increase during devel. So with kernel >= 4.18 version 1.19 is enough to look like 1.20 However backported 1.19 targets seems to not provide all the capabilities.
* tests: correct thin-pool versionZdenek Kabelac2021-03-271-1/+1
| | | | Use thin-pool target version 1.20 for changed behavior.
* tests: increase mirror throttlingZdenek Kabelac2021-03-271-1/+1
|
* tests: more skipped tests for lvmpolldZdenek Kabelac2021-03-263-2/+5
|
* tests: use shell commentZdenek Kabelac2021-03-261-5/+4
|
* tests: update dbus test_nestingZdenek Kabelac2021-03-261-5/+11
| | | | | | | | | Test has to use PV with suffix pv[0..9] otherwise it's ignored by test suite filter. Better fix for VG names to use prefix LVMTEST. Skip the test for runs without LVM_TEST_DEVDIR != /dev
* tests: update for newer thin-poolZdenek Kabelac2021-03-261-1/+16
| | | | Newer thin-pool handle metadata read-only recovery better.
* tests: use blkid without cachingZdenek Kabelac2021-03-263-23/+23
| | | | | Always use blkid without caching to avoid poluting cache stored in /run/blkid or /etc on older distros
* tests: use aux mdadm_assemble wrapperZdenek Kabelac2021-03-262-19/+4
|
* tests: add aux mdadm_assembleZdenek Kabelac2021-03-261-0/+16
| | | | Wrapper for slowed version of mdadm --assemble
* tests: better reporting of problematic servicesZdenek Kabelac2021-03-261-6/+6
|
* tests: skip more tests for lvmpolld passZdenek Kabelac2021-03-2611-21/+27
| | | | These test do not test polling, so skip them for lvmpolld pass.
* tests: add commented exampleZdenek Kabelac2021-03-261-0/+4
| | | | How to run individual test.
* tests: dbus updateZdenek Kabelac2021-03-261-5/+7
| | | | | | | | | | Always use PREFIX for vg header - all tests must use this prefix, VGs without are not allowed. Modify pv_symlink test - as the test was checking unsupportable combination - since lvm2 commands withing testsuite are only allowed to manipulate with /dev/mapper/LVMTESTXXXX path - nothing else allowed and fails on being filtered.
* tests: try to observe some unusual problemZdenek Kabelac2021-03-261-1/+1
| | | | Lets see, why it's very occasionaly able to active LV.
* tests: move setting of dmeventd pidZdenek Kabelac2021-03-261-2/+3
| | | | | | | | Added comment the 'lvs' already initiates dmeventd Note: we don't have any query mechanism to check if dmeventd is already running except access of socket which basically starts dmeventd if it's not running.
* tests: add basic validation of running servicesZdenek Kabelac2021-03-261-0/+12
| | | | | | | For determinist test results lvm2/dm service shall not be present and running in the system as it may randomize test results. In case they are found present, this test ends with warning (not failure).
* tests: add should for racy testZdenek Kabelac2021-03-261-1/+2
| | | | Depending on kernel, the race may or may not happen.
* tests: add workaround for older mdadmZdenek Kabelac2021-03-261-2/+14
| | | | | | | | Some older instancies of 'mdadm' opened legs in RW and closed and opened again and expected exlusive access. But here udev rule can be fired - so on these versions slow down whole mdadm runtime by using strace, to give system a bit more time to finish udev rule.
* tests: aux fix check_lvmpolld_init_rq_countZdenek Kabelac2021-03-261-4/+4
| | | | | | Make check_lvmpolld_init_rq_count() more compatible with older gawk, where some functionality was not working properly. Also change 'not not' condition.
* WHATS_NEW: updatesZdenek Kabelac2021-03-241-0/+2
|
* tests: improve check raid_leg_statusZdenek Kabelac2021-03-241-4/+13
| | | | | | | Enhance function to wait until raid status gets consisten (shifts from 0/xxxxx to something else) If it would took too long fail the check.
* tests: handle case of missing /dev/diskZdenek Kabelac2021-03-241-1/+3
| | | | | In case there is no symlink - udev can optimize /dev/disk away, thus find would fail in teardown.
* tests: check fsadm with missing filesystemZdenek Kabelac2021-03-241-0/+4
|
* fsadm: handle error from blkidZdenek Kabelac2021-03-241-1/+1
| | | | | | Fsadm wants to print its own error message when it can't detect type of the filesystem on a block device. Otherwise fsadm exits with no message on an unused block device.
* fsadm: fix condition when using --getsize64Zdenek Kabelac2021-03-241-1/+1
| | | | | | | When blocksize --getsize64 gives empty result we want to fallback to ancient --getsize * --getss calculation (RHBZ #1942486). Reported by: ajschorr@alumni.princeton.edu
* tests: ignore incosistent raid statusZdenek Kabelac2021-03-241-20/+31
| | | | | | Just like lvm command ignores 0/xxxx report from judging the status. Avoid using infinite loop and limit report checking to 100 checks. If it would need more - something is not right.
* tests: skip stray testing on real dev dirZdenek Kabelac2021-03-241-0/+5
| | | | Do not modify /dev dir maintained by udev.