Freebsd – attached volume of a FreeBSD amazon ec2 instance does not show up

amazon ec2amazon-ebsfreebsd

I have followed the steps in the documentation, created a new EBS volume and attached it to the instance (I only have one). I rebooted and tried shutdown/start, but the device does not show up inside the FreeBSD instance. I only have /dev/ada0 and /dev/ada0a.

Are there maybe any other steps necessary to make this work for a FreeBSD instance? I don't know anything about the abstraction layers amazon is using. I guess a problem could be that FreeBSD device naming is different.

Best Answer

@hasufell, your comment is correct - the device on BSD instances is not named using Linux/std AWS naming. I got the same device name you did - xbd5 - but you can confirm what the device name is by reviewing the system logs for <Virtual Block Device> entries (either grep dmesg/messages or through AWS Instance control panel - select instance, then Actions -> Instance Settings -> Get System Log). A 100GB device might show up like this in the log:

xbd5: 102400MB <Virtual Block Device> at device/vbd/51792 on xenbusb_front0

You can also run sysctl kern.disks and you should see something like:

kern.disks: xbd5 ada0

... where ada0 is your first EBS volume and xbd5 is your new attached volume.

Then just mount your new volume:

newfs /dev/xbd5
mkdir /yourvol
mount /dev/xbd5 /yourvol

Add to /etc/fstab to mount at boot:

/dev/xbd5 /yourvol ufs rw 0 2