One of the differences between Amazon EC2 server instances and normal servers is that the server’s local disk storage state (i.e. changes to data) on EC2 instances does not persist over instance shutdowns and powering on. This was mentioned in my earlier post about hosting my Web site on Amazon EC2 and S3,
Therefore, it is a good idea to store your home directory, Web document root and databases on an Amazon EBS volume, where the data does persist like in a normal networked hard drive. Another benefit of using an Amazon EBS volume as a data disk is that it separates your operating system image from your data. This way, when you upgrade from a server instance with less computing power to one with more computing power, you can reattach your data drive to it for use there.
You can create an EBS volume and attach it to your EC2 server instance using a procedure similar to the following.
First, create an EBS volume.
You can use Elasticfox Firefox Extension for Amazon EC2 to:
- create a EBS volume
- attach it to your EC2 instance
- alias it to a device, In this example, we use /dev/sdh
Then attach the “disk” to your EC2 instance and move your folders to it using a procedure similar to the following commands issued from a bash shell.
# Initialize (format) the EBS drive to prepare it for use
# Note: replace /dev/sdh below with the device you used for this EBS drive
mkfs.ext3 /dev/sdh
#
# Create the mount point where the EBS drive will be mounted
sudo mkdir /mnt/rj-09031301
# Side note: I use a naming convention of rj-YYMMDDNN to assign unique names
# to my disk drives, where YYMMDD is the date the drive was put into service
# and NN is the serial number of the disk created that day.
#
# Mount the EBS drive
sudo mount -t ext3 /dev/sdh /mnt/rj-09031301
#
# Temporarily stop the Apache Web server
sudo /etc/init.d/apache2 stop
#
# Move the current /home folder to a temporary backup
# This temporary backup folder can be deleted later
sudo mv /home /home.backup
#
# Symbolic link the home folder on the EBS disk as the /home folder
sudo ln -s /mnt/rj-09031301/home /home
#
# Start the Apache Web server
sudo /etc/init.d/apache2 start
Limitations:
One current limitation of EBS volumes is that a particular EBS disk can only be attached to one server instance at a given time. Hopefully, in a near future version upgrade of EC2 and EBS, Amazon will enable an EBS volume to be attached to multiple concurrent server instances. That will enable EBS to be used similar to how SAN or NAS storage is used in a traditional (pre cloud computing era) server environment. That will enable scaling Web (and other) applications without having to copy and synchronize data across multiple EBS instances. Until Amazon adds that feature, you will need to maintain one EBS disk per server and keep their data in sync. One method of making the initial clones is to use the feature that creates a snapshot of an EBS volume onto S3.
An EBS volume should never be allowed to be concurrently connected to multiple servers because it's "Block" storage. If you want a volume connected to multiple servers, use an NFS mount served up from another EC2.
ReplyDeleteVery good blog post on AWS EBS, Thanks for providing such a clear explanation.
ReplyDeleteBest Regards,
AWS Online Training
AWS Training
Amazon Web Services Online Training in Hyderabad
AWS Online Training in Hyderabad
AWS Certification Online Training
AWS Training Online
AWS Certification Training
AWS Training and Certification
Learn AWS
Amazon Web Services Training
AWS Training in Hyderabad
Amazon Web Services Training in hyderabad
Amazon Web Services Training in india
AWS Training Institute in Hyderabad
CourseIng
Hey really nice post keep share with us regarding AWS updates for more information get touch with these peoples will clear all doubts AWS Online Training Hyderabad
ReplyDelete
ReplyDeleteGreat Post,really it was very helpful for us.
Thanks a lot for sharing!
I found this blog to be very useful!!
AWS Cloud training in Bangalore
ReplyDeleteNice and good article. It is very useful for me to learn and understand easily.
AWS Training in Delhi
AWS Training Course in Delhi
Thank you for your post. This is excellent information.
ReplyDeleteAWS Training In Hyderabad
AWS Training
AWS Online Training
AWS Training Online
AWS Training In Bangalore
well! Thanks for providing a good stuff
ReplyDeleteAWS Training
AWS Online Training
Really an awesome blog for the freshers. Thanks for posting the information.
ReplyDeleteAWS Training in Delhi
AWS Course in Delhi
Looking forward to reading more. Great article post. Thanks Again. Fantastic.
ReplyDeletevan
ReplyDeleteelazığ
bayburt
bilecik
bingöl
8VC
van
ReplyDeleteelazığ
zonguldak
uşak
sakarya
A681Y
görüntülü
ReplyDeleteucretli show
EE515N
uşak evden eve nakliyat
ReplyDeletebalıkesir evden eve nakliyat
tokat evden eve nakliyat
kayseri evden eve nakliyat
denizli evden eve nakliyat
EW22
0DA98
ReplyDeleteAmasya Parça Eşya Taşıma
Van Şehir İçi Nakliyat
Hatay Parça Eşya Taşıma
Ordu Parça Eşya Taşıma
Mardin Şehir İçi Nakliyat
Bibox Güvenilir mi
Bitlis Parça Eşya Taşıma
Yalova Parça Eşya Taşıma
Siirt Şehirler Arası Nakliyat
69EAE
ReplyDeleteEryaman Fayans Ustası
Sincan Fayans Ustası
Bayburt Şehir İçi Nakliyat
Bitmart Güvenilir mi
İzmir Şehirler Arası Nakliyat
Karapürçek Fayans Ustası
Tekirdağ Şehir İçi Nakliyat
Antep Evden Eve Nakliyat
Afyon Parça Eşya Taşıma
B80D3
ReplyDeleteKırıkkale Parça Eşya Taşıma
Batman Şehirler Arası Nakliyat
Mamak Boya Ustası
Bayburt Şehirler Arası Nakliyat
Giresun Şehir İçi Nakliyat
Ankara Boya Ustası
Aydın Şehirler Arası Nakliyat
Amasya Evden Eve Nakliyat
Yozgat Lojistik
8FB90
ReplyDelete%20 binance komisyon indirimi
DDFD2
ReplyDeletePeriscope Beğeni Hilesi
Okex Borsası Güvenilir mi
Raca Coin Hangi Borsada
Sohbet
Likee App Beğeni Satın Al
Coin Oynama
Kripto Para Madenciliği Nedir
Nexa Coin Hangi Borsada
Referans Kimliği Nedir
20A35
ReplyDeleteyearn
aave
satoshi
poocoin
trust wallet
uniswap
poocoin
trezor suite
safepal