Version 3 (modified by 6 years ago) (diff) | ,
---|
Increase file system size on Linux server
Filesystems residing in the logical volume manager can easily be grown, as long as there is free space in the volume group.
The my-gridfront case
my-gridstore1 is using the Linux iSCSI iitiator to mount iSCSI targets on mykonas4 and reexport these using NFSv4.
- Log on to mykonas4 and increase the size of the LUN for the iSCSI target used.
- Log on to my-mgridstore and run
sudo iscsiadm -m session -R
to rescan the iSCSI target in order for the system to pick up the increase in volume size.
- Grow the filesystem by running
sudo resize2fs /dev/sdX
where /dev/sdX is replaced with the device corresponding to the filesystem you want to increase the size of. N.B. /export/home1 is not always mounted on /dev/sdc, it varies from boot to boot, check with df or mount. If using multi pathing, they will be found as /dev/mapper/something.
In the case of local disks on the machine using lvm2 ===
This is for example the case of my-mgrid and heterobasidion, as well as all my-mgridN machines.
- Log in to the machine which has the data
- Run
sudo vgdisplay -C
to check that there is free space in the volume group
- Run
sudo lvextend -L +nnnG /dev/vg1/volume_name
to grow the logical volume
- Run
sudo resize2fs /dev/vg1/volume_name
to grow the filesystem in order to make the additional space available.
To list volumes and their sizes within a volume group use sudo lvdisplay -C vg1