Amazon Web Services has announced –
The good news is, EBS modification process is also applicable for root volumes as well. Let’s learn how to do that.
use lsblk
to identify the volume information.
[surya ~]$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202:0 0 30G 0 disk └─xvda1 202:1 0 30G 0 part / xvdf 202:80 0 20G 0 disk /mnt └─xvdf1 202:81 0 10G 0 part
Now you can see that xvdf has been increased to 20 GB
now use file system specific commands to increase the volume size on the server.
for Linux ext2, ext3, or ext4
file system use below commands to increase the volume
# install "cloud-guest-utils" if it is not installed surya:~$ sudo apt install cloud-guest-utils surya:~$ sudo growpart /dev/xvdf 1 CHANGED: disk=/dev/xvdf partition=1: start=4096 old: size=16773086,end=16777182 new: size=73396190,end=73400286
Note: growpart
command used when we want to increase a partition within disk. If there is no partition within the disk then use below command to resize the disk.
resize2fs /dev/xvdf
Now run lsblk
command again to confirm
[surya ~]$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202:0 0 30G 0 disk └─xvda1 202:1 0 30G 0 part / xvdf 202:80 0 20G 0 disk /mnt └─xvdf1 202:81 0 20G 0 part
Now run df -h
to check the space
surya:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda1 70G 951M 69G 2% / tmpfs 1.9G 0 1.9G 0% /dev/shm /dev/xvdf 20G 45M 20G 1% /mnt
This is how you can increase the size of the EBS volume without rebooting the Linux machine.
For more information please visit AWS Documentation.
If you are working with MySQL or MariaDB web server, sooner or later you will…
To edit the crontab entries you use crontab -e. The command will check for the…
Installation method for COMODO SSL Certificate If you have generated the CSR and purchased or…
In AWS S3, you might want to provide the access to selected users to selected…
It's possible you have earlier generated a ssh key without password/ passphrase. Later you found…
If you are working on Linux OS, finding files effectively always a tricky part. Like…
View Comments
This seems to be for the ubuntu. How can it be done for Centos? Are there any ways to make the same issue in Cento. Thanks