EBS Root Volume expansion

Q & ACategory: Compute (EC2, Lambda etc.)EBS Root Volume expansion
Tamuno Lawson asked 2 years ago

Hello Mr. Khan

I know you mentioned using Amazon AMI image 1 for this lab. However, AWS has since discontinued that AMI 1 and now they only have the AMI 2.

I have followed your process to increase the root volume, by first of all increasing the size from the AWS EC2 volume. Then I went on the CLI to growpart and that worked. However it will not work when I tried to resize the partition and it will give an error. I have deleted the instance and tried again with same error.

Not sure if you have tried to expand the root volume on the new AWS AMI 2

Faizal Khan Staff replied 2 years ago

Hello Tamuno. I could help better if you could tell me the exact error you got and a screenshot would also help.

Tamuno Lawson replied 2 years ago

Here is the combined screenshots in pdf file format.

https://dsnsol-nov-bckt.s3.amazonaws.com/AWS+EC2+Root+Vol+Extend.pdf

1 Answers
Best Answer
Faizal Khan Staff answered 2 years ago

From the error you shared while running resize2fs command : “bad magic number in super-block” is most likely happening because the AMI you are using contains an XFS file system rather than an EXT4 filesystem.

To expand XFS file systems, the command will be:

sudo xfs_growfs -d /

where “/” will be mount point of the root volume as shown in df-h command. Full guide in this aws documentation link

top
© 2015 - 2020. All Rights Reserved               Ecomm India Cloud IT LLP
X