Missing ephemeral disks on an m1.xlarge instance

amazon ec2

I am trying to build a new image based on "debian-6.0-squeeze-64bit-minimal-pvgrub-20110222-05 (ami-1e39ca77)", and it seems to be missing the ephemeral disks:

fdisk -l shows only /dev/xvda1 (ebs root device), and the block device mapping does not show the local disks.

GET http://169.254.169.254/latest/meta-data/block-device-mapping/
ami

the instance type is m1.xlarge which comes with 4 local disks:

echo  $(GET http://169.254.169.254/latest/meta-data/instance-type)
m1.xlarge

any idea?

Best Answer

If you launch an instance from an EBS root AMI, in the vast majority of cases, ephemeral storage is not attached, by default.

The ephemeral disks, available for the m1.xlarge are labelled ephemeral[0-3], each with 420GiB. You can NOT attach these to an instance once it has been launched. (On the other hand, you can add EBS volumes to an instance while it is running).

In order to change the ephemeral disks attached to the instance, you need to either:

  1. launch the instance explicitly specifying the ephemeral disk mappings OR

    ec2-run-instances ami-1e39ca77 -b /dev/xvdb=ephemeral0 -b /dev/xvdc=ephemeral1 -b /dev/xvdd=ephemeral2 -b /dev/xvde=ephemeral3

  2. register a new AMI, explicitly specifying the ephemeral disk mappings

    ec2-register -n Image_Name -d Image_Description --root-device-name /dev/xvda1 -b /dev/xvda1=snap-5241973e -b /dev/xvdb=ephemeral0 -b /dev/xvdc=ephemeral1 -b /dev/xvdd=ephemeral2 -b /dev/xvde=ephemeral3

This example is using the snapshot your AMI is based on as the root image. If you make changes to the root volume, you would, of course, use your own snapshot.

Note, that in both cases, the block devices will not be automatically mounted (unless you modify your fstab), although, they will immediately show up in /proc/partitions (or using fdisk -l).

Related Topic