Need help to create a script

Discussion in 'Command Line' started by nilfs2, Oct 25, 2013.

  1. nilfs2

    nilfs2 New Member

    Oct 25, 2013
    Likes Received:
    Hello everybody, this is my first post.

    I need help to create a script to update DNS records automatically on Bind, I have this idea: I have a 3 node Gluster NFS server (lets call the nodes "Gluster1", "Gluster2" and "Gluster3"), it is running Gluster as Replica (the 3 nodes have the same data all the time), the Gluster client mounts the share by pointing to a record on Bind called "Gluster" (ex: mount gluster:/data /mnt), that record have the 3 gluster nodes IPs associated (that's called DNS round-robin I believe), that means that any of the 3 IPs can respond when the gluster client does a DNS query for "Gluster". What I'm trying to accomplish is to give high availability to the Gluster server mount point by creating a script that pings the 3 gluster nodes constantly, and when a node stops responding the IP of the failed node gets remove from Bind, so when the gluster client does a query for "Gluster", it won't get the IP of the failed node, and when the failed node comes back again, its IP gets inserted again into Bind.

    The 3 Gluster nodes, the Gluster client as well as the Bind server have passwordless (certificate) ssh authentication enabled, so it won't be a problem to send commands between servers through ssh; all the servers and clients are Debian 7.1 amd64.

    Thanks in advance for your help.
    DevynCJohnson likes this.
  2. Kovax

    Kovax Member

    Jan 13, 2014
    Likes Received:
    How about use rsync to update the files from node1 to node2 and from node2 to node3??
    Would that work for you?
    ryanvade likes this.

Share This Page