[Linux-cluster] Common GNBD boot/startup procedures?

Luke Bigum lbigum at iseek.com.au
Thu Aug 21 22:18:34 UTC 2008


I wrote this in a few minutes, pretty dodgy and not fully tested:

$ cat /etc/init.d/gnbd_serv
#!/bin/bash
#
# chkconfig: - 23 77
# description: Starts and stops gnbd server
#
#

#lbigum: crappy script to start GNBD server.

case "$1" in
  start)
        gnbd_serv -n
        gnbd_export -c -e gnbd -d /dev/sda5
        ;;
  stop)
        gnbd_serv -k
        sleep 3
        gnbd_serv -K
        ;;
  *)
        echo $"Usage: $0 {start|stop}"
        ;;
esac

and for a client:

$ cat /etc/init.d/gnbd_client
#!/bin/bash
#
# chkconfig: - 23 77
# description: Starts and stops gnbd client
#
#

case "$1" in
  start)
        modprobe gnbd
        gnbd_import -i hostname.example.com
        ;;
  stop)
        gnbd_import -R
        ;;
    *)
        echo $"Usage: $0 {start|stop}"
        ;;
esac

--
Luke Bigum
Systems Administrator
iseek Communications Pty Ltd
Excellence in business data solutions
ph 1300 661 668 fax 1300 661 540
www.iseek.com.au

-----Original Message-----
From: linux-cluster-bounces at redhat.com [mailto:linux-cluster-bounces at redhat.com] On Behalf Of Tom Lanyon
Sent: Thursday, 21 August 2008 1:08 PM
To: linux-cluster at redhat.com
Subject: [Linux-cluster] Common GNBD boot/startup procedures?

Hi list,

What are people commonly doing to start gnbd_serv and to export/import
GNBDs on server startup?

Thanks,
Tom

--
Tom Lanyon
Systems Administrator
NetSpot Pty Ltd

--
Linux-cluster mailing list
Linux-cluster at redhat.com
https://www.redhat.com/mailman/listinfo/linux-cluster




More information about the Linux-cluster mailing list