Follow these steps to extend the file system of volume that is attached to a cloud instance.
It is recommended to unmount the volume before resizing the file system.
Before unmounting a volume, you should ensure that there are no running applications actively using the volume as this can result in data loss or corruption.
Steps
-
1
Unmount the volume first by using the following command:
sudo umount /mnt/myvolume
Replace /mnt/myvolume with the directory of the volume.
-
2
To prepare the volume for resizing, execute the following command:
sudo e2fsck -f /dev/myvolume
Replace /dev/myvolume with the name of your volume.
-
3
Next, use the following command to resize the file system on the volume:
sudo resize2fs /dev/myvolume
Replace /dev/myvolume with the name of your volume.
-
4
Once the resize operation is complete, you can remount the volume using the following command:
sudo mount /dev/myvolume /mnt/myvolume
Replacing /dev/myvolume with the name of your volume and /mnt/myvolume with your initial directory.
-
5
After resizing the file system and mounting it again, verify that the new size is reflected on the volume by running the following command:
sudo df -h
You can now access the additional storage space on your Cloud volume.