From 59d21bb23db06e5e02cbd91ec531b1506ab97fae Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Tue, 25 Aug 2009 23:51:16 +0200 Subject: Implement EBS volume mounting This can either be invoked by instrumenting the user-data with a mime part with content-type 'text/x-ebs-mount-description' with a body like so: device=/dev/sde:/var/lib/mysql,/etc/alfresco device=/dev/sdf:/other/things or by using the appliance config XML format like so: /var/lib/mysql /etc/alfresco /other/things In either case, if the volume does not yet have a filesystem, one will be created. For each path that is to live on the volume, a directory is created, and populated with the data currently in the target directory (e.g. /var/lib/mysql is copied to ${ebs_volume_path}/_var_lib_mysql). Once this is done, the directories are bind-mounted to the relevant paths. If the directories in question already exist, they will just be bind-mounted. --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index fa855bd6..dab57103 100755 --- a/setup.py +++ b/setup.py @@ -37,5 +37,7 @@ setup(name='EC2-init', 'ec2-wait-for-meta-data-service.py'], data_files=[('/etc/ec2-init', ['ec2-config.cfg']), ('/etc/ec2-init/templates', glob('templates/*')), - ('/etc/init.d', ['ec2-init'])], + ('/etc/init.d', ['ec2-init']), + ('/usr/share/ec2-init', ['ec2-init-appliance-ebs-volume-mount.sh']), + ], ) -- cgit v1.2.3