Resizing Debian sarge filesystems
From Smop.co.uk
Unfortunately filesystems created with sarge don't have the "resize_inode" flag in the filesystem and so cannot be resized online. New filesystems created with etch do (defaults to 1024* current size).
The recommended tool these days is "resize2fs" and that will only resize old sarge FS offline. However it is possible to convert sarge FS to have the flag set (tune2fs won't do it) - this post give some hints. The actual tool you need to use is the "ext2prepare" tool, not the "ext2resize" tool. This must be used offline, but you could set it to allow you to grow the current filesystem to 1024 times the current size, then later resize online as needed. Preparing a 50MB ext3 filesystem to become a 50GB filesystem caused an increase in overhead from 4126KiB to 4923K (4MB journal).
- umount /var
- fsck -f /dev/rootvg/var
- ext2prepare /dev/rootvg/var 50G
- mount /var
Whilst testing I discovered that it will not resize ext2, only ext3 filesystems (you can convert them using "tune2fs -j" and then remounting).
