How To Resize an ext3 Filesystem
erics, August 31st, 2014
I had to replace an ailing root volume on AWS, so I decided to double the size when I created the new volume from snapshot. After booting, I realized that df still showed the old filesystem size of 10GB, not the new size of 20GB Here is the solution: resize2fs /dev/xvda1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
root@prod02:/root # df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda1 9.9G 6.4G 3.4G 66% / root@prod02:/root # resize2fs /dev/xvda1 resize2fs 1.41.12 (17-May-2010) Filesystem at /dev/xvda1 is mounted on /; on-line resizing required old desc_blocks = 1, new_desc_blocks = 2 Performing an on-line resize of /dev/xvda1 to 5242880 (4k) blocks. The filesystem on /dev/xvda1 is now 5242880 blocks long. root@prod02:/root # df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda1 20G 6.4G 14G 33% / |