I have an EBS volume (e.g. /dev/sdf
) that has been attached to an EC2 instance (which boots from a different EBS volume), and I have mounted the volume (through
It would seem that the official ec2 documentation now recommends plain old fstab entries with nofail -
/dev/xvdf /data ext4 defaults,nofail 0 2
ref - http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html
Make an entry to /etc/fstab
Entry would be like:
/dev/sdf /data ext3 defaults 1 1
This will automatically mount the volume during reboot.
I recommend using an /etc/init conf file that do that:
# /etc/init/mountec2vol.conf # # description: Mounts the EBS Volume # start on net-device-up exec mount /dev/xvdf1 /myVolume`
that's all what you have to do!