chiark / gitweb /
Backup: No longer attempt to lvchange -a n the snapshot volume.
[chiark-utils.git] / backup / snap-common
index f6e788ab975a566f1c5dcad9ce4b17297eea798e..1806a71b3512720d00db6639559dbf35c0e2a2b6 100644 (file)
@@ -53,7 +53,7 @@ lvmdevice2vgroup () {
 lvmdropcore () {
        snmnt="$vardir/snap-mount"
        umount -v "$snmnt" || true
-       test ! -d "$snmnt" || rmdir -- "$snmnt"
+       test ! -d "$snmnt" || rmdir -- "$snmnt" || rm -f "$snmnt"
 
        set +e
        old_lv_dev="$(readlink $vardir/snap-device)"
@@ -62,7 +62,6 @@ lvmdropcore () {
 
        if [ $rc = 0 ]; then
                set +e
-               lvchange    $lvm_lvtools_opts -a n $old_lv_dev
                lvremove -f $lvm_lvtools_opts      $old_lv_dev
                set -e
                rm $vardir/snap-device