How to Resizing the EBS volume in Ec2 Linux machine

To Resize the current EBS volume we need to find out the volume which is going to resize. Once Login the AWS account and Navigate to Ec2 ser...


To Resize the current EBS volume we need to find out the volume which is going to resize.

Once Login the AWS account and Navigate to Ec2 services you can able to see the  Ec2 dashboard page.
Click the Instances option you can able to see the instances to make sure that the instance needs to be up and running.

Once click the Instance, you can able to see the security options, click that option you can able to see the Volume which is already attached to the Ec2-Instance. 

Copy the volume id and go to the ec2-Dashboard --> elastic block storage --> volumes


Click the volume id it will go inside the volume you can see some details of the volume inside we need to click the modify option to modify the current EBS volume size.


Inside the Volume Modification page, you can able to change the size of the current volume default you have 8GB now you can add min 1G Max 16384 GB. click modify the option it takes some time to modify the volume.

After 5 minutes you can able see the modified volume size. Now AWS side we completed the volume modification step but for Linux, we need to add our disk into the Linux filesystem then only we can be able to use the extra modified volume.

For that, we need to log in to the Linux machine using either putty, or PowerShell or if you are using Amazon Linux or ubuntu you can able login using ec2-instance connect option. If you do not know how to do that please see our blog How to connect our EC2 Instances using EC2-Instance Connect in AWS.

Login to the instance and check whether disks are added successfully.
Check the below command
Command: lsblk
Command: df -Th --> check the volume details along with the file system. 

Now we need to grow the partition command it extends a partition in a partition table to fill available space


Command: sudo growpart /dev/xvda 1 -->  Extend the partition /dev/xvda is a partition, 1 is a partition number.

Already we checked the filesystem using the df -Th command if we are using XFS we need to use the below command to update the extra disks into the partition,
Command: xfs_growfs /dev/xvda1 or xfs_growfs -d /

If our Linux machine used the ext3 or ext4 file system we need to use the resize2fs command.

Once the file system is updated we need to check whether the disks are added to the partition. using df -h and lsblk command.

Now we have successfully modified the disk space without any downtime. -----------------------------------------!!!Happy Learning With Techiev!!!! ---------------------------------------



COMMENTS

Name

AWS,7,Devops,16,linux,10,
ltr
item
Techie View: How to Resizing the EBS volume in Ec2 Linux machine
How to Resizing the EBS volume in Ec2 Linux machine
https://blogger.googleusercontent.com/img/a/AVvXsEjh_3d8W_3Q8xXTX7OtvgOn5dKSpb2p9LTP1FTvRavGiCsJ-vKR0OJWsONeEXJoD-wgIBgXgQzwXJz5-Df8K4KaH4FT4n8oPfMqZonyDz1v-MfVcjcFmgCHwNDE5rpqEU1ImTFWuDeF_sR1NvMAYwy5nsAxMprr1vaFUaYDO6191806vkGT_pyHUtI30A=w400-h266
https://blogger.googleusercontent.com/img/a/AVvXsEjh_3d8W_3Q8xXTX7OtvgOn5dKSpb2p9LTP1FTvRavGiCsJ-vKR0OJWsONeEXJoD-wgIBgXgQzwXJz5-Df8K4KaH4FT4n8oPfMqZonyDz1v-MfVcjcFmgCHwNDE5rpqEU1ImTFWuDeF_sR1NvMAYwy5nsAxMprr1vaFUaYDO6191806vkGT_pyHUtI30A=s72-w400-c-h266
Techie View
https://www.techiev.com/2021/12/how-to-resizing-ebs-volume-in-ec2-linux.html
https://www.techiev.com/
https://www.techiev.com/
https://www.techiev.com/2021/12/how-to-resizing-ebs-volume-in-ec2-linux.html
true
7013663511659419322
UTF-8
Loaded All Posts Not found any posts VIEW ALL View Full Article Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy