Solaris 9 <---> linux (2.6.8) NFS file locking problem?
From: Grzegorz Bakalarski (G.Bakalarski_at_icm.edu.pl)
Date: 11/24/04
- Previous message: Josh: "Help Required."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 24 Nov 2004 13:08:29 +0100 To: sunmanagers@sunmanagers.org
Dear All,
This is Solaris <--> Linux NFS question:
I have new Linux (Debian kernel 2.6.8-1-686) nfs server and two SUN Solaris 9
nfs clients (recently patched). An application runs on clients and writes
to the same file placed on nfs filesystem. The application is a perl script,
so to be sure (that the servers write to the file one by one) I modified
script using flock in the following manner:
open LOGGER, ">> $file";
flock(LOGGER,2);
seek(LOGGER, 0, 2);
printf LOGGER $format,$a,$b,$c;
close LOGGER;
The printf writes ascii lines. And I still can see one server writes within
other server's line.
All machines work in private network (no gateways or any thing between them).
There is no DNS in a private network - only /etc/hosts entries.
I checked probably all: lockd, statd are running on all systems, tried nfs
version 2,3 & 4; udp, tcp, noac - no success.
Here is output from rpcinfo from server to clients and from clients to server:
*****server> rpcinfo -p client1
program vers proto port
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100008 1 udp 32772 walld
100221 1 tcp 32771
100229 1 tcp 32772
100229 2 tcp 32772
100422 1 tcp 32773
100024 1 udp 32773 status
100024 1 tcp 32774 status
100133 1 udp 32773
100133 1 tcp 32774
100021 1 udp 4045 nlockmgr
100021 2 udp 4045 nlockmgr
100021 3 udp 4045 nlockmgr
100021 4 udp 4045 nlockmgr
100021 1 tcp 4045 nlockmgr
100021 2 tcp 4045 nlockmgr
100021 3 tcp 4045 nlockmgr
100021 4 tcp 4045 nlockmgr
100005 1 udp 32781 mountd
100005 2 udp 32781 mountd
100005 3 udp 32781 mountd
100005 1 tcp 32779 mountd
100005 2 tcp 32779 mountd
100005 3 tcp 32779 mountd
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100227 2 udp 2049
100227 3 udp 2049
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100227 2 tcp 2049
100227 3 tcp 2049
100249 1 udp 32788
100249 1 tcp 32784
300598 1 udp 32791
300598 1 tcp 32785
805306368 1 udp 32791
805306368 1 tcp 32785
**************server> rpcinfo -p client2
program vers proto port
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100229 1 tcp 32771
100229 2 tcp 32771
100230 1 tcp 32772
100242 1 tcp 32773
100068 2 udp 32772
100068 3 udp 32772
100068 4 udp 32772
100068 5 udp 32772
100001 2 udp 32773 rstatd
100001 3 udp 32773 rstatd
100001 4 udp 32773 rstatd
100422 1 tcp 32774
100024 1 udp 32775 status
100024 1 tcp 32775 status
100133 1 udp 32775
100133 1 tcp 32775
100021 1 udp 4045 nlockmgr
100021 2 udp 4045 nlockmgr
100021 3 udp 4045 nlockmgr
100021 4 udp 4045 nlockmgr
100021 1 tcp 4045 nlockmgr
100021 2 tcp 4045 nlockmgr
100021 3 tcp 4045 nlockmgr
100021 4 tcp 4045 nlockmgr
100005 1 udp 32781 mountd
100005 2 udp 32781 mountd
100005 3 udp 32781 mountd
100005 1 tcp 32778 mountd
100005 2 tcp 32778 mountd
100005 3 tcp 32778 mountd
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100227 2 udp 2049
100227 3 udp 2049
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100227 2 tcp 2049
100227 3 tcp 2049
300598 1 udp 32785
300598 1 tcp 32782
805306368 1 udp 32785
805306368 1 tcp 32782
100249 1 udp 32786
100249 1 tcp 32783
*********client1> rpcinfo -p server
program vers proto port service
100000 2 tcp 111 rpcbind
100000 2 udp 111 rpcbind
391002 2 tcp 833
100024 1 udp 995 status
100024 1 tcp 998 status
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100021 1 udp 33318 nlockmgr
100021 3 udp 33318 nlockmgr
100021 4 udp 33318 nlockmgr
100021 1 tcp 60872 nlockmgr
100021 3 tcp 60872 nlockmgr
100021 4 tcp 60872 nlockmgr
100005 1 udp 899 mountd
100005 1 tcp 902 mountd
100005 2 udp 899 mountd
100005 2 tcp 902 mountd
100005 3 udp 899 mountd
100005 3 tcp 902 mountd
********* client2> rpcinfo -p server
program vers proto port service
100000 2 tcp 111 rpcbind
100000 2 udp 111 rpcbind
391002 2 tcp 833
100024 1 udp 995 status
100024 1 tcp 998 status
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100021 1 udp 33318 nlockmgr
100021 3 udp 33318 nlockmgr
100021 4 udp 33318 nlockmgr
100021 1 tcp 60872 nlockmgr
100021 3 tcp 60872 nlockmgr
100021 4 tcp 60872 nlockmgr
100005 1 udp 899 mountd
100005 1 tcp 902 mountd
100005 2 udp 899 mountd
100005 2 tcp 902 mountd
100005 3 udp 899 mountd
100005 3 tcp 902 mountd
PROCESSES:
*********server> ps -ef|egrep "nfs|lock|stat|rpc"
root 42 3 0 Oct22 ? 00:00:00 [kblockd/0]
root 25832 1 0 Nov18 ? 00:00:00 /sbin/rpc.statd
root 13854 1 0 Nov19 ? 00:00:09 [nfsd]
root 13855 1 0 Nov19 ? 00:00:09 [nfsd]
root 13856 1 0 Nov19 ? 00:00:07 [nfsd]
root 13857 1 0 Nov19 ? 00:00:09 [nfsd]
root 13858 1 0 Nov19 ? 00:00:09 [nfsd]
root 13859 1 0 Nov19 ? 00:00:08 [nfsd]
root 13860 1 0 Nov19 ? 00:00:10 [nfsd]
root 13861 1 0 Nov19 ? 00:00:09 [nfsd]
root 13864 1 0 Nov19 ? 00:00:04 [lockd]
root 13865 1 0 Nov19 ? 00:00:00 [rpciod]
root 13867 1 0 Nov19 ? 00:00:01 /usr/sbin/rpc.mountd
**********client1> ps -ef|egrep "nfs|lock|stat|rpc"
root 283 1 0 Nov 22 ? 0:00 /usr/sbin/rpcbind
daemon 321 1 0 Nov 22 ? 0:00 /usr/lib/nfs/statd
root 322 1 0 Nov 22 ? 0:01 /usr/lib/nfs/lockd
root 466 1 0 Nov 22 ? 0:00 /usr/lib/nfs/nfsd
root 464 1 0 Nov 22 ? 0:00 /usr/lib/nfs/mountd
*********client2>
ps -ef|egrep "nfs|lock|stat|rpc"
root 280 1 0 Nov 23 ? 0:00 /usr/lib/nfs/lockd
root 243 1 0 Nov 23 ? 0:00 /usr/sbin/rpcbind
daemon 281 1 0 Nov 23 ? 0:00 /usr/lib/nfs/statd
root 554 1 0 Nov 23 ? 0:00 /usr/lib/nfs/mountd
root 559 1 0 Nov 23 ? 0:00 /usr/lib/nfs/nfsd
On a server I can see the following messages during mount/umount:
Nov 24 12:10:46 server rpc.mountd: authenticated unmount request from client2:729 for /mnt/sda4 (/mnt/sda4)
Nov 24 12:10:52 server rpc.mountd: authenticated mount request from client2:749 for /mnt/sda4 (/mnt/sda4)
Nov 24 12:11:53 server rpc.mountd: authenticated unmount request from client1:776 for /mnt/sda4 (/mnt/sda4)
Nov 24 12:11:56 server rpc.mountd: authenticated mount request from client1:776 for /mnt/sda4 (/mnt/sda4)
Mount entry on clients:
server:/mnt/sda4 - /disk/server nfs - yes rw,vers=3,proto=tcp,bg,noac
Export on server:
/mnt/sda4 192.168.1.0/255.255.255.0(sync,no_wdelay,rw)
Can anybody help me?
GB
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
- Previous message: Josh: "Help Required."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|