e2fsck

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.

Non-desctructive read-write badblocks disk check

Below command can be run on unmounted partitions to do a disk check of badblocks. Use -p if you need to automatically fix issues. Single "c" will only do a badblock read test.

e2fsck -vfcc -C 0 /dev/sdb4

"-C 0" -- displays progress
"v" -- verbose output
"f" -- force check
"cc" -- read-write test

Syndicate content
Comment