Ext2online patch




















XFS file systems must be mounted to be resized and the mount-point is specified rather than the device name. Just like XFS the JFS file system must be mounted to be resized and the mount-point is specified rather than the device name. You need at least Version 1.

Some kernel versions have problems with this syntax 2. In this case you have to explicitly specify the new size of the filesystem in blocks. This is extremely error prone as you must know the blocksize of your filesystem and calculate the new size based on those units. Example: If you were to resize a JFS file system to 4 gigabytes that has 4k blocks, you would write:.

Extending a logical volume Prev Chapter Common Tasks Next. Extending a logical volume. Note You will still need to unmount the file system before running e2fsadm.

Known Kernel Bug Some kernel versions have problems with this syntax 2. Prev Up Next 8. Alternately, you may be able to use facilities in md or RAID facilities in the hardware, if you are not using a partition table.

It is not possible to do this by using the fdisk 8 family of tools to extend a partition while it is mounted at least the author has not been able to successfully do this. Because of the original design of the ext2 filesystem did not have online resizing in mind, there are certain limitations to the amount of resizing that can be done while the filesystem is mounted, if you haven't done any preparation for the resize.

The default block size for ext2 was 1k blocks until v1. With no filesystem preparation, it is always possible to resize to the next MB boundary for 1k filesystems, the next 2GB boundary for for 2k filesystems, and the next 16GB boundary for 4k filesystems. By using the ext2prepare 8 program on an unmounted filesystem, it is possible for ext2online to increase the size of a mounted ext2 filesystem to almost any size. The following example shows how to test ext2online with a spare partition.

First a filesystem of 32MB is created on the device, mounted, and the size is verified. The filesystem is then extended to fill the device the default action when no size is given , and the new size is verified.

Note that resizing a mounted filesystem is inherently dangerous and may corrupt filesystems, although no errors resulting in data loss have ever been reported to the author. In theory online resizing should work fine with arbitrarily large filesystems, but it has not yet been tested by the author on a filesystem larger than 11GB.

Use with caution. Backups are always a good idea, because your disk may fail at any time, you delete files by accident, or your computer is struck by a meteor.



0コメント

  • 1000 / 1000