Auto re-attach EBS volume on start-up

amazon ec2amazon-ebsautomation

I'm setting up a database server on EC2, and I need to ensure that an EBS volume is automatically attached and is available before the database service starts up.

I'm using SMF so I can test whether a particular filesystem is available before starting the db service, so there's no problem from that perspective, however I'm not quite sure how to tell the server to auto-attach the EBS volume during/after boot.

What would be the best strategy for this?

Best Answer

You just need a couple of short scripts -one to attach the EBS volume at boot time and the other to detach it on shutdown to make sure the shutdown is clean. See this AWS forum post.

Related Topic