gce nfs ha

13
GCE - NFS with NLB Simon Su @ MiCloud

Upload: simon-su

Post on 16-Jul-2015

197 views

Category:

Technology


0 download

TRANSCRIPT

GCE - NFS with NLB Simon Su @ MiCloud

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!

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

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

Create a firewall rule for tag - nfs

client external ip

load balancer ip

internal ip

Instance with nfs tag

Create main pool with back pool

Create forwarding rule

Connect IP

Prepare client - nfs-client

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

Continue read file test

while [ true ] ;

do

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

sleep 3;

done

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

Issues

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

cost about 30sec ~ 60sec

Reference

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