Cannot Boot EC2 Instance

Hi,

I am trying to boot an EC2 instance (Xen) that has a storage drive. For some reason the storage drive is not recognized on boot (even though it is attached), and the system won't progress past single user mode...

/etc/fstab
Code:
# Root device
/dev/ad0a / ufs rw 1 1
# List swap partitions here if you enable them in rc.conf
# /dev/xbd1s1 none swap sw 0 0
# /dev/xbd2s1 none swap sw 0 0
# /dev/xbd3s1 none swap sw 0 0
# /dev/xbd4s1 none swap sw 0 0
/dev/xbd5 /ebs ufs rw 2 2

Here is what the EC2 system log says.
Code:
...
...
Starting file system checks:
/dev/ad0a: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/ad0a: clean, 2003146 free (21490 frags, 247707 blocks, 0.4% fragmentation)
Can't stat /dev/xbd5: No such file or directory
Can't stat /dev/xbd5: No such file or directory
THE FOLLOWING FILE SYSTEM HAD AN UNEXPECTED INCONSISTENCY:
	ufs: /dev/xbd5 (/ebs)
Unknown error; help!
ERROR: ABORTING BOOT (sending SIGTERM to parent)!
Oct 27 20:18:01 init: /bin/sh on /etc/rc terminated abnormally, going to single user mode

Enter full pathname of shell or RETURN for /bin/sh:

Any help would be appreciated.

Thanks.
 
Remove the line with /dev/xbd5 in /etc/fstab, it doesn't exist.
 
Yes, yes of course I realize that. I guess my question is - does the EBS drive not auto attach on a reboot? Do I have to manually attach it and mount it each time I start/reboot the instance, or am I missing something? I should be enumerated on startup, and thus be available for mounting via /etc/fstab, no?
 
... because if I can't reliably boot a machine with a storage drive attached then...?

... anyone?
 
Anyone... on whether it's possible to automatically mount an ebs device on startup in the EC2?
 
It sounds like something somebody from Amazon support would be able to answer.
 
dave said:
Anyone... on whether it's possible to automatically mount an ebs device on startup in the EC2?

I managed to connect a new EBS volume to my FreeBSD 9.1 instance running on Windows instance.

As far as I remember, my steps were:

(1) Start the instance.

(2) Create a new EBS volume and connect it to the instance.

(3) Check /var/log/messages. The following line appeared in my log:
Code:
Dec 10 17:14:31 ip-10-0-3-100 kernel: [color="Red"]xbd5[/color]: 51200MB <Virtual Block Device> at device/vbd/51792 on xenbusb_front0

(4) Construct a new file system and mount the volume.

Code:
# newfs /dev/xbd5
# mkdir /usr/jails
# mount /dev/xbd5 /usr/jails

(5) Add the following line to /etc/fstab:

Code:
/dev/xbd5 /usr/jails        ufs rw 0 2

(6) Reboot to check whether it works...

It did work for me.
 
No. I have removed the line from /etc/fstab, and if/when I cycle that machine, I will have to manually mount the storage and then bring up the services.
 
As a follow-up, I needed to expand the storage for that instance. So, in the process, I have now switched to ZFS for storage on that instance, and when I reboot it automatically mounts the storage no problem now.

I created 3 separate 15GB volumes, attached them, labelled them, and set up ZFS in the usual way, as a raidz array. Now I have more storage, it's easily expandable, and lots of features such as snapshots!
 
Back
Top