Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I started with an Ubuntu 12.04 EC2 micro instance (8GB Disk) and just relaunched the snapshot as a small instance (160GB Disk) but in my console it still only shows as an 8GB disk. Webmin reports it as an 154GB disk and DF shows:

Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/xvda1       8362320 2880600   5062292  37% /
udev              838332      12    838320   1% /dev
tmpfs             338520     172    338348   1% /run
none                5120       0      5120   0% /run/lock
none              846292       0    846292   0% /run/shm
/dev/xvdb      153899044 1638340 144443080   2% /mnt

So how do I now make use of the extra space that doesn't appear to be there? Most of my files are on /mnt in /mnt/www and /mnt/mysql so ideally that would be the place to have the extra space.

Here is the fdisk -l output

Disk /dev/xvda1: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/xvda1 doesn't contain a valid partition table

Disk /dev/xvdb: 160.1 GB, 160104972288 bytes
255 heads, 63 sectors/track, 19464 cylinders, total 312705024 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/xvdb doesn't contain a valid partition table

Disk /dev/xvda3: 939 MB, 939524096 bytes
255 heads, 63 sectors/track, 114 cylinders, total 1835008 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/xvda3 doesn't contain a valid partition table
share|improve this question
    
What is your fdisk -l output? –  ewwhite May 20 '12 at 21:27
    
i added the output to my question, thanks –  Tyler May 20 '12 at 21:33
    
my web data and mysql data is on /dev/xvdb 153899044 1638340 144443080 2% /mnt so it looks like i have to stretch that somehow to make use of the space it isn't using without killing my data –  Tyler May 20 '12 at 21:37

2 Answers 2

up vote 4 down vote accepted

Micro instances can only use EBS root devices and have no ephemeral storage, so the 8G disk you're referring to must be an EBS volume. Launching this volume with a different instance type doesn't increase its size (in fact, the instance type has no relevance to the volume size). To increase the size of the volume you need to create a snapshot with a new size specified and then launch that snapshot. (You then need to change the partition table and resize the filesystems as necessary.)

The 160G disk you're referring to is the epihemeral storage provided as part of the instance. This is exposed as /dev/xvdb, and you may need to create and mount a filesystem on this in order to use it. Note that anything stored here will be lost when the instance is terminated, stopped, or fails, so it is only appropriate for temporary data.

share|improve this answer
    
The instance size has a lot to do with storage and the 160GB is not ephemeral because it's on an EBS. See here aws.amazon.com/ec2/instance-types you get more storage with bigger instance types and it persists. –  Tyler May 21 '12 at 15:00
    
Reading between the lines you're saying all i need to do is somehow format that partition and it will give me the full 160GB right? –  Tyler May 21 '12 at 15:01
    
The "instance storage" listed on that page is all ephemeral and not EBS. Yes, you just need to format /dev/xvdb to use it. –  mgorven May 21 '12 at 17:17
    
Yikes, EBS doesn't work the way I thought it did. You probably just saved my bacon :) Thanks for helping me understand. –  Tyler May 21 '12 at 22:40

Have you tried the Ext tools to format a new partition on your xvdb to use the space?

Looks to me like You need to create a partition on it with fdisk and use them mkfs tools to format. When that's done, put a new entry in /etc/fstab for the new partition.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.