How do I partition new disk space after upgrading EC2 instance type?

1

I had created a t1.micro instance with an EBS volume attached to it. The volume was 8 GB. I stopped the instance and changed instance type to m1.medium which should have 410 GB of instance storage. When I do df -h on the instance, my output is

Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1      7.9G  1.5G  6.4G  19% /
tmpfs           1.9G     0  1.9G   0% /dev/shm

Is there a way to partition/mount the 410 GB to the EBS volume? Or how can I get the rest of the instance storage to my use? (I'd like it to be part of the EBS so I it will be included in the snapshots)

juuga

Posted 2014-03-17T20:03:35.073

Reputation: 131

Answers

1

use the resize2fs command to expand the partition to take up the unused disk space.

dmohr

Posted 2014-03-17T20:03:35.073

Reputation: 123

I actually didn't end up using the instance storage. I resized an another bigger EBS volume from a snapshot of the 8 GB one and attached that to my instance. – juuga – 2014-03-31T13:09:23.253

0

Use /dev/sdf as the mount point of the newly attached volume.

Check in the Details pane for thevolume, the state of the volume is in-use, and the volume is attached to your instance with the device name /dev/sdf. However df -h wont display the new volume.

Use lsbsk. If the lsblk command does not work, you can use sudo fdisk -l | grep Disk instead.

To make volume available:

  1. To mount the device as /mnt/my-data:

[ec2-user ~]$ sudo mkdir /mnt/my-data

[ec2-user ~]$ sudo mount /dev/xvdf /mnt/my-data

  1. Now run df -h

You are DONE now.

pulsarjune

Posted 2014-03-17T20:03:35.073

Reputation: 1 242