mount

Troubleshooting device or resource busy

In order to extend an lvm partition, I had to unmount the mounted volume.

When I tried to umount the volume, it complained about device being busy.

When I tried to find the process using the device with, `fuser -m /dev/vg0/lv0` it returned nothing. So did a lazy umount with:

umount -l /dev/vg0/lv0

However, after extending the partition with lvextend and running e2fsck on the volume, it then complained that the device was still busy and failed to check the volume.

I then realized that most probably caused by nfs mounts. Once I stopped the nfs service, I was successfully able to check the volume.

Disable auto fsck

I have a huge external usb drive set to be auto-mounted during backup processes and did not want to run fsck on every mount. With the below setting it would completely turn off the auto fsck check.

# tune2fs -c 0 -i 0 </dev/partition>

However, I would highly suggest atleast doing a regular 6 months check if not doing manual fscks.

# tune2fs -c 0 -i 6m </dev/partition>

Comment