| Version 10 (modified by SamK, 4 years ago) (diff) |
|---|
Live Storage Space Resize
When you originally installed the system, the disk space used was appropriate for your requirements at that time. Since then, those requirements have changed; the number of system files, or data files have grown to the point where the amount of storage space has to be increased.
The recommended way of installing eBox allocates the storage space using LVM to create logical volumes inside a volume group. One of the benefits of LVM is its ability to conduct a 'hot-resize' of any or all of the volumes within the group. The following examples show you how to resize the volumes without server downtime or interrupting the service to your users.
Growing the Logical Volume root and ext3 File System by 1.0GB
Verify the current size of the logical volume root (see Size column):
% df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ebox-root
4.0G 749M 3.1G 20% /
Verify the volume group ebox contains sufficient free space to extend the logical volume root (see VG and VFree columns):
% vgdisplay -C VG #PV #LV #SN Attr VSize VFree ebox 1 3 0 wz--n- 19.75G 11.25G
Extend the logical volume root in the volume group ebox by 1.0GB:
% lvextend -L+1G /dev/ebox/root Extending logical volume root to 5.00 GB Logical volume root successfully resized
Extend the ext3 file system in the logical volume root:
% resize2fs /dev/ebox/root resize2fs 1.40.8 (13-Mar-2008) Filesystem at /dev/ebox/root is mounted on /; on-line resizing required old desc_blocks = 1, new_desc_blocks = 1 Performing an on-line resize of /dev/ebox/root to 1310720 (4k) blocks. The filesystem on /dev/ebox/root is now 1310720 blocks long.
Verify the new size of the logical volume root :
% df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ebox-root
5.0G 749M 4.0G 16% /
Growing the Logical Volume var and XFS File System by 1.0GB
Verify the current size of the logical volume var (see Size column):
% df -h /var/ Filesystem Size Used Avail Use% Mounted on /dev/mapper/ebox-var 4.0G 175M 3.9G 5% /var
Verify the volume group ebox contains sufficient free space to extend the logical volume root (see VG and VFree columns):
% vgdisplay -C VG #PV #LV #SN Attr VSize VFree ebox 1 3 0 wz--n- 19.75G 10.25G
Extend the logical volume var in the volume group ebox by 1.0GB:
% lvextend -L+1G /dev/ebox/var Extending logical volume var to 5.00 GB Logical volume var successfully resized
Extend the XFS file system in the logical volume var: :
% xfs_growfs /dev/ebox/var
meta-data=/dev/mapper/ebox-var isize=256 agcount=8, agsize=131072 blks
= sectsz=512 attr=0
data = bsize=4096 blocks=1048576, imaxpct=25
= sunit=0 swidth=0 blks, unwritten=1
naming =version 2 bsize=4096
log =internal bsize=4096 blocks=2560, version=1
= sectsz=512 sunit=0 blks, lazy-count=0
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 1048576 to 1310720
Verify the new size of the logical volume var :
% df -h /var Filesystem Size Used Avail Use% Mounted on /dev/mapper/ebox-var 5.0G 175M 4.9G 4% /var