[ec2-beta] Starting a script after attaching an EBS volume?

Casey Brown CBrown at docudesk.com
Fri Mar 6 17:18:29 GMT 2009


The simple way to do this would be to wrap your database startup script in 
something like#!/bin/bash

while [ ! -e some_database_file ]; do
sleep 1
done

#start your databaseThis will wait for the some_database_file to exist 
before executing the rest of the script.


-----Original Message-----

From: "uona at sineta.de" <uona at sineta.de>

To: ec2-beta at lists.ubuntu.com

Date: Fri, 6 Mar 2009 16:48:52 +0100

Subject: Re: [ec2-beta] Starting a script after attaching an EBS volume?




Hello,



first of all thanks for all your comments...



> How about just including the EBS volume mount part as the first part of 
your

> script, or which just mounts the volume and, if successful, execs to 
become your

> other script?



Yes, thats the same idea Thomas has suggested.  I think this will be a

feasable way to go...



But what about with daemons like "udev" and "HAL"?  Can these internal

systems help us as well?





@Neale: I want to attach an EBS volume to an already running EC2

instance. For that you can use the command line tool

"ec2-attach-volume" or you can use the "AWS Management Console".  Lets

say you have your database storage files on your EBS volume and you

want to startup your database on your EC2 instance only if this EBS

volume is successfully attached.  Therefore such a trigger event could

be useful.



Once again thanks for all the comments and



Kind Regards

Michael



-- 

Ec2-beta mailing list

Ec2-beta at lists.ubuntu.com

Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ec2-beta 
[https://lists.ubuntu.com/mailman/listinfo/ec2-beta]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/mailman/private/ec2/attachments/20090306/ddf8b60d/attachment-0001.htm 


More information about the Ec2-beta mailing list