Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 56659

Summary: drbd does not install a start stop script in /etc/init.d/
Product: Gentoo Linux Reporter: Jeffrey Crawford <jeffrey>
Component: New packagesAssignee: Gentoo Cluster Team <cluster>
Status: RESOLVED FIXED    
Severity: major    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jeffrey Crawford 2004-07-11 00:18:32 UTC
After installing drbd I was unable to find a scipt that was in the gentoo format that allowed me to start and stop the driver part of the service. (datadisk in /etc/ha.d/resource.d/datadisk is present from heartbeat but it does not load the drvd driver)

Reproducible: Always
Steps to Reproduce:
1. emerge drbd
2. look for /etc/init.d/drbd
3. not find it

Actual Results:  
Could not find start stop script


I have written my own start stop script: "/etc/init.d/drbd"

*********************************************************
#!/sbin/runscript
                                                                                
depend() {
  need   net
  before heartbeat
  after  sshd           # In case there are sync problems
}
                                                                                
start() {
  ebegin "Starting drbd mirror driver"
  ${DRBD} ${DRBDDEV} start
  if [ "$?" == "1" ]; then      # In case you decide this
    eend 0                      # node is primary the
  fi                            # script returns 1
  eend $?
}
                                                                                
stop() {
  ebegin "Stopping drbd mirror driver"
  ${DRBD} ${DRBDDEV} stop
  eend $?
}
***********************************************

and "/etc/conf.d/drbd":
***********************************************
DRBD=/drbd      # This is an odd place for the script!
DRBDDEV=drbd0
***********************************************

I have set up the script to start after sshd so that I can control the sync
when the servers are waiting for input during boot. This has saved me trips
many times.
Comment 1 Michael Imhof (RETIRED) gentoo-dev 2004-08-30 06:52:20 UTC
I bumped it to -r1 and added your conf.d file and init script. Please have a look if everything is ok this way and report back.

Thanks in advance.
Comment 2 Jeffrey Crawford 2004-08-31 08:22:47 UTC
This works for me..., I do have one additional question, why is the "vendor" provided start stop script in root "/" and not in /bin:/usr/bin:/sbin etc.
Comment 3 Jeffrey Crawford 2004-10-06 16:29:32 UTC
On a new emerge the config file called /etc/conf.d/0.6.12-conf.d was created.. This should be /etc/conf.d/drbd. After renaming it the start script works correctly
Comment 4 Christian Zoffoli (RETIRED) gentoo-dev 2005-01-19 10:42:43 UTC
the ebuild is already fixed in portage