Oops.  Just saw in the scalr scripts section the %instance_id% variable.

So no need for the ec2_metadata script.

ec2-attach-volume -d /dev/sdh -i %instanceid% vol-43f7132a
mount -t ext3 /dev/sdh1 /mnt/storage


2008/12/27 Ken Meyering <[email protected]>

> Checkout this script
>
> http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1825
>
> it's a script that will fetch ec2 metadata.
>
> The mount volume script should be a few lines, like this;
>
> instanceid=`ec2-metadata -i | sed -e 's/instance-id: //g'`
> ec2-attach-volume -d /dev/sdh -i $instanceid vol-43f7132a
> mount -t ext3 /dev/sdh1 /mnt/storage
>
> Replacing the volume id with your own.
>
>
>
> On Mon, Dec 22, 2008 at 10:32 PM, Kevin Baker <[email protected]>wrote:
>
>>
>>
>>
>> On Dec 22, 2008, at 5:27 PM, Ken M <[email protected]> wrote:
>>
>> >
>> > Alex, did you make any other changes to the mysql role?
>> >
>> > I copied the mysql-init.sh file from the mysql role to my previously
>> > created mysql-ebs role.
>> >
>> > Now the EBS doesn't mount at all, resulting in the following error in
>> > the console output:
>> >
>> > /etc/rc2.d/S19mysql: ERROR: The partition with /mnt/storage/lib/mysql
>> > is too full!
>> >
>> > This apparently means the directory was not found.
>> >
>> > Now my mysql-ebs role is perpetually stuck in the "Initializing"
>> > state.
>> >
>> > For those interested in MySQL with EBS data store, see the following
>> > article on moving the mysql datastore to ebs, and updating the mysql
>> > configuration file to point to the new directory.
>> >
>> >
>> http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1663
>> >
>> > It's pretty straightforward if you follow it step by step.
>> >
>>
>> Thanks, this works great. The key now is for us to establishba script
>> that will, auto mount the EBS, and promote slave to master on fail.
>> Any luck with this?
>>
>>
>> >
>> > On Dec 13, 10:08 pm, Alex Kovalyov <[email protected]> wrote:
>> >> Here's a workaround to make mysql master skip snapshot download and
>> >> deployment:
>> >>
>> >> Simply add a script called "Do not fetch MySQL snapshot" on hostInit
>> >> for
>> >> mysql role.
>> >>
>> >> It creates a file, which is being checked by updated mysql-init.sh
>> >>
>> >> On 10 дек, 23:13, Ken M <[email protected]> wrote:
>> >>
>> >>> I've set up anEBSvolume and attached it themysqlrole.  All of
>> >>> thedatais on theebs.  I need thedatato persist between instances,
>> >>> but
>> >>> I only want to backup the volume periodically.
>> >>
>> >>> As it is now, when themysql-master instance attaches theebsvolume,
>> >>> it immediately downloads the most recent snapshot of thedatafrom S3,
>> >>> overwriting the more currentdatathat is already on theEBS(which
>> >>> was written after the last S3 backup).
>> >>
>> >>> Is there a way to have themysql-master attach theEBSwithout
>> >>> overwriting the most currentdatawith the last .tar backup on S3?
>> >>
>> >>> Slave instances ofmysql, however, will need to use the most recent
>> >>> backup, before synchronizing with the master, I suppose.
>> >
>> > >
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"scalr-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/scalr-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to