Top Banner
GCE - NFS with NLB Simon Su @ MiCloud
13

GCE NFS HA

Jul 16, 2015

Download

Technology

Simon Su
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: GCE NFS HA

GCE - NFS with NLB Simon Su @ MiCloud

Page 2: GCE NFS HA

Objective

We want to know network load balancer backup pool will work with NFS or not. And how many latency when main pool switch to backup pool…

PS: This is just a lab… Using GCS bucket notification service to sync running servers’ file will better than others… Or using GCS as file read write service will excellent!

Page 3: GCE NFS HA

Network Load Balancer(nfs-lb / 130.211.245.39)

nfs-1(nfs-pool)

nfs-client(104.155.196.85)

nfs-2(nfs-pool-bk)

rsync

Page 4: GCE NFS HA

Prepare servers - nfs-1, nfs-2

● nfs server○ yum update -y && yum install rpcbind nfs-utils -y○ /etc/init.d/rpcbind start○ /etc/init.d/nfs start○ /etc/init.d/nfslock start○ chkconfig rpcbind on○ chkconfig nfs on○ chkconfig nfslock on

Page 5: GCE NFS HA

Create a firewall rule for tag - nfs

client external ip

load balancer ip

internal ip

Page 6: GCE NFS HA

Instance with nfs tag

Page 7: GCE NFS HA

Create main pool with back pool

Page 8: GCE NFS HA

Create forwarding rule

Connect IP

Page 9: GCE NFS HA

Prepare client - nfs-client

● nfs-client○ rpcinfo -p [remote address]○ mount -t nfs [load balancer ip]:/data /mnt

Page 10: GCE NFS HA

Continue read file test

while [ true ] ;

do

echo `date` - `cat /mnt/1234` ;

sleep 3;

done

Page 11: GCE NFS HA

See the test - http://youtu.be/WsEyXOmI4OY

Page 12: GCE NFS HA

Issues

● rapidly switch nfs server will let nfs client crash● ever switch between main pool to back pool will

cost about 30sec ~ 60sec

Page 13: GCE NFS HA

Reference

● http://linux.vbird.org/linux_server/0330nfs.php