Online resizing of ext3 filesystems
The resize patch is conceptually quite simple. It simply adds one or more block groups which make use of extra space which, one hopes, is sitting there idle at the end of the existing filesystem. Once the block groups are hooked into the filesystem data structures, a simple ioctl() call or remount will make the space available. Behind this apparent simplicity, of course, is a significant amount of code which makes the resize operation happen on a modern, complex filesystem in a robust manner.
People wanting to try out resizing will need a few things:
- A kernel (such as 2.6.7-rc3-mm2) with the online resize patch
included.
- A patch to e2fsprogs to make use of the resize capability; it is
available from
the ext2resize SourceForge download area.
- Free disk space into which the filesystem can expand. Usually this
means that the filesystem should live in a device mapper partition which
can be expanded as well.
- A very good backup of your filesystem.
This patch and its associated documentation (or lack thereof) still require
some work before being ready for widespread deployment. Once they get
there, however, life should get easier for system administrators who,
throughout history, have routinely found out that all that "extra space"
they figured into their filesystems is never enough.
| Index entries for this article | |
|---|---|
| Kernel | Filesystems/ext3 |
| Kernel | Resizing filesystems |
(Log in to post comments)
Shrink too?
Posted Jun 18, 2004 7:41 UTC (Fri) by kbob (guest, #1770) [Link]
Does this code let you shrink filesystems on line, or just grow them? From the description, it sounds like it's growth only.K<bob>
Online resizing of ext3 filesystems
Posted Jun 18, 2004 20:59 UTC (Fri) by sbergman27 (guest, #10767) [Link]
I believe you can shrink or grow unmounted filesystems without the kernel patch. With the patch I believe that you can grow (but not shrink) mounted filesystems.
