Using rrDNS to allow mount-failover with GlusterFS

Using round-robin DNS (rrDNS) makes for an easy way to ensure your clients can mount their volumes regardless of whether a server is down. To do this, create a DNS entry that points to all of your servers. (if you’re not using nsupdate to manage your dns entries, you’re doing it wrong. 😉 )

# nsupdate -k${UPDATE_KEY}
Creating key...
> zone domain.dom
> update add glusterfs.domain.dom. 86400 A 10.0.0.1
> update add glusterfs.domain.dom. 86400 A 10.0.0.2
> update add glusterfs.domain.dom. 86400 A 10.0.0.3
> send

If this worked, you should now be able to see (note that the order may be different every time):

# host glusterfs.domain.dom
glusterfs.domain.dom has address 10.0.0.2
glusterfs.domain.dom has address 10.0.0.1
glusterfs.domain.dom has address 10.0.0.3

Now the rest is easy, use this new dns entry to mount your volumes:

mount -t glusterfs glusterfs:testvol1 /mnt/testvol1
Advertisements

~ by edwyseguru on January 9, 2012.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: