Preben Asmussen's picture

I have just created a ebs volumne on turnkey hub and assigned it to the turnkey server instance.

Seems ok on turnkey console, but on ec2 instance it still has instance-store assigned.

What can i trust ? - How can I update ec2. I need the ability to start/stop instance.



yul oyarzabal's picture

I found this very helpful:

the following assumes you have created a volume in AWS Management Console and attached it to your instance as /dev/sdh.

A brand new volume is unformatted block storage. It shows up as another device, but doesn’t contain a filesystem. (An EBS volume that previously had a filesystem created on it won’t be mounted either by the attachment process).

You can verify that your instance can see the EBS volume by running the following command on the instance:

cat /proc/partitions

You’ll see an entry for sdh. At this point, you should create a filesystem and mount it manually. You could create an EXT3 filesystem on the device and then mount it on ‘/ebs’ with the following commands, (run as root):

mke2fs -F -j /dev/sdh
mkdir /ebs
mount /dev/sdh /ebs

Then Copy everything over to the ebs volume and validate.

dd bs=65536 if=/dev/sda1 of=/dev/sdh
fsck /dev/sdh


root@moodle /var/mail# dd bs=65536 if=/dev/sda1 of=/dev/sdh
* records in

* records out

* bytes (11 GB) copied, 274.504 s, 39.1 MB/s

root@moodle# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             9.9G 1018M  8.4G  11% /
none                  824M  824M     0 100% /dev
none                  861M     0  861M   0% /dev/shm
none                  861M   64K  860M   1% /var/run
none                  861M     0  861M   0% /var/lock
none                  861M     0  861M   0% /lib/init/rw
/dev/sda2             147G  188M  140G   1% /mnt
/dev/sdh              9.9G  151M  9.2G   2% /ebs
root@moodle #

root@moodle /dev# fsck /dev/sdh
fsck from util-linux-ng 2.17.2
e2fsck 1.41.11 (14-Mar-2010)
/dev/sdh is mounted.

WARNING!!!  The filesystem is mounted.   If you continue you **WILL**
cause **SEVERE** filesystem damage.

Do you really want to continue (y/n)? no

check aborted.
root@moodle /dev#

This is the point where you have your EBS volume mounted and a copy or the primary volume copied to your ebs, but right now i do not know how to make EBS the Root device, it is another step that needs to be erform but this the point where i just got anybody can help on the next step in order to start and stop instance?

Preben Asmussen's picture

Thanks a lot smiley

The last part would be nice so we would be able to start/stop the instance.

Anybody ?


Add new comment