0935339 Fix unmounting for LVM images

Authored and Committed by jankratochvil 4 years ago
    Fix unmounting for LVM images
    
    After successfully-looking finish:
    /proc/mounts:/dev/mapper/fedora-root /tmp/root xfs rw,relatime,attr2,inode64,noquota 0 0
    lrwxrwxrwx 1 root root 7 Jun 25 09:56 /dev/mapper/fedora-root -> ../dm-2
    
    With debugging info:
    + sync
    + umount /dev/sdc3 /dev/sdc2 /dev/sdc1
    umount: /dev/sdc3: not mounted.
    umount: /dev/sdc1: not mounted.
    + '[' fedora '!=' '' ']'
    + vgchange -a n fedora
      Logical volume fedora/root contains a filesystem in use.
      Can't deactivate volume group "fedora" with 1 open logical volume(s)
    + rmdir /tmp/root /tmp/boot /tmp/fw
    rmdir: failed to remove '/tmp/root': Device or resource busy
    rmdir: failed to remove '/tmp/fw': No such file or directory
    
        
file modified
+1 -1