Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Mar 2011 03:48:06 GMT
From:      johnpupu <johnpupu@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   docs/155372: hast doc bug
Message-ID:  <201103080348.p283m6sL097691@red.freebsd.org>
Resent-Message-ID: <201103080350.p283o7ET052312@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         155372
>Category:       docs
>Synopsis:       hast doc bug
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 08 03:50:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     johnpupu
>Release:        8.2-RELEASE
>Organization:
Green-Computing
>Environment:
FreeBSD hasta.sundin.com.tw 8.2-RELEASE
>Description:
/usr/local/sbin/carp-hast-switch
when hast change to slave, it unmounts unsuccessfully
becourse the grep result is nothing.
>How-To-Repeat:
ifconfig carp0 down && ifconfig carp0 up
>Fix:
if ! mount | grep -q "^${disk} on "
change to 
if ! mount | grep -q "^/dev/hast/${disk} on "


Patch attached with submission follows:

--- /usr/local/sbin/carp-hast-switch.org	2011-03-08 11:45:43.000000000 +0800
+++ /usr/local/sbin/carp-hast-switch	2011-03-08 11:43:59.000000000 +0800
@@ -66,7 +66,7 @@
 
         # Switch roles for the HAST resources
         for disk in ${resources}; do
-            if ! mount | grep -q "^${disk} on "
+            if ! mount | grep -q "^/dev/hast/${disk} on "
             then
             else
                 umount -f /hast/${disk}


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103080348.p283m6sL097691>