0% found this document useful (0 votes)
19 views4 pages

Ebs Notes

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views4 pages

Ebs Notes

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

EBS = Elastic Block Store - EC Storage

Instance Store = EC2 Storage - Temporary Storage


-----------------------------------------------------------------
SSD = Solid State Disk
(High performance disk)
Elastic File System - EFS
Simple Storage Service -S3
Glacier

Instance Store:
==========
Its a non-persistant storage i.e., data will be lost if the server is stopped and
started.

Instance store size is fixed and it cannot be increased or decreased.

EBS Volumes:
=========
1. Its a permanent storage.

Data will not be lost, though you start and stop the instances.

2. You can increase EBS Volumes.


But we never decrease EBS Volumes ,because data might be corrupt.

3. EBS Volume max size is 16 TB.

(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

1.Under Step2 : Choose an Instance Type


select the "m3.medium"(m3 medium will appear only when you select the
"AllGenerations" from the filter)
click "Configure and launch details"

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)

4. complete remaining steps to launch the machine

5. connect to ssh

6. It should have 8GB of RAM and 4 GB of Interstore database

[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 /
xvdb 202:16 0 4G 0 disk /media/ephemeral0
(Ephemeral disk is a temporary storage that it is added to your instance, and
depending on your instance type the bigger is such storage. )

7. Add extra Volume to your EC2 Instances


Elastic Block Store
Volumes --> Create Volume
Volume type : General Purpose ssd(GP2)
Size(GiB): 6GB

Add another volume


Volumes --> Create Volume
Volume type : General Purpose ssd(GP2)
Size(GiB): 9GB
8. Attach Volume to the EC2 Instance
select the newly created volumes and attach the volume to the EC2 Instance.

9. Now, in putty the new volumes drives can be visible


[root@ip-10-1-1-156 ~]# lsblk
But you can't directly use this newly created volumes. First need to format
and create file system
then mount the volume.then only we can place some data into it.

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

11.Create Partition now,


[root@ip-10-1-1-156 ~]# fdisk /dev/xvdf
(Note: select 'm' and then 'n' after that press 4 times enter key and then
select 'w')
[root@ip-10-1-1-156 ~]# lsblk
you can see the xvdf is partitioned.
Similarly do for the xvdg

12. Create the file system now,


[root@ip-10-1-1-156 ~]# mkfs.ext3 /dev/xvdf1

[root@ip-10-1-1-156 ~]# mkfs.ext3 /dev/xvdg1

13. Creating 2 directories


[root@ip-10-1-1-156 ~]# mkdir /6gbdrive
[root@ip-10-1-1-156 ~]# mkdir /8gbdrive

14. Mount the two drives


[root@ip-10-1-1-156 ~]# lsblk
we can observe that volume is directing to 'Mountpoint'
[root@ip-10-1-1-156 ~]# mount /dev/xvdf1 /6gbdrive/
[root@ip-10-1-1-156 ~]# mount /dev/xvdg1 /8gbdrive/

check the changes


[root@ip-10-1-1-156 ~]# lsblk
(Now its ready to save the data into these drives)

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.

[root@ip-10-1-1-156 ~]# vim /etc/fstab

Add this
/dev/xvdf1 /6gbdrive auto
defaults,nofail,comment=cloudconfig 0 2

<save and exit>

16. [root@ip-10-1-1-156 ~]# cd /media/ephemeral0


[root@ip-10-1-1-156 ephemeral0]# pwd
/media/ephemeral0
[root@ip-10-1-1-156 ephemeral0]# vim testfile1
[root@ip-10-1-1-156 ephemeral0]# cp testfile1 testfile2
[root@ip-10-1-1-156 ephemeral0]# cp testfile1 testfile3
[root@ip-10-1-1-156 ephemeral0]# cp testfile1 testfile4
[root@ip-10-1-1-156 ephemeral0]# cp testfile1 testfile5

copy all the files into 6gb and 8gb drive

[root@ip-10-1-1-156 ephemeral0]# cp testfile* /6gbdrive/


[root@ip-10-1-1-156 ephemeral0]# cp testfile* /8gbdrive/

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

[root@ip-10-1-1-156 ephemeral0]# ls /6gbdrive/


lost+found testfile1 testfile2 testfile3 testfile4 testfile5
[root@ip-10-1-1-156 ephemeral0]# ls /8gbdrive/
lost+found testfile1 testfile2 testfile3 testfile4 testfile5
[root@ip-10-1-1-156 ephemeral0]#

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.

[root@ip-10-1-1-156 ~]# ls /6gbdrive/


lost+found testfile1 testfile2 testfile3 testfile4 testfile5
[root@ip-10-1-1-156 ~]# ls /media/ephemeral0/
lost+found
[root@ip-10-1-1-156 ~]# ls /8gbdrive/

Now, mount the 8gbdrive


[root@ip-10-1-1-156 ~]#mount /dev/xvdg1 /8gbdrive/
we will get the files in 8gbdrive now.
[root@ip-10-1-1-156 ~]# ls /8gbdrive/
lost+found testfile1 testfile2 testfile3 testfile4 testfile5

Mount the 8gbdrive in fstab


[root@ip-10-1-1-156 ~]#vim /etc/fstab
/dev/xvdg1 /8gbdrive auto
defaults,nofail,comment=cloudconfig 0 2

The Third Extended Filesystem. Ext3 (the third extended filesystem) is the most
commonly used filesystem on Linux.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy