[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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 redhat com [mailto:linux-cluster-bounces redhat com] On Behalf Of Tom Lanyon
Sent: Thursday, 21 August 2008 1:08 PM
To: linux-cluster 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 redhat com
https://www.redhat.com/mailman/listinfo/linux-cluster


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]