Unable to resize the filesystem ? Device or resource busy ?
Hi,
I tried to resize2fs after shrinking a lv & reduced it, then umounted the lv (with -l) but resize2fs still gives the same error.Also can't fsck after umounting the filesystem. I am able to umount the filesystem but while executing resize2fs or fsck, its giving error as, # resize2fs /dev/vg/lv1 resize2fs 1.41.12 resize2fs: Device or resource busy while trying to open /dev/vg/lv1 Couldn't find valid filesystem superblock. # e2fsck -f /dev/vg/lv1 e2fsck 1.41.12 /dev/vg/lv1 is in use. e2fsck: Cannot continue, aborting. Troubleshooting done : I found nothing in 1. lsof 2. fuser 3. nothing in netstat holding 2049 (this filesystem is exported via nfs) 4. Tried exportfs -ufv <host>:/test to unmount the shares but when tring to fsck or resize2fs, this gives the same error message. 5. No entry of share in /etc/mtab & /proc/mounts Any help or pointers ? |
Quote:
You must reduce the filesystem first before shrinking a lv (or real partition). If you are lucky you can simply resize the lv to be the same size as it was (or larger), then run fsck to see if the filesystem is still ok. Then resize the filesystem smaller, then the lv - being careful to make sure it is at least as large as the filesystem. |
I would advise using vgcfgrestore with the appropriate config file in /etc/lvm/archive/ to put that LV back in its previous state. That way you are assured that it gets the same extents that it was previously using. Depending on the history of that VG, just resizing the LV back to its old size might assign different extents, and that would not give you a working filesystem.
|
no, I had reduced the filesytem but my issue is as I am unable to execute the resize2f as some process might be using but did find any process.
resize2fs: Device or resource busy while trying to open /dev/vg/lv1 Couldn't find valid filesystem superblock. |
What they are telling you is that you did your steps in the wrong order. You should have reduced your file system first then the LV. Not in the order that you told us you have done.
|
All times are GMT -5. The time now is 12:07 PM. |