Posts

Showing posts from September, 2013

Convert an Instance-Store AMI to EBS-Backed AMI

Launch an instance from an instance store-backed AMI. Make a note of the ramdisk ID and kernel ID your running instance is using  Create a 10GiB Amazon EBS volume in the same Availability Zone as that of your newly-launched instance e.g. /dev/sdf Attach the volume to the running instance using either the AWS Management Console or the command line interface. Make sure all services are turned off like mysqld, nginx etc. Format the volume with a file system. Newer kernels use /dev/xvdf convention mkfs.ext3 /dev/xvdf Create a directory /mnt/ebs and mount the volume on it. mkdir /mnt/ebs   mount /dev/xvdf /mnt/ebs Copy the data on the root storage device to the newly-attached volume. rsync -avx --exclude /mnt/ebs / /mnt/ebs [SPECIFIC TO UBUNTU] Edit /mnt/ebs/etc/fstab,/mnt/ebs/boot/grub/menu.lst and /mnt/ebs/boot/grub/grub.cfg and replace uses of LAB