开发者

EBS based instances in Amazon

I'm running Amazon EBS based small instance.

This is how my file system looks like:

root@ip-10-49-37-195:~# df --all
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              8256952   1310196   6527328  17% /
proc                         0         0         0   -  /proc
none                         0         0         0   -  /sys
fusectl                      0         0         0   -  /sys/fs/fuse/connections
none                         0         0         0   -  /sys/kernel/debug
none                         0         0         0   -  /sys/kernel/security
none                    847852       116    847736   1% /dev
none                         0         0         0   -  /dev/pts
none                    852852         0    852852   0% /dev/shm
none                    852852        60    852792   1% /var/run
none                    852852         0    852852   0% /var/lock
/dev/sda2            153899044    192068 145889352   1% /mnt

I have following questions:

  1. Amazon says that small instance gives you 160GD of 开发者_Go百科disk. Looks like '/mnt' is exactly that declarated space. Then why I dont see that disk in Amazon Management Console, but only small (8GB) disk mounted to the Root?

  2. What will happen with my data in /mnt and in Root if I terminate/stop an instance?


Answering my own question:

1. 160GD of disk is a Instance disk which will be lost after termination or any hardware fall. So, you should consider using another EBS disk if you dont want to loose your data.

Why not to use 8GD EBS device (mounted by default with every EBS based Amazon instance) for storing data (e.g. databases)? Because all EBS devices mounted during launch will also be removed after termination. So, everything you save in /mnt or in any other directory will no survive termination or hardware fail.

There is a trick. Looks like if you detach /mnt (aka /dev/sda2) and then attach it back, it will not be deleted during instance termination. Because it will be marked as being attached after launch.

2. it will be removed

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜