I recently ran out of space on a c1.medium EC2 instance store root partition. I did some cleaning and freed some space, but I still want to resize the partition. In fact, I would prefer to remove the /dev/xvda2
partition and allocate all free space to the /dev/xvda1
partition. Here are the details on the current set up:
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 9.9G 3.0G 6.4G 32% /
tmpfs 858M 0 858M 0% /dev/shm
/dev/xvda2 335G 195M 318G 1% /media/ephemeral0
I've found plenty of examples of resizing EBS backed instances, but nothing on instance store. Is this possible?
Update:
Using fdisk -l
shows three disks rather than partitions (unless I'm reading it wrong). Amazon's docs say there should be one drive.
# fdisk -l
Disk /dev/xvda1: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 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: 0x00000000
Disk /dev/xvda2: 365.0 GB, 365041287168 bytes
255 heads, 63 sectors/track, 44380 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: 0x00000000
Disk /dev/xvda3: 939 MB, 939524096 bytes
255 heads, 63 sectors/track, 114 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: 0x00000000
xvda2
is your ephemeral storage. You can't boot from it!