1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

tests: implement umount in script

Since dmeventd no longer umounts thin devices, such logic
needs to be implemented by external script.
Add some very simple one for the start.
This commit is contained in:
Zdenek Kabelac 2017-01-21 17:37:53 +01:00
parent 47c11c7b1c
commit 1a2b88516b

View File

@ -42,6 +42,22 @@ export MKE2FS_CONFIG="$TESTDIR/lib/mke2fs.conf"
aux have_thin 1 0 0 || skip
aux lvmconf "dmeventd/thin_command = \"$PWD/testcmd.sh\""
# Simple implementation of umount when lvextend fails
cat <<- EOF >testcmd.sh
#!/bin/sh
echo "Data $DMEVENTD_THIN_POOL_DATA"
echo "Metadata $DMEVENTD_THIN_POOL_METADATA"
lvextend --use-policies $1 || {
umount --lazy "$mntdir" || true
umount --lazy "$mntusedir" || true
}
EOF
chmod +x testcmd.sh
aux prepare_dmeventd
# Use autoextend percent 0 - so extension fails and triggers umount...