When you attempt to install our Rightscale EBS Tools or run various scripts from the EBS tools, you may notice that they are unable to run properly or may hang when using a non-standard image.
This may be due to the fact that the image you are using is not patched for EC2 device mappings, such as /dev/sda or /dev/sdk, but rather it uses the standard Xen compatible device mappings such as /dev/xvda or /dev/xvdk.
As of the time of this writing, our Rightscale EBS tools are compatible with EC2 patched images only that use /dev/sd* device mappings, so if you are using a non-standard image that doesn't have this EC2 patch then our tools/scripts will likely fail or hang when being run.
There are a couple of workarounds to this issue.
First, you'll want to SSH into the instance and verify that the image kernel you are using does not have a proper Xen-to-EC2 device mapping patch. You can verify this by typing -
ls /dev/sd* ls: cannot access /dev/sd*: No such file or directory
Similarly, we can also verify that /dev/xvd* does exist with this command -
ls /dev/xv* /dev/xvda1 /dev/xvda2 /dev/xvda3 /dev/xvdk
As we can see, this particular kernel isn't patched and is using Xen standard device mappings.
NOTE: When attaching an EBS volume, the Rightscale dashboard and AWS Console will likely still show the /dev/sd* device name, but the instance itself will recognize it as /dev/xvd* so it can be a bit confusing.
How to work around it -
1. Use symlinks
The simplest method of working around this problem is to link /dev/sd* to it's /dev/xvd* counterpart. This should allow our EBS tools/scripts to see the /dev/sd* devices and continue working as designed.
To do so, simply link the devices like so -
ln -s /dev/xvda1 /dev/sda1 ln -s /dev/xvda2 /dev/sda2 ln -s /dev/xvda3 /dev/sda3 ln -s /dev/xvdk /dev/sdk
This will create the proper links needed for the EBS tools and scripts to continue working properly.
You will want to ensure that you create these symlinks before installing the Rightscale EBS tools and using the scripts within these tools.
2. Use a custom kernel that is EC2 friendly and patches the device mappings
As of the time of this writing, all of our official Rightimages should have a /dev/xvd* to /dev/sd* patch, so we would recommend using an official Rightscale image if possible.
If you are looking to use another distribution or version of a distribution that we don't offer, we would recommend ensuring that the particular AKI (kernel image) has this mapping/patch done for you. Some suppliers of kernels use the native Xen mappings instead, so you may need to contact them to see if they have an alternate kernel image.
You are also welcome to create your own custom image and use your own EC2 custom kernel by using PVGrub. More information can be found here -
http://aws.typepad.com/aws/2010/07/use-your-own-kernel-with-amazon-ec2.html
© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.