Showing posts with label volumes. Show all posts
Showing posts with label volumes. Show all posts

Thursday, April 24, 2014

AWS Import/Export file limits

AWS import/Export can handle volumes of larger then 1TB to be stored on Amazon EBS volumes. However, there is a intermediate step using S3.  If your storage device’s capacity is less than or equal to the maximum Amazon EBS volume size of 1TB, its contents will be loaded directly into an Amazon EBS snapshot. So, in theory no size limit. AWS does not mount the file system on your storage device, nor is a file system required to be present. AWS Import/Export performs a block for block copy from your device to an Amazon EBS Snapshot. If your storage device’s capacity exceeds 1TB, a device image will be stored within your specified Amazon S3 log bucket. You can then create a RAID of EBS volumes using software such as Logical Volume Manager, and copy the image from Amazon S3 to this new volume

Tuesday, April 15, 2014

AWS PIOPS SSD backed

The question of what the technology backing EBS Provisioned IOPS volumes comes up often.  PIOPS volumes are backed by Solid-State Drives (SSDs), Provisioned IOPS volumes support up to 30 IOPS per GB which enables you to provision 4000 IOPS on a volume as small as 134 GB. 

More details here:
https://aws.amazon.com/ebs/details/

Wednesday, December 4, 2013

MySQL Recover from EBS snapshots for logical volume

In this blog post http://cloudconclave.blogspot.com/2013/12/mysql-ebs-snapshots-for-backing-up.html, we backed up a MySQL database that stores its data across an LVM using multiple EBS volumes.  Now we will do a restore.

sudo /etc/init.d/mysqld stop 
sudo umount /dev/md0 
sudo mdadm --stop /dev/md0 
sudo mdadm --zero-superblock /dev/sdf 
sudo mdadm --zero-superblock /dev/sdg 
aws ec2 detach-volume --volume-id vol-1 aws ec2 detach-volume --volume-id vol-2
aws ec2 create-volume --snapshot-id snap-1 --availability-zone AZ -- volume-type standard
aws ec2 create-volume --snapshot-id snap-2 --availability-zone AZ -- volume-type standard
aws ec2 attach-volume --volume-id vol-New1 --instance-id INSTANCE -- device /dev/sdf
aws ec2 attach-volume --volume-id vol-New2 --instance-id INSTANCE -- device /dev/sdg

Create the stripped volumes:
yes | sudo mdadm \ --create /dev/md0 \ --level 0 \ --metadata=1.1 \ --raid-devices 2 \
/dev/xvdf /dev/xvdg
sudo mount -a sudo /etc/init.d/mysqld start







MySQL : EBS snapshots for backing up a logical volume manager

It is possible to use EBS snapshots to backup a MySQL databases when the data is stored on a logical volume manager.   You have to be make sure all active/cached data is written to disk and no write happens to the data files during the snapshots.

Snapshotting a stripped volume:
Flush data to disk, lock tables, and freeze disk writes:
1. mysql -u root -p password 
(at the MYSQL prompt) 
A. FLUSH TABLES WITH READ LOCK;
B. SHOW MASTER STATUS; 
C. SYSTEM sudo xfs_freeze -f /data
Snapshot all EBS volumes that are part of the logical volume manager:

2. At the Linux prompt:
A. aws ec2 create-snapshot --volume-id vol-xxxxxxxx --description "Snapshot of /dev/sdf" 
B. aws ec2 create-snapshot --volume-id vol-xxxxxxxx --description "Snapshot of /dev/sdg"

Unfreeze disk writes and unlock tables
3. mysql -u root -ppassw-lab awslab
(at the MYSQL prompt) 
A. SYSTEM sudo xfs_freeze -u /data 
B. UNLOCK TABLES;

Striping volumes for an Oracle Database

Often times you will want to stripe your Oracle database volumes for better performance.  Here are the steps for creating the EBS volumes and creating the Linux logical volume:

1. aws ec2 create-volume --availability-zone us-west-2b --size 100

2. aws ec2 create-volume --availability-zone us-west-2b --size 100

3. aws ec2 describe-volumes --volume-ids vol-7c2e9955 vol-2e2e9907

4. aws ec2 attach-volume --volume-id vol-7c2e9955 --instance-id i-f0ef69c6 --device /dev/sdc

5. aws ec2 attach-volume --volume-id vol-2e2e9907 --instance-id i-f0ef69c6 --device /dev/sdd

6. aws ec2 start-instances --instance-id i-NewDBServer
7. ssh -i YourFile.pem ec2-user@10.50.x.x

Once you are logged into the EC2 instance,  stripe and then recognize your additional volumes with this series of commands:
1. sudo mkdir /mnt/oraclestripe
2. sudo vgcreate vg /dev/sdc /dev/sdd
3. lvcreate -L 200 -n lv -i 2 vg
(Notes:
1. Using default stripesize 64.00 KiB
2. The parameter -i in the lvcreate command specifies the number of physical volumes to stripe across. If you wanted to stripe across more than 2 drives, you would have to specify that number.
)
4. sudo mkfs -t ext3 /dev/vg/lv
5. sudo mount /dev/vg/lv /mnt/oraclestripe
6. Next, update /etc/fstab to ensure these mounted drives are automatically mounted on reboot.
A. sudo vi /etc/fstab and add these lines:
/dev/sdb /mnt/piops1 ext3 defaults 0 2
/dev/vg/lv /mnt/oraclestripe ext3 defaults 0 2

7. df -h (to view the new volumes mounted to the logical volumes created)



Monday, December 2, 2013

Network throughput for an Oracle database : Smaller number of large PIOPS volumes or large number of smaller PIOPS volumes

Individual 4000 PIOP volumes at 16K  I/O's can theoretically transfer 64MB/s.  Smaller PIOP volumes (e.g 1000) can burst up to 40MB/s.   In this case, especially for bursty workloads, it may be more cost effective to use smaller PIOPS volumes (but more of them) in a raid0 configuration, than to use fewer higher rated PIOPS volumes.

Oracle Database size and network throughput : IOPS and network throughput

When configuring an Oracle Database on AWS EC2, you need to consider both storage (EBS) IOPS and network throughput.   With PIOPS, you can achieve up to 4K IOPS per EBS volumes.  However, the EC2 instances (assuming EBS optimized or 10 Gbps cluster compute) can be a potential bottle neck.  For example, the m2.2xlarge instance type has a maximum throughput of 0.5Gb.  Which means this instance type is limited to approximately 3750 * 16 KiB IOPS. Therefore, one 4K PIOPS volume would start to saturate the network.   Take into account the IOPS and instance network throughput when designing your Oracle Database on AWS EC2.

HPC for high IO


Enabled by Cluster family of EC2 instances, which includes:

  • Cluster Compute instances: cc1.4xlarge,cc2.8xlarge
  • Cluster GPU instances : cg1.4xlarge
  • New c3.large, c3.xlarge, c3.2xlarge, c3.4xlarge and c3.8xlarge
Attributes of these instances:


  • 10 Gbps Ethernet
  • Latency and bandwidth about 10X better than “EC2 Classic” 
  • Uses jumbo frames between cluster instances
  • New EC2 API: Placement Groups. A placement group is a logical cluster 


Because HPC instance types have 10 Gbps networks, using 20 volumes attached to an HPC instance you can achieve in the neighborhood of 100 IOPS using 4K PIOPS volumes.

http://www.awsps.com.s3.amazonaws.com/training/computefest/AWS-HPC-BigData-Computefest.pdf

Wednesday, June 5, 2013

How to support on premise and EBS volume back up to S3 with one tool

There are many solutions to move data (backup, replicate, and synchronize) between your on premise environment and AWS S3. However, when you are looking for a solution that can backup your AWS EBS volumes to S3 there are not as many.  There are some vendor specific products (i.e. Oracle Secure Backup) but nothing that natively (at a file system or raw partition level) backups up EBS to S3.  Such a solution, would also have the added value of using the same tool / product to back up on premise disk and EBS volumes using the same method.  One company that offers such a solution is Ctera (http://www.ctera.com).  

Wednesday, March 6, 2013

AWS EBS snapshot volumes for MySQL

This community software solution works to ensure MySQL databases deployed on AWS EBS volumes are keep in sync when snapshots are performed.
https://github.com/alestic/ec2-consistent-snapshot, it flushes OS and some application caches to disk before creating EBS snapshots. It works on most *nix, it will also snapshot arrays of EBS volumes. 

Monday, February 11, 2013

Global data volumes


The global data volume at the end of 2009 has reached 800 EB according to http:www.genevaassociation.org. The Internet video will generate over 18 EB/month in 2013; global mobile data traffic will reach 2 EB/month by 2013 according to a report from CISCO (http://www.cisco.com/en/US/netsol/ns827/networking solutions sub solution.html).