[DRBD-user] Current Primary shall become sync TARGET!

Philipp Reisner philipp.reisner at linbit.com
Thu Sep 23 21:09:37 CEST 2004

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


[...]
> The problem occurs due to the way /etc/rc works (at least in Fedora and Red
> Hat): it will shutdown drbd only if there is a file named
> /var/lock/subsys/drbd (or drbd.init).  So, I had to modify the drbd script
> in /etc/init.d to include:
>
> 1) At the end of 'start)' block in 'case "$1" in'
>         touch /var/lock/subsys/drbd
>
> 2)  At the end of 'stop)' block in 'case "$1" in'
>         rm -f /var/lock/subsys/drbd
>
> Now drbd is shut down gracefully before the network interfaces and then
> halting and rebooting the primary is no longer a problem.
>

Author: phil
Date: 2004-09-23 19:03:24 +0200 (Thu, 23 Sep 2004)
New Revision: 1555

Modified:
   branches/drbd-0.7/scripts/drbd
Log:
Reintroduce correct support for RedHat's way of shutting the
system down. (Was already right in drbd-0.6.x)


Modified: branches/drbd-0.7/scripts/drbd
===================================================================
--- branches/drbd-0.7/scripts/drbd      2004-09-23 15:50:38 UTC (rev 1554)
+++ branches/drbd-0.7/scripts/drbd      2004-09-23 17:03:24 UTC (rev 1555)
@@ -62,6 +62,7 @@
                exit 20
            fi
        done
+       [ -d /var/lock/subsys ] && touch /var/lock/subsys/drbd  # for RedHat
        echo "."
        $DRBDADM wait_con_int # User interruptible version of wait_connect all
        ;;
@@ -69,6 +70,7 @@
        echo -n "Stopping all DRBD resources"
        $DRBDADM down all
        $RMMOD drbd
+       [ -f /var/lock/subsys/drbd ] && rm /var/lock/subsys/drbd
        echo "."
        ;;
     status)

Thanks for pointing this out!

-philipp



More information about the drbd-user mailing list