This is a discussion on EBS FAQ and how-to's - Solaris Rss ; Previously we posted a blog entrytitled ?OpenSolaris supports EBS - provides capability to createZFS? that explains how to use theAmazon's Elastic Block Storage with OpenSolaris EC2 instances. Thisdocument combines the EBS with OpenSolaris ZFS technology. While wetried to cover the ...
Previously we posted a blog entrytitled ?OpenSolaris supports EBS - provides capability to createZFS? that explains how to use theAmazon's Elastic Block Storage with OpenSolaris EC2 instances. Thisdocument combines the EBS with OpenSolaris ZFS technology. While wetried to cover the details needed but there a few questions have beenasked several times. In this entry, I will try to explain thosedetails and feel free to ask more questions so we can make it asclear as possible:
I will answer these questions infollowing sections.
- When an EBS device is attached to OpenSolaris instance, how do I identify these drives from within the instance?
- Can I use some automated scripts to mount these EBS devices during the instance startup ? is this answered last (below)?
- Why do I sometimes detach/attach being not successful ?
When a disk is attached to anOpenSolaris instance it can be viewed in number of ways and thesimplest one is to use the format(1M) command. Following is theoutput of the format command on a default OpenSolaris EC2 instance(without any EBS device being attached) :
Searching for disks...done
AVAILABLE DISK SELECTIONS:
Specify disk (enter its number):
What this tells us is there are twodefault disks wwhere the controller is 7 and disk is 0(c7d0) and1(c7d1). It is important to note that this is an OpenSolaris 2009.06AMI and any AMI which is based on this should have the samecontroller number. For different OpenSolaris versions the controllernumber may change and the Getting Started Guide or the format commandcan be referred to get this information. Any further disk attachmentthrough EBS commands (ec2-attach-volume) will have the samecontroller ID and a new disk id which will change based on theargument we give to this command. So far it can be easily assumedthat -d (a unique number greater than 1) will result in an EBS deviceappearing as below with the format command within the EC2 instance: