summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* pvscan: check for exported vgdev-dct-pvscan-list-3David Teigland2021-03-261-0/+6
| | | | | earlier when creating online files so that it's ignored for --cache --listvg
* pvscan: udevoutput check for event_activation=0David Teigland2021-03-261-0/+6
| | | | to stop udev rule from doing any activation
* new udev and systemd autoactivationDavid Teigland2021-03-262-0/+89
| | | | | | udev rule calls pvscan directly which indicates if the VG can be activated. If so, the lvm-vgchange service is run, which runs vgchange -aay.
* logging: to the systemd journalDavid Teigland2021-03-269-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-269-99/+390
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. 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
* 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.
* tests: remove more file in teardonwZdenek Kabelac2021-03-241-0/+6
| | | | | | | | | | Our tests may result in producation of huge set of invalid links in /dev/disk directory depeding on version of udev and various kinds of failures. Also we happen to invoke some on-system pvscans generating local /etc/lvm/archive & backups - remove them when test is finished.
* tests: query info instead of tableZdenek Kabelac2021-03-241-6/+6
| | | | | No need to access table when we just check presence, so generate smaller error message about missing device.
* tests: this test has race in it depending on kernelZdenek Kabelac2021-03-231-1/+2
| | | | | | | Some kernel seems to keep 'lvextend' busy so long, that actual resize already happens. So ATM use 'should' until something better is invented.
* tests: aux clean DM on top of MDZdenek Kabelac2021-03-231-0/+10
| | | | | | Before cleaning MD, try to remove any DM on top such MD. Check is made through DM table check. Maybe parse /proc/mdstat for this???
* tests: wipefs with udev_waitZdenek Kabelac2021-03-231-2/+8
| | | | | | | | Try to synchronize with colliding udev. Also retry once if there is some failure with some sleep between next retry. Use oflag=direct for wipping without wipefs.
* tests: increase required versionZdenek Kabelac2021-03-231-1/+1
| | | | | Seems like version 1.13.2 remains crashing kernel - so increase the required version for this reshaping test.
* tests: use prefix for VG nameZdenek Kabelac2021-03-231-2/+2
|
* tests: ignore failure of zeroingZdenek Kabelac2021-03-231-1/+1
| | | | Older mdadm fails the command, when the signature is already gone.
* tests: use mirror throttlingZdenek Kabelac2021-03-231-2/+7
| | | | | | | Combination of throttling and slowed device is a bit faster. Also add FIXME about the mutliple spawn polling processing when activating invidual LV for a pvmove.
* tests: set default basic flavourZdenek Kabelac2021-03-231-1/+1
|
* tests: try to move more dateZdenek Kabelac2021-03-231-5/+5
| | | | Throttling was not helping with race - try to use more data.
* WHATS_NEW: updateZdenek Kabelac2021-03-231-0/+1
|
* tests: test needs to have playable locking dirZdenek Kabelac2021-03-231-0/+2
|
* tests: aux updatesZdenek Kabelac2021-03-231-6/+14
| | | | | Select unused md from /proc/mdstat Check for wipefs once.
* tests: enhance mdadm_createZdenek Kabelac2021-03-231-36/+31
| | | | | For older mdadm its hard to support new names - to simplify things keep using /dev/mdXXX name which is automatically selected.
* tests: set known locking dirZdenek Kabelac2021-03-231-0/+3
| | | | Tests running in the system may use locking dir of the system.
* make: add few more predef symbols for cflowZdenek Kabelac2021-03-221-1/+4
|
* configure: use rawhide versionZdenek Kabelac2021-03-222-10/+18
|
* tests: remove unused wait_md_createZdenek Kabelac2021-03-221-80/+0
|
* tests: avoid sleep on kill pathZdenek Kabelac2021-03-221-6/+4
| | | | Before sleeping, check if pid is still there.
* tests: convert to use mdadm_createZdenek Kabelac2021-03-221-10/+11
| | | | Flip usage from prepare_md_dev to mdadm_create.
* tests: more usage of new aux mdadm_createZdenek Kabelac2021-03-222-226/+59
| | | | Condense tests and use the new mdadm_create.
* tests: use mdadm supportZdenek Kabelac2021-03-222-822/+129
| | | | | | Use for testing new mdadm_create aux wrapper. Place functionality into a 2 pass loop - one for 'auto' other for 'start'. Share same tests between raid level 0 and level 1 version of raid.
* tests: new aux mdadm_createZdenek Kabelac2021-03-221-10/+81
| | | | | | | | | | | | Add generic wrapper for mdadm --create which takes normal 'mdadm' args - but allows us to handle differences of mdadm usage across various version of mdadm tool. Resulting MD device is availalble in $(< MD_DEV). Automatic cleaning is made through cleanup_md_dev Calling of mdadm_create cleans previous MD dev if it exists.
* tests: remove local changesZdenek Kabelac2021-03-221-12/+1
| | | | | | Use aux for preparing profile. Avoid playing with LVM_BINARY localy - we already preset this variable in lib/utils.
* tests: even more aggressive throttlingZdenek Kabelac2021-03-221-1/+1
| | | | | Try if the test gets slowed down with slower mirroring (1) or we would need something better to beat the race.
* tests: skip only portion of testZdenek Kabelac2021-03-221-11/+8
| | | | | Seems this kernel bug is taking more time to get it fixed, so skipping only failing portion of test and ending with WARNING.
* tests: more system defaults for installed testsZdenek Kabelac2021-03-221-5/+7
| | | | | | | | When testing installed binaries on system, use more 'built-in' predefined settings to usethem with their compiled-in values. Also it's better to use same locking dir so the system's pvscan is not unexpectedly interferring with test commands.
* tests: remove incorrect checkZdenek Kabelac2021-03-221-5/+2
| | | | | We would need to be check same status value - otherwise we can hit race in validating 2 different states.