nfs and cifs options for aws (stg401) | aws re:invent 2013
DESCRIPTION
In this session, you learn about the use cases for Network File Systems (NFS) and Common Internet File Systems (CIFS), and when NFS and CIFS are appropriate on AWS. We cover the use cases for ephemeral, Amazon EBS, Amazon EBS P-IOPS, and Amazon S3 as the persistent stores for NFS and CIFS shares. We share AWS CloudFormation templates that build multiple solutionsa single instance with Amazon EBS, clustered instances with Amazon EBS, and Gluster clusteras well as introduce AWS partner solutions.TRANSCRIPT
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc.
STG401 - NFS and CIFS options on AWS
Craig Carl, AWS
November 15, 2013
What are NFS and CIFS?
• Protocols used to implement shared access to files
• Different from block and object storage
• Current versions – – NFS v4
– SMB v3
Do I really need a POSIX file system?
• Legacy applications
• Shared/clustered databases
• Multi-instance read and write access to the
same data set
Important considerations
• Availability – Single AZ = no durability commitments
– Dual AZ = 99.95% available
• Durability – Backing store
• Performance – Network interface
– EBS interface
– EBS performance
• Consistency – Pay attention to replication types
Backing stores
• EBS – between 0.1% – 0.5% AFR per volume
• Ephemeral – hs1.8xlarge
• 48 terabytes of storage across 24 hard disk drives
– i2.8xlarge • ~5.7 terabytes of storage across 8 SSDs
• S3 – designed for 99.999999999% durability
Single EBS-backed instance
EBS
NFS
SAMBA
MDADM
RAID 0
array
raidformer.py
ec2-consistent-snapshot
arche
Public facing IP interface
Low performance
Moderate performance
10 Gigabit interface
t1.micro, m1.small, m1.medium, m1.large
c1.medium, m2.xlarge, m2,2xlarge, m3.xlarge
c1.xlarge, m1.xlarge, m3.2xlarge, m2.4xlarge
cc1.4xlarge, cc2.8xlarge, cg1.4xlarge,
cr1.8large, hi1.4xlarge, hi2.8xlarge,
hs1.8xlarge
EBS facing interface Variable
500 megabit, committed
10 gigabit, shared with public traffic
everything, except EBS Optimized instances
EBS Optimized = yes
m1.large, m2.2xlarge, m3.xlarge
cc1.4xlarge, cc2.8xlarge, cg1.4xlarge,
cr1.8large, hi1.4xlarge, hi2.8xlarge,
hs1.8xlarge
1 gigabit, committed
EBS Optimized = yes
m1.xlarge, m2.4xlarge, c1.xlarge, m3.2xlarge
Single EBS-backed instance
# sudo yum install nfs-utils nfs-utils-lib samba samba-commons cups-libs # raidformer.py --size 100 –count 6 –raidlevel 0 --mountpoint /exports -–wipe –attach # sudo vim /etc/exports # sudo vim /etc/samba/smb.conf raidformer.py -- https://github.com/jsmartin/raidformer
Ephemeral backed instance with DRBD to EBS
NFS
SAMBA
MDADM
RAID 0
array
raidformer.py
ec2-consistent-snapshot
MDADM
RAID 0
array
DRBD
protocol A
replication
This is asynchronous replication
Monitoring the latency of this
replication is critical!
Snapshot the EBS array
# cat /proc/drbd #look for ‘oos’
Ephemeral backed instance with DRBD to EBS
global { usage-count yes; } common { net { protocol A; } } # /etc/drbd.d/global_common.conf
Ephemeral backed instance with DRBD to EBS
resource r0 { on az-a{ device /dev/drbd0; disk /dev/md0; address 10.1.1.1:7789; meta-disk internal; } on az-a{ device /dev/drbd1; disk /dev/md1; address 10.1.1.1:7789; meta-disk internal; } } #/etc/drbd.d/r0.res
Pacemaker clustered with EBS
EBS
NFS
SAMBA
EBS
NFS
SAMBA
DRBD
protocol C
PACEMAKER
AZ-A AZ-B
Pacemaker clustered with EBS
#!/bin/sh VIP=10.1.1.1 REGION=us-east-1 Instance_ID=`/usr/bin/curl --silent http://169.254.169.254/latest/meta-data/instance-id` ENI_ID=`aws ec2 describe-instances --instance-id $Instance_ID --region $REGION | grep NetworkInterfaceId | cut -d '"' -f 4` aws ec2 assign-private-ip-addresses --network-interface-id $ENI_ID --private-ip-addresses $VIP --allow-reassignment --region $REGION
Pacemaker clustered with Ephemeral
raidformer.py
ec2-consistent-snapshot
AZ-A AZ-B
Pacemaker clustered with Ephemeral + EBS
MDADM
RAID 0
array
DRBD
protocol A
(asynchronous)
AZ-A AZ-B
Gluster
GlusterFS
NFS
GlusterFS
NFS
GlusterFS
NFS
GlusterFS
NFS
GlusterFS
NFS
GlusterFS
NFS
GlusterFS
NFS
GlusterFS
NFS
GlusterFS
NFS
GlusterFS
NFS
GlusterFS
AZ-A
AZ-B
Gluster
# on the server # gluster volume create replica 2 glu-volume / 10.0.0.1:/gluster 10.0.1.1:/gluster 10.0.0.2:/gluster / 10.0.1.2:/gluster 10.0.0.3:/gluster 10.0.1.3:/gluster / 10.0.0.4:/gluster 10.0.1.4:/gluster 10.0.0.5:/gluster / 10.0.1.5:/gluster # on the client # mount -t glusterfs 10.0.0.1:/glu-volume /mnt/glusterfs
Windows Server 2012
EBS
SMB v3
Windows Server 2012 with DFS
EBS
SMB v3
EBS
SMB v3
Windows Server 2012
DFS
(synchronous replication)
AZ-A AZ-B
partner options
Red Hat Storage
• A supported version of Gluster
• Try it now
– https://testdrive.redhat.com/
• Strongly consistent cross-OS distributed file system
• Migrate unmodified applications to AWS
• Multi-AZ HA and cross-region DR
• Inline deduplication and end-to-end security
• Clients access S3 directly for scale and performance
• TestDrive now at testdrive.maginatics.com
23
Elastic File System for the Cloud
• Multi-AZ redundant
• Exports NFS, CIFS and iSCSI
• Supports ZFS to tier between ephemeral and EBS
• Supports S3 as a backing store
• Available now in AWS Marketplace
Virtual Private Storage Array (VPSA™) Service
• Private Storage-as-a-Service for AWS customers
• Billed hourly, with no AMIs needed
• Low-latency (1~2ms) attach to AWS instances
• Global footprint: US East/West, Europe, Japan
• File (NFS and CIFS) and Block (iSCSI)
• Ridiculously high QoS
• True HA (no single point of failure, 100% SLA)
Availability Zone X
AWS Region A
Availability Zone X
AWS Region N
Zadara Cloud A Zadara Cloud N
Secure remote replication
Zadara via AWS Direct Connect
Availability Zone Y Availability Zone Y
AWS
Direct
Connect
AWS
Direct
Connect
San Jose
& N. Va.
Tokyo
Dublin
L.A.*
*coming soon
Easy Provisioning!
Why Zadara VPSA?
SSD read/write caching
100 TB+ volumes
Shared volumes
Low-impact snapshots
NFS and CIFS
Remote replication
5-minute RPO!
Why Zadara VPSA?
High random write performance
Write cache assisted
Data-at-Rest Encryption
Zero-capacity instant cloning, e.g. for test/dev
100s of volumes
Business Continuity & Disaster Recovery
Protect
• Low-impact snapshots, available immediately
• Snapshot based, latency-tolerant Remote
Replication for multi-region Disaster Recovery
Recover
• Instant, zero-capacity cloning of snapshots
• RPO: 5 minutes
iG
• The largest Internet
portal in Brazil
• 5 TB NFS Volumes
shared by 170
instances connected
to a single VPSA
Please give us your feedback on this
presentation
As a thank you, we will select prize
winners daily for completed surveys!
STG401