while file system?
I'm building a disk server for a small company. I'm using the standard "RAID-array-as-PV" setup, and planning to grow the filesystem as needs demand. I'd like to use a filesystem that supports online grow and online shrink.
XFS, JFS, and Reiser3 all support unlimited online grow but no shrink at all.
Looks like Ext3 supports online grow, but only up to +16 GB, which makes it useless on modern disks, much less arrays of modern disks.... Looks like offline grow & shrink are unlimited, which is good. Lots of old (unmaintained?) tools and kernel patches here, but lots of recent activity too. What's the current status?
Signature · 1 line
Sebastian Kuzminsky
Quoted 5 lines · Sebastian Kuzminsky
Looks like Ext3 supports online grow, but only up to +16 GB, which makes it useless on modern disks, much less arrays of modern disks.... Looks like offline grow & shrink are unlimited, which is good. Lots of old (unmaintained?) tools and kernel patches here, but lots of recent activity too. What's the current status?
Andreas Dilger's out-of-tree implementation of ext2/ext3 online resize allowed one to run ext2prepare in order to prepare the filesystem for much larger resizes. [The code can be found here: ext2resize.sf.net.] The ext2prepare(8) man page says:
The ext2prepare command modifies an unmounted ext2 filesystem on device so that ext2online(8) program can later resize the mounted filesystem to be at least as large as size although the actual maximum size will be some larger multiple of various
filesystem parameters. While ext2prepare must be run on
an unmounted filesystem, device does not have to currently be
as large as size. This allows one to later increase the
size of device and do the resize while the filesystem is mounted.
On the way toward kernel inclusion, a number of things changed, and some changes were made to e2fsprogs for compatibility.
The e2fsprogs-1.38 mke2fs(8) man page on Fedora Core 4, under the OPTIONS section, says:
resize=max-online-resize
Reserve enough space so that the block group descriptor table can grow to support a filesystem that has max-online-resize blocks.
You can easily test it with a huge sparse file, i.e.,
dd if=/dev/zero of=/tmp/image.bin bs=4K seek=500000000 count=1 # ~2TB mkdir /tmp/mnt
losetup /dev/loop0 /tmp/image.bin
mke2fs -b 4096 -j -E resize=2147483648 /dev/loop0 134217728 # 512GB, resize 8TB. mount /dev/loop0 /tmp/mnt
df /tmp/mnt
ext2online /tmp/mnt
df /tmp/mnt
Make sure that you have 20GB or so of space on partition where you create the image.bin.
Regards,
Bill Rugolsky
Quoted 2 lines · Sebastian Kuzminsky
XFS, JFS, and Reiser3 all support unlimited online grow but no shrink at all.
Where did you find that Reiser3 did not support shrinking? Unfortunately shrinking online is not supported, but offline shrinking is definately supported. Just look at resize_reiserfs(8). The man page is wrong it does support online growing quite well. The other good news about resize_reiserfs(8) is that the K|M|G mean the same as the K|M|G in LVM. So you can say resize_reiserfs -s -1G /dev/to/resize, then lvreduce -L -1G vgname/lvol. I haven't tested, but the same should be true for pvresize as well.
JFS does only support growing.
XFS only supports growing for now. There was a patch submitted back in September to the mailing list. It's current status is unknown to me.
Hope that helps a little,
Zac Slade