Ebs Notes
Ebs Notes
Instance Store:
==========
Its a non-persistant storage i.e., data will be lost if the server is stopped and
started.
EBS Volumes:
=========
1. Its a permanent storage.
Data will not be lost, though you start and stop the instances.
(SAN=StorageAreaNetwork , NAS=NetworkAreaStorage)
How Instance Store can be used:
=====================
1. I will move virtual memory to Instance store.
2. If Linux I will move SWAP partition to IS(InstanceStore)
3. If DB, I will move TempDB to IS(InstanceStore).
Launch Instance
2. Select the VPC and subnet and here no need to select the primary ip.
3. Add Storage
AddNewVolume--- select "instance store" (under VolumeType)--it selects the
size automatically(4gb)
5. connect to ssh
10.Now , need to format the volumes , for this we need to do three things
-format the volume
-create the file system
-mount the volume
Note: But here these extended drives which we mounted are in memory only, no
where it is saved.So, if we reboot
the system, again we need to mount. your data will be there but,
need to mount the volume again.
15. To Avoid the above scenarios we need to save these drives permanently.
Add this
/dev/xvdf1 /6gbdrive auto
defaults,nofail,comment=cloudconfig 0 2
I have mounted 6gb in fstab but not 8gbdrive, so when I stop and start the
EC2 instance, files will be removed
from8gb drive, but it will not completely removed ,when we mount again files
will be appear in 8gbdrive.
17. Files should display in both drives before start and stop EC2 instance
EC2 instances, select the instance and stop the instance.now, public ipv4
will change, if you want it permanently
need to provide 'ElasticIP')
6
Now Start EC2 instance.
[root@ip-10-1-1-156 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 8G 0 disk
└─xvda1 202:1 0 8G 0 part /
xvdf 202:80 0 6G 0 disk
└─xvdf1 202:81 0 6G 0 part /6gbdrive
xvdb 202:16 0 4G 0 disk /media/ephemeral0
xvdg 202:96 0 8G 0 disk
└─xvdg1 202:97 0 8G 0 part
(Observer 8gbdrive is not mount now, because we didn't add it in /etc/fstab/)
if we check, files will contain only in 6gbdrive not in other.
The Third Extended Filesystem. Ext3 (the third extended filesystem) is the most
commonly used filesystem on Linux.