Mailing List Archive

[PATCH] handle idmapd using nfsserver RA
Hi,

I am trying to setup NFSv4 server using nfsserver RA,
and adding some handlings for rpc.idmad.
http://linux.die.net/man/8/rpc.idmapd

Please see the attached.

/etc/init.d/nfs script which is included with RHEL6.2 starts idmad
during its starting process.

# /etc/init.d/nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
Starting RPC idmapd : [ OK ]

But nfs init script does not stop idmapd, so I need this patch for now.
How's that for the other distribution?

# /etc/init.d/nfs stop
Shutting down NFS mountd: [ OK ]
Shutting down NFS daemon: [ OK ]
Shutting down NFS quotas: [ OK ]
Shutting down NFS services: [ OK ]

# /etc/init.d/rpcidmapd status
rpc.idmapd (pid 17450) is running...

Thanks,
Junko IKEDA

NTT DATA INTELLILINK CORPORATION
Re: [PATCH] handle idmapd using nfsserver RA [ In reply to ]
Hi,

My previous patch had a spelling error, revise it just a bit.

Thanks,
Junko

2012/5/30 Junko IKEDA <tsukishima.ha@gmail.com>:
> Hi,
>
> I am trying to setup NFSv4 server using nfsserver RA,
> and adding some handlings for rpc.idmad.
> http://linux.die.net/man/8/rpc.idmapd
>
> Please see the attached.
>
> /etc/init.d/nfs script which is included with RHEL6.2 starts idmad
> during its starting process.
>
> # /etc/init.d/nfs start
> Starting NFS services:                                     [  OK  ]
> Starting NFS quotas:                                       [  OK  ]
> Starting NFS daemon:                                       [  OK  ]
> Starting NFS mountd:                                       [  OK  ]
> Starting RPC idmapd :                                       [  OK  ]
>
> But nfs init script does not stop idmapd, so I need this patch for now.
> How's that for the other distribution?
>
> # /etc/init.d/nfs stop
> Shutting down NFS mountd:                                  [  OK  ]
> Shutting down NFS daemon:                                  [  OK  ]
> Shutting down NFS quotas:                                  [  OK  ]
> Shutting down NFS services:                                [  OK  ]
>
> # /etc/init.d/rpcidmapd status
> rpc.idmapd (pid 17450) is running...
>
> Thanks,
> Junko IKEDA
>
> NTT DATA INTELLILINK CORPORATION
Re: [PATCH] handle idmapd using nfsserver RA [ In reply to ]
Hi Junko-san,

On Thu, May 31, 2012 at 10:22:27AM +0900, Junko IKEDA wrote:
> Hi,
>
> My previous patch had a spelling error, revise it just a bit.
>
> Thanks,
> Junko
>
> 2012/5/30 Junko IKEDA <tsukishima.ha@gmail.com>:
> > Hi,
> >
> > I am trying to setup NFSv4 server using nfsserver RA,
> > and adding some handlings for rpc.idmad.
> > http://linux.die.net/man/8/rpc.idmapd
> >
> > Please see the attached.
> >
> > /etc/init.d/nfs script which is included with RHEL6.2 starts idmad
> > during its starting process.
> >
> > # /etc/init.d/nfs start
> > Starting NFS services:                                     [  OK  ]
> > Starting NFS quotas:                                       [  OK  ]
> > Starting NFS daemon:                                       [  OK  ]
> > Starting NFS mountd:                                       [  OK  ]
> > Starting RPC idmapd :                                       [  OK  ]
> >
> > But nfs init script does not stop idmapd, so I need this patch for now.
> > How's that for the other distribution?

On a SLE11SP2 box:

# rcnfsserver start
Starting kernel based NFS server: idmapd mountd statd nfsd sm-notify done
# rcnfsserver stop
Shutting down kernel based NFS server: nfsd statd mountd idmapd done

> > # /etc/init.d/nfs stop
> > Shutting down NFS mountd:                                  [  OK  ]
> > Shutting down NFS daemon:                                  [  OK  ]
> > Shutting down NFS quotas:                                  [  OK  ]
> > Shutting down NFS services:                                [  OK  ]

That sounds like it should be fixed in the init script. Anyway,
are there any ill effects if idmapd continues running?

Let's first clarify this before analyzing the patch.

Cheers,

Dejan

> > # /etc/init.d/rpcidmapd status
> > rpc.idmapd (pid 17450) is running...
> >
> > Thanks,
> > Junko IKEDA
> >
> > NTT DATA INTELLILINK CORPORATION


> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: [PATCH] handle idmapd using nfsserver RA [ In reply to ]
> That sounds like it should be fixed in the init script. Anyway,
> are there any ill effects if idmapd continues running?

OK, SLE11SP2' stops nfs and idmapd together,
it means the current nfsserver RA would work fine on it.

Here is the behavior with RHEL6.

1) Initial status; NFS and VIP start successfully.

# crm_mon -1

============
Last updated: Thu Jun 7 10:59:14 2012
Stack: Heartbeat
Current DC: dl380g5d (3f6ec88d-ee47-4f63-bfeb-652b8dd96027) -
partition with quorum
Version: 1.0.12-066152e
2 Nodes configured, unknown expected votes
1 Resources configured.
============

Online: [ dl380g5c dl380g5d ]

Resource Group: group01
ipaddr2 (ocf::heartbeat:IPaddr2): Started dl380g5c
nfsserver (ocf::heartbeat:nfsserver): Started dl380g5c


"/var/lib/nfs" and "/var/lib/nfs/rpc_pipefs" are the mount points
which nfsserver RA runs.

# mount
<snip>
nfsd on /proc/fs/nfsd type nfsd (rw)
/export on /var/lib/nfs type none (rw,bind)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)


2) Stop Heartbeat, NFS and VIP fail over to the other node.

# service heartbeat stop

After stopping Heartbeat, there remains the mount points... :/

# mount
<snip>
nfsd on /proc/fs/nfsd type nfsd (rw)
/export on /var/lib/nfs type none (rw,bind)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)


ha-log says;

# vim /var/log/ha-log
Jun 7 10:59:44 dl380g5c nfsserver(nfsserver)[16596]: INFO: Stopping
NFS server ...
Jun 7 10:59:44 dl380g5c lrmd: [15945]: info: RA output:
(nfsserver:stop:stderr) umount: /var/lib/nfs: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
Jun 7 10:59:44 dl380g5c nfsserver(nfsserver)[16596]: INFO: NFS server stopped


I tried to umount manually, and it failed.

# umount /var/lib/nfs/rpc_pipefs
umount: /var/lib/nfs/rpc_pipefs: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))

# umount /var/lib/nfs
umount: /var/lib/nfs: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))


It seemed that ipmapd grabs them.

# /etc/init.d/rpcidmapd stop
# umount /var/lib/nfs/rpc_pipefs
# umount /var/lib/nfs

now, the mount points are released successfully.

Thanks,
Junko