8.16. Resizing a Logical Volume

One of the most powerful features of LVM is its ability to enlarge or reduce existing logical volumes, even if they contain a filesystem. Webmin, however, only supports the resizing of ext2, ext3, reiserfs and jfs filesystems at the moment—logical volumes formatted with other filesystem types (such as xfs) cannot be resized without losing data. You must also unmount a logical volume before resizing it, and then remount afterwards—there is no way to resize a filesystem that is currently in use.

As would be expected, a logical volume can only be enlarged by the amount of free space in its volume group. When shrinking a logical volume containing a supported filesystem, its size cannot be reduced to less than the space occupied by files on the filesystem. Currently, jfs filesystems cannot be shrunk at all—they can only be enlarged.

The steps to follow for resizing a logical volume are:

1.
In the Disk and Network Filesystems module, make sure the logical volume is unmounted.

2.
On the main page of the Logical Volume Management module, click on its icon. This will take you to the volume editing form.

3.
Enter a new size in kB in the Volume size field. The size cannot be increased by more than the amount of free space in the volume group, or reduced to less than the space occupied by files on the filesystem, unless you plan to recreate the filesystem.

4.
Click the Save button. When resizing a volume containing an ext2, ext3, reiserfs, or jfs filesystem, you will be returned to the main page of the module as long as no problems are encountered.

If the filesystem could not be shrunk below the amount of space occupied by its files, however, an error page will appear offering you the option of resizing anyway. Clicking the Resize Logical Volume button will force a resize, but any files on the volume will be lost and you will need to re-create the filesystem.

If you are resizing a logical volume containing some other type of filesystem (such as xfs), or one whose contents are unknown to Webmin, a page asking you to confirm the resize will appear. If you click the Resize Logical Volume to go ahead, any filesystem on the volume will be lost and need to be created again.

5.
If the filesystem was resized successfully, you can remount it in the Disk and Network Filesystems module. Otherwise, you will need to recreate it as explained in Section 8.15 “Creating and Deleting a Logical Volume”.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.150.41