0
votes

I had an EBS volume of 30GB that was mounted as the rootfs for a ubuntu server. Due to space concerns I had to increase the size of the volume to 50. So I carried out the following steps:

  1. Take a snapshot of the EBS volume.
  2. Created a new EBS volume of 50GB.
  3. Restored the snapshot to the new volume.
  4. Power off my EC2 instance.
  5. Unmounted my old volume and mounted my new volume.

Every thing works fine. But when I do a df -h I get this:

Filesystem Size Used Avail Use% Mounted on
rootfs 30G 27G 1.1G 97% /
devtmpfs 1.9G 112K 1.9G 1% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
/dev/xvde1 30G 27G 1.1G 97% /

And when I do fdisk -l I get this:

Disk /dev/xvde1: 53.7 GB, 53687091200 bytes.

Could some one help me with this?

2

2 Answers

1
votes

I am no filesystem expert but your volume that you restored to is not formatted to utilize the 50 GB. In windows you need to expand the drive to utilize the full space of the larger Physical volume. You will need to find out the Linux command line version to make your xvde1 utilize the 50 GB. Ebs volumes are raw disks that need are not pre formatted.

!--------snapshot restored----------!------------raw blocks -------!

I will try to look into my onenote archive. I could of sworn that I documented this for one of my systems. Until then just look up expanding to larger ebs volume after snapshot restored. If I find it I will post it if not you need to search for it.

0
votes

Run this line to fix this issue!

resize2fs /dev/xvde1