9

Disclaimer: I'm probably missing something obvious, sorry in advance.

I need more EBS disk space for my Ubuntu 11.04 server running on Amazon EC2, and decided to create new volume in addition to the root volume. (It's an EBS-backed instance, created from official Ubuntu AMIs.)

So, I opened AWS management console, created a volume, and attached it to the instance:

enter image description here

I chose /dev/sdb as suggested by the dialog. AWS console shows the volume as correctly attached to the instance.

Problem is, the device /dev/sdb is not available on the instance, not immediately nor after reboot:

$ sudo mkfs.ext4 /dev/sdb
mke2fs 1.41.14 (22-Dec-2010)
Could not stat /dev/sdb --- No such file or directory

Did I miss some necessary step, or is the volume available under some other device name?

(Also tried /dev/sdc with same result; /dev/xvda3 wasn't accepted as "valid EBS device name".)

Jonik
  • 7,098
  • 12
  • 36
  • 44
  • 1
    I realise there are few AWS questions on Ask Ubuntu, but I thought I'd try here first, as Server Fault hasn't been very good for getting answers... – Jonik Jun 08 '11 at 12:00

1 Answers1

11

The devices are named /dev/xvdX rather than sdX in 11.04. This was a kernel change. The kernel name for xen block devices is 'xvd'. Previously Ubuntu carried a patch to rename those devices as sdX. That patch became problematic.

You could, if you really wanted, run your own kernel with a patch applied. bug 684875 has more information on why this was changed.

So, to answer your question, attach it /dev/sdb, it will appear as /dev/xvdb.

Jorge Castro
  • 70,934
  • 124
  • 466
  • 653
smoser
  • 1,795
  • 1
  • 16
  • 17
  • 1
    Perfect, this solved it! Btw, interestingly, now the "attach volume" dialog has this note (which wasn't there two days ago): "*Newer linux kernels may require you to map your devices to /dev/xvdb through /dev/xvdp instead.*" – Jonik Jun 10 '11 at 07:14