[Cialug] LVM/ext3 problem
Zachary Kotlarek
zach at kotlarek.com
Mon Oct 22 21:51:57 CDT 2012
On Oct 22, 2012, at 7:30 PM, L. V. Lammert <lvl at omnitec.net> wrote:
> Have a serious problem with a LVM, .. we tried to extend the LVM onto a
> PV, but the resize2fs failed for some reason.
>
> Managed to rconfigure the VG without that physical volume, however the
> file system shows a size much greater than it is physically.
>
> Tried resize2fs with the old size, but it fails ("Can't read an block
> bitmap while trying to resize"); e2fsck also chokes as it complains
> about the invalid size in the superblock.
>
> Is anyone aware of a way TO set the proper filesystem size?
Generally speaking resize2fs is not designed to work in the situation you describe; when shrinking a file system it expects the underlying volume to be at least as large as the current filesystem. It's not clear how you got into this situation where that's not the case -- did your initial resize attempt somehow incorrectly increase the size of the filesystem beyond that of the volume? Did you reduce the size of the volume, or move the filesystem to a smaller volume, before the filesystem was resized?
Assuming there isn't actually anything useful beyond the current end of the volume It's possible the -f flag (force) will allow you to resize anyway, but I haven't looked at the e2fs internals to know exactly what checks that flag bypasses. You can also use the `debugfs` tool to directly manipulate the filesystem structures, but that's not where I would start if there are other options.
Zach
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2746 bytes
Desc: not available
URL: <http://cialug.org/pipermail/cialug/attachments/20121022/5ba5e8e2/attachment.bin>
More information about the Cialug
mailing list