I have an EC2 instance. While launching i tried with disk storage space, like 16 GB.
In AWS console i see a new EBS volume been created of 16 GB and gets attached.
When i log into machine i can see the disk size being 16 GB but my partition is only 8 GB.
$ df -h Filesystem Size Used Avail Use% Mounted on /dev/xvde1 7.9G 1.5G 6.1G 20% / tmpfs 1.9G 0 1.9G 0% /dev/shm
$ sudo fdisk -l Disk /dev/xvde: 17.2 GB, 17179869184 bytes 255 heads, 63 sectors/track, 2088 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00098461 Device Boot Start End Blocks Id System /dev/xvde1 * 1 1045 8387584 83 Linux
$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvde 202:64 0 16G 0 disk └─xvde1 202:65 0 8G 0 part /
As per this SF post EC2 drive not EBS volume size i tried resizing my EBS volume.
sudo resize2fs /dev/xvde1
But am getting
The filesystem is already 2096896 blocks long. Nothing to do!
When i tried deleting the partition and recreate it i couldn't able to boot up the machine. How can utilize my entire disk space.
It will be better if i have a single partition utilizing my entire disk space.