Friday, January 23, 2015

Amazon AWS EC2 instance was configured with a larger drive but I don’t see that

Well, if you make the single drive larger than default, the extra space won’t automatically show up – well, it hasn’t in my experience.


You have to run resize2fs so “see” it.


Below is what it looked like for me. Notice there was no indication of free space on the drive.


[root@……..]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/xvde 7.9G 1.1G 6.5G 15% /

tmpfs 1.9G 0 1.9G 0% /dev/shm

[root@………..]# resize2fs /dev/xvde

resize2fs 1.41.12 (17-May-2010)

Filesystem at /dev/xvde is mounted on /; on-line resizing required

old desc_blocks = 1, new_desc_blocks = 32

Performing an on-line resize of /dev/xvde to 131072000 (4k) blocks.

The filesystem on /dev/xvde is now 131072000 blocks long.


[root@…….]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/xvde 493G 1.1G 467G 1% /

tmpfs 1.9G 0 1.9G 0% /dev/shm


After a while, it came back and I had the 500GB I had configured the instance to have.


While resize2fs is running, if you type “df -h” repeatedly you can see the volume growing. Good fun when you’re staring at an SSH console ;)





No comments:

Post a Comment