2

Edit: Narrowed this down to virtfs mounts.

To jump to the question, mount says the partition is already mounted and umount says that the partition is already unmounted, and fsck agrees with mount. Cannot fsck, mount or umount the partition without a reboot.

Now for details. An ext4 filesystem for a backup partition on an LVM setup went dirty, so I'm attempting to fsck it.

I was able to unmount it without complaints, and confirmed with mount output; it's no longer mounted.

However, when I run the fsck I get complaints that the filesystem is in use:

root@server# fsck -M -C0 -fy /dev/mapper/vg_dr-lv_backup2
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
/dev/mapper/vg_dr-lv_backup2 is in use.
e2fsck: Cannot continue, aborting.

Meanwhile, nothing seems to be using the partition or the mount point:

root@server# lsof /dev/mapper/vg_dr-lv_backup2
root@server# fuser /dev/mapper/vg_dr-lv_backup2
root@server# lsof /backups/servername/backup2
root@server# fuser /backups/servername/backup2
root@server#

To be thorough:

root@server# lsof | grep backup2
root@server#

Yet fsck still complains that it is in use. Now the fun part; mount also thinks it's already mounted:

root@server# mount -v /dev/mapper/vg_dr-lv_backup2 /backups/servername/backup2/
mount: you didn't specify a filesystem type for /dev/mapper/vg_dr-lv_backup2
       I will try type ext4
mount: /dev/mapper/vg_dr-lv_backup2 already mounted or /backups/servername/backup2 busy

While the lsof / fuser output remains blank, and umount thinks it is not already mounted:

root@server# umount -v /dev/mapper/vg_dr-lv_backup2
Could not find /dev/mapper/vg_dr-lv_backup2 in mtab
umount: /dev/mapper/vg_dr-lv_backup2: not mounted

Without a way to force it to check a 'mounted' filesystem I am forced to reboot, however I cannot help but think there is simply something I'm missing.

One more thing I tried was using findmnt:

root@server# findmnt | grep backup2
root@server#

I am very open to suggestions.

  • 1
    It's not mounted, but something has the image file open. Try fuser -mv /dev/mapper/vg_dr-lv_backup2 to find the PID holding it open. Is this works I'll write it up for an answer. – roaima Apr 16 '18 at 18:29
  • same empty response as fuser /dev/mapper/vg_dr-lv_backup2 – Adam Apr 16 '18 at 19:32
  • Try umount -lf ? It's my pancea for unmounting problems, it basically just waits until it can unmount then does. – Some Linux Nerd Apr 16 '18 at 20:59
  • fwiw, I found that waiting (sometimes up to 2 days), eventually the partition 'let go'. i'm still at a loss to understand this, or how to find out what's going on, which was the original reason for this question. – Adam May 13 '18 at 2:59
  • Found a reliable way to get it to release the filesystem. Turns out it was a mess of virtfs mounts (hundreds). Clearing those out has always allowed the fsck to continue. Curious why lsof, fuser ect didn't show those. – Adam May 14 '18 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.