How do I access a EBS volume that I've created on a EC2 instance?
I have created a EBS volume on /dev/sdh like so:
$ ec2-attach-volume -d /dev/sdh -i i-7058e010 vol-58f08432
ATTACHMENT vol-58f08432 i-7058e010 /dev/sdh attaching 2011-09-19T12:48:01+0000
开发者_StackOverflow社区
Following this tutorial http://aws.amazon.com/articles/1663, I am now trying to "Create an XFS file system on the EBS volume"
But when I try to do that I get:
root@ip-10-100-254-47:~# sudo mkfs.xfs /dev/sdh
/dev/sdh: No such file or directory
When I look at the EBS volume in the console it seems to be working properly:
Attachment:
i-7058e010:/dev/sdh (attached)
EDIT: this instance is not an EBS store instance, does that mean I can't use EBS with it?
That should actually work, unless your instance i-7058e010
does not correspond to ip-10-100-254-47
.
Try partprobe
and blkid
inside your instance to see whether you can find out more information/force rescanning the bus.
EDIT: this instance is not an EBS store instance, does that mean I can't use EBS with it?
No, whether you are using EBS root or regular S3 manifests ami doesn't have anything to do with the ability to attach EBS volumes.
PS. if you are trying to do XFS because of xfs_freeze,xfs_unfreeze (consistent snapshotting) be advised that recent kernels support the same controls for ext4 just fine.
It turned out that /dev/sdh doesn't exist on Ubuntu Natty. I had to use /dev/sdf which maps to /dev/xvdf on the actual server.
精彩评论