On Sunday 22 March 2009 12:59:15 Jarry wrote:
> Are you sure? man resize2fs says:
>
> "...The resize2fs program will resize ext2 or ext3 file systems.
>   It can be used to enlarge or shrink an unmounted file system
>   located on device. If the filesystem is mounted, it can be used
>   to expand the size of the mounted filesystem, assuming the kernel
>   supports on-line resizing..."
>
> If I understand correctly, you can only extend ext3-partition
> with it. But shrinking must be done off-line, on unmounted fs...

Yes, and this is true for *any* filesystem. Some mature filesystems out there 
don't support resizing at all in any form.

Enlarging a filesystems on line is easy. Make the device holding it bigger, 
add new inodes, add inodes to the inode tree and Hey Presto! filesystem is 
bigger. It's quick as you are *guaranteed* that the new inodes are not in use 
until the resize ends.

Reducing is entirely different. You have to take inodes in use at the end of 
the filesystem, move them to somewhere else, fix the pointers in other inodes 
that point to them, repeat for all other inodes that will have to go away 
after the resize. Yuck. Tricky code :-)

You are going to have this problem with any inode-based filesystem, not just 
ext3.


-- 
alan dot mckinnon at gmail dot com

Reply via email to