[Linux-cluster] NFS locks and failing over services

Terry td3201 at gmail.com
Tue Sep 4 18:20:48 UTC 2012


On Tue, Sep 4, 2012 at 1:04 PM, Fabio M. Di Nitto <fdinitto at redhat.com>wrote:

> On 09/04/2012 05:01 PM, Terry wrote:
> > Hello,
> >
> > I am running an NFS cluster with 3 exports distributed across 2 nodes.
> >  When I try to relocate an NFS export, it fails.  I then have to disable
> > and enable it on the other node.  Does anyone have any tricks to get
> > around this issue?  I am sure it is due to file locking.  Here's the
> config:
>
> This is a difficult config to support because of some design limitations
> in nfsd and what cluster users expect (exactly your config).
>
> My best guess is that the service fails to relocate because the fs
> cannot be unmounted.
>
> If so, you need to add force_unmount="1" to the fs resources.
>
> If that still doesn't fix the problem, you need to upgrade to a version
> of the resource-agents that support nfsrestart="1" for fs resource.
> This depends on what distro/release you have. nfsrestart does a much
> harder (invasive) action to drop the locks holding the fs. Still
> requires force_unmount to be set. It can be used together with nfslock
> (if nfslock fails, then nfsrestart will kick in).
>
> Fabio
>
> >
> >         /<?xml version="1.0" ?>/
> >
> >         /<cluster config_version="17" name="omadvnfs01">/
> >
> >         /        <cman expected_votes="1" two_node="1"/>/
> >
> >         /        <clusternodes>/
> >
> >         /                <clusternode name="omadvnfs01a.sec.jel.lc
> >         <http://omadvnfs01a.sec.jel.lc>" nodeid="1" votes="1">/
> >
> >         /                        <fence>/
> >
> >         /                                <method name="drac">/
> >
> >         /                                        <device
> >         name="omadvnfs01a-drac"/>/
> >
> >         /                                </method>/
> >
> >         /                        </fence>/
> >
> >         /                </clusternode>/
> >
> >         /                <clusternode name="omadvnfs01b.sec.jel.lc
> >         <http://omadvnfs01b.sec.jel.lc>" nodeid="2" votes="1">/
> >
> >         /                        <fence>/
> >
> >         /                                <method name="drac">/
> >
> >         /                                        <device
> >         name="omadvnfs01b-drac"/>/
> >
> >         /                                </method>/
> >
> >         /                        </fence>/
> >
> >         /                </clusternode>/
> >
> >         /        </clusternodes>/
> >
> >         /        <rm>/
> >
> >         /                <failoverdomains>/
> >
> >         /                        <failoverdomain name="fd_omadvnfs01a"
> >         ordered="1" restricted="0" nofailback="1">/
> >
> >         /                                <failoverdomainnode
> >         name="omadvnfs01a.sec.jel.lc <http://omadvnfs01a.sec.jel.lc>"
> >         priority="1"/>/
> >
> >         /                                <failoverdomainnode
> >         name="omadvnfs01b.sec.jel.lc <http://omadvnfs01b.sec.jel.lc>"
> >         priority="2"/>/
> >
> >         /                        </failoverdomain>/
> >
> >         /                        <failoverdomain name="fd_omadvnfs01b"
> >         ordered="1" restricted="0" nofailback="1">/
> >
> >         /                                <failoverdomainnode
> >         name="omadvnfs01b.sec.jel.lc <http://omadvnfs01b.sec.jel.lc>"
> >         priority="1"/>/
> >
> >         /                                <failoverdomainnode
> >         name="omadvnfs01a.sec.jel.lc <http://omadvnfs01a.sec.jel.lc>"
> >         priority="2"/>/
> >
> >         /                        </failoverdomain>/
> >
> >         /                </failoverdomains>/
> >
> >         /                <resources>/
> >
> >         /                        <ip address="10.198.1.112"
> >         monitor_link="1"/>/
> >
> >         /                        <ip address="10.198.1.113"
> >         monitor_link="1"/>/
> >
> >         /                        <ip address="10.198.1.114"
> >         monitor_link="1"/>/
> >
> >         /                        <ip address="10.198.1.115"
> >         monitor_link="1"/>/
> >
> >         /                        <fs device="/dev/vg_data01a/lv_data01a"
> >         quick_status="0" force_fsck="0" force_unmount="1" fsid="27014"
> >         fstype="ext4" mountpoint="/data01a" name="omadvnfs01-data01a"
> >         options="rw,noatime,nodiratime,data=writeback,commit=30,_netdev"
> >         self_fence="0" nfslock="1"/>/
> >
> >         /                        <fs device="/dev/vg_data01b/lv_data01b"
> >         quick_status="0" force_fsck="0" force_unmount="1" fsid="39436"
> >         fstype="ext4" mountpoint="/data01b" name="omadvnfs01-data01b"
> >         options="rw,noatime,nodiratime,data=writeback,commit=30,_netdev"
> >         self_fence="0" nfslock="1"/>/
> >
> >         /                        <fs device="/dev/vg_data01c/lv_data01c"
> >         quick_status="0" force_fsck="0" force_unmount="1" fsid="99243"
> >         fstype="ext4" mountpoint="/data01c" name="omadvnfs01-data01c"
> >         options="rw,noatime,nodiratime,data=writeback,commit=30,_netdev"
> >         self_fence="0" nfslock="1"/>/
> >
> >         /                        <fs device="/dev/vg_data04/lv_data04"
> >         quick_status="0" force_fsck="0" force_unmount="1" fsid="59016"
> >         fstype="ext4" mountpoint="/data04" name="omadvnfs01-data04"
> >         options="defaults,_netdev" self_fence="0"/>/
> >
> >         /                        <script file="/etc/init.d/postgresql"
> >         name="postgresql"/>/
> >
> >         /                        <nfsexport name="data01a"/>/
> >
> >         /                        <nfsexport name="data01b"/>/
> >
> >         /                        <nfsexport name="data01c"/>/
> >
> >         /                        <nfsclient allow_recover="1"
> >         name="omadvdss01a"
> >         options="async,no_root_squash,rw,no_subtree_check"
> >         target="omadvdss01a"/>/
> >
> >         /                        <nfsclient allow_recover="1"
> >         name="omadvdss01b"
> >         options="async,no_root_squash,rw,no_subtree_check"
> >         target="omadvdss01b"/>/
> >
> >         /                        <nfsclient allow_recover="1"
> >         name="omadvdss01c"
> >         options="async,no_root_squash,rw,no_subtree_check"
> >         target="omadvdss01c"/>/
> >
> >         /                </resources>/
> >
> >         /                <service autostart="1" domain="fd_omadvnfs01b"
> >         name="postgresql">/
> >
> >         /                        <ip ref="10.198.1.112"/>/
> >
> >         /                        <fs ref="omadvnfs01-data04"/>/
> >
> >         /                        <script ref="postgresql"/>/
> >
> >         /                </service>/
> >
> >         /                <service domain="fd_omadvnfs01a"
> >         name="omadvnfs01-nfs-data01a" nfslock="1" recovery="relocate">/
> >
> >         /                        <ip ref="10.198.1.113"/>/
> >
> >         /                        <fs ref="omadvnfs01-data01a">/
> >
> >         /                                <nfsexport ref="data01a">/
> >
> >         /                                        <nfsclient
> >         ref="omadvdss01a"/>/
> >
> >         /                                        <nfsclient
> >         ref="omadvdss01b"/>/
> >
> >         /                                        <nfsclient
> >         ref="omadvdss01c"/>/
> >
> >         /                                </nfsexport>/
> >
> >         /                        </fs>/
> >
> >         /                </service>/
> >
> >         /                <service domain="fd_omadvnfs01a"
> >         name="omadvnfs01-nfs-data01b" nfslock="1" recovery="relocate">/
> >
> >         /                        <ip ref="10.198.1.114"/>/
> >
> >         /                        <fs ref="omadvnfs01-data01b">/
> >
> >         /                                <nfsexport ref="data01b">/
> >
> >         /                                        <nfsclient
> >         ref="omadvdss01a"/>/
> >
> >         /                                        <nfsclient
> >         ref="omadvdss01b"/>/
> >
> >         /                                        <nfsclient
> >         ref="omadvdss01c"/>/
> >
> >         /                                </nfsexport>/
> >
> >         /                        </fs>/
> >
> >         /                </service>/
> >
> >         /                <service domain="fd_omadvnfs01b"
> >         name="omadvnfs01-nfs-data01c" nfslock="1" recovery="relocate">/
> >
> >         /                        <ip ref="10.198.1.115"/>/
> >
> >         /                        <fs ref="omadvnfs01-data01c">/
> >
> >         /                                <nfsexport ref="data01c">/
> >
> >         /                                        <nfsclient
> >         ref="omadvdss01a"/>/
> >
> >         /                                        <nfsclient
> >         ref="omadvdss01b"/>/
> >
> >         /                                        <nfsclient
> >         ref="omadvdss01c"/>/
> >
> >         /                                </nfsexport>/
> >
> >         /                        </fs>/
> >
> >         /                </service>/
> >
> >         /        </rm>/
> >
> >         /</cluster>/
> >
> >
> >
>
> I am on ubuntu 12.04.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-cluster/attachments/20120904/4933f85d/attachment.htm>


More information about the Linux-cluster mailing list