[plug] NFS problem

John Summerfield summer at os2.ami.com.au
Tue Dec 1 07:53:46 WST 1998


On Mon, 30 Nov 1998, Matt Kemner wrote:

> On Sun, 29 Nov 1998, John Summerfield wrote:
> 
> > On Nov 15 I was stuffing round with kernel sources & built kernel 2.1.126
> > which I removed next day as my system froze.
> > 
> > Starts to look as if I should mail to kernel-sources.
> 
> That makes no sense.  It worked with 2.0.35. You upgrade to 2.1.126 (and
> I presume upgraded certain userland utilities as per
> Documentation/Changes) and were dissatisfied with 2.1.126 so went back to
> 2.0.35, and it stops working, hence you blame the kernel.  More likely

Not the kernel. However, I do suspect that the kernels and the version of
nfs I have installed have some incompatibility.

If there is some incompatibility, the kernel writers should know about it.

> it's one of the userland utilities you upgraded that are to blame.
> 
> Try adding the explicit lines
> 
> rpc.mountd: emu.os2.ami.com.au: ALLOW
> rpc.mountd: 192.168.1.2: ALLOW
> 
> to your /etc/hosts.allow
> Shouldnt' make any difference, but the way mountd handles hosts.allow may
> be different from what you expect. rpc.portmap bit me that way.
> 
> Also, I found when I had the same problem you did, that killing mountd,
> and running
> /usr/sbin/rpc.mountd -F -d   # run in foreground, debug
> was very helpful to the cause.
[root at possum /root]#  /usr/sbin/rpc.mountd -F -d   
Usage: /usr/sbin/rpc.mountd [-Fhnpv] [-d kind] [-f exports-file] [-P port]
       [--debug kind] [--help] [--allow-non-root]
       [--promiscuous] [--version] [--port portnum]
       [--exports-file=file]


       
[root at possum /root]#  /usr/sbin/rpc.mountd -F -d   auth -d call
mountd[2139] 12/01/98 07:34 clnt magpie.os2.ami.com.au exports:
mountd[2139] 12/01/98 07:34     /redhat              rw portck
mountd[2139] 12/01/98 07:34 clnt emu.os2.ami.com.au exports:
mountd[2139] 12/01/98 07:34     /redhat              rw portck
mountd[2139] 12/01/98 07:34     /mnt/mo              rw portck
mountd[2139] 12/01/98 07:34     /mnt/cdrom           rw portck
mountd[2139] 12/01/98 07:34     /misc                rw portck
mountd[2139] 12/01/98 07:34 clnt quokka.os2.ami.com.au exports:
mountd[2139] 12/01/98 07:34     /usr/src/linux-2.1.90 rw portck
mountd[2139] 12/01/98 07:34     /redhat              rw portck
mountd[2139] 12/01/98 07:34     /mnt/mo              rw portck
mountd[2139] 12/01/98 07:34     /mnt/cdrom           rw portck
mountd[2139] 12/01/98 07:34     /misc                rw portck
mountd[2139] 12/01/98 07:34     /home/packages       rw noroot portck
mountd[2139] 12/01/98 07:34 flushed host access cache
mountd[2139] 12/01/98 07:34 mnt [1 98/12/1 07:34:41 emu.os2.ami.com.au 0.0+0,1,2,3,4,6,10]
mountd[2139] 12/01/98 07:34     /redhat
mountd[2139] 12/01/98 07:34 NFS mount of /redhat attempted from 192.168.1.2
mountd[2139] 12/01/98 07:34 check unknown clnt addr 192.168.1.2
mountd[2139] 12/01/98 07:34 Unauthorized access by NFS client 192.168.1.2.
mountd[2139] 12/01/98 07:34 Blocked attempt of 192.168.1.2 to mount /redhat
mountd[2139] 12/01/98 07:34     mount res = 13

[root at possum /root]# host emu
emu.os2.ami.com.au has address 192.168.1.2
emu.os2.ami.com.au has address 192.168.0.2
[root at possum /root]# host Formatting page, please wait...

[root at possum /root]# host 192.168.1.2
Name: emu.os2.ami.com.au
Address: 192.168.1.2
Aliases:

[root at possum /root]# nslookup 192.168.1.2
Server:  emu.os2.ami.com.au
Address:  192.168.1.2

Name:    emu.os2.ami.com.au
Address:  192.168.1.2

[root at possum /root]# cat /etc/exports
/home/packages 192.168.0.5 (rw)
/mnt/cdrom 192.168.0.2 (ro)
/mnt/cdrom 192.168.1.2 (ro)
/mnt/cdrom 192.168.0.5 (ro)
/mnt/cdrom quokka.os2.ami.com.au (rw,no_root_squash)
#
/usr/src/linux-2.1.90 192.168.0.5(rw,no_root_squash)
/mnt/mo 192.168.1.2(rw,no_root_squash)
/mnt/cdrom 192.168.1.2(rw,no_root_squash)
/mnt/mo quokka.os2.ami.com.au(rw,no_root_squash)
#
/redhat 192.168.1.2(rw,no_root_squash)
/redhat magpie.os2.ami.com.au(rw,no_root_squash)
/redhat quokka.os2.ami.com.au(rw,no_root_squash)
/misc  192.168.1.2(rw,no_root_squash)
/misc  quokka.os2.ami.com.au(rw,no_root_squash)

[root at possum /root]# 

I tried a mount from quokka:
mountd[2152] 12/01/98 07:42 mnt [1 98/12/1 07:42:24 quokka.os2.ami.com.au 0.0+0,1,2,3,4,6,10]
mountd[2152] 12/01/98 07:42     /mnt/cdrom
mountd[2152] 12/01/98 07:42 NFS mount of /mnt/cdrom attempted from 192.168.1.2
mountd[2152] 12/01/98 07:42 check unknown clnt addr 192.168.1.2
mountd[2152] 12/01/98 07:42 Unauthorized access by NFS client 192.168.1.2.
mountd[2152] 12/01/98 07:42 Blocked attempt of 192.168.1.2 to mount /mnt/cdrom
mountd[2152] 12/01/98 07:42     mount res = 13

I think ipmasq adds to the confusion here.


> running strace -p `pidof rpc.mountd` can be very enlightening too.
Looks mostly gobbldegood to me. I note that the lstat seems to have found
/redhat, but there's nothing I see to explain why it's blocking access.
[root at possum /root]# strace -p `pidof rpc.mountd`
select(256, [4 5], NULL, NULL, NULL)    = ? ERESTARTNOHAND (To be restarted)
--- SIGALRM (Alarm clock) ---
time([912469545])                       = 912469545
alarm(5)                                = 0
sigreturn()                             = ? (mask now [])
select(256, [4 5], NULL, NULL, NULL)    = ? ERESTARTNOHAND (To be restarted)
--- SIGALRM (Alarm clock) ---
time([912469550])                       = 912469550
alarm(5)                                = 0
sigreturn()                             = ? (mask now [])
select(256, [4 5], NULL, NULL, NULL)    = ? ERESTARTNOHAND (To be restarted)
--- SIGALRM (Alarm clock) ---
time([912469555])                       = 912469555
alarm(5)                                = 0
sigreturn()                             = ? (mask now [])
select(256, [4 5], NULL, NULL, NULL)    = ? ERESTARTNOHAND (To be restarted)
--- SIGALRM (Alarm clock) ---
time([912469560])                       = 912469560
alarm(5)                                = 0
sigreturn()                             = ? (mask now [])
select(256, [4 5], NULL, NULL, NULL)    = 1 (in [5])
accept(5, {sin_family=AF_INET, sin_port=htons(814), sin_addr=inet_addr("192.168.1.2")}, [16]) = 0
select(256, [0 4 5], NULL, NULL, NULL)  = 1 (in [0])
select(256, [0 4 5], NULL, NULL, {35, 0}) = 1 (in [0], left {35, 0})
read(0, "\200\0\0x5bh\273\0\0\0\0\0\0\0\2"..., 4000) = 124
time(NULL)                              = 912469561
time(NULL)                              = 912469561
getpid()                                = 2184
open("/etc/hosts.allow", O_RDONLY)      = 1
fstat(1, {st_mode=S_IFREG|0644, st_size=182, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000b000
read(1, "#\n# hosts.allow\tThis file desc"..., 4096) = 182
read(1, "", 4096)                       = 0
close(1)                                = 0
munmap(0x4000b000, 4096)                = 0
open("/etc/hosts.deny", O_RDONLY)       = 1
fstat(1, {st_mode=S_IFREG|0644, st_size=372, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000b000
read(1, "#\n# hosts.deny\tThis file descr"..., 4096) = 372
read(1, "", 4096)                       = 0
close(1)                                = 0
munmap(0x4000b000, 4096)                = 0
lstat("/redhat", {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
time([912469561])                       = 912469561
open("/etc/localtime", O_RDONLY)        = 1
fstat(1, {st_mode=S_IFREG|0644, st_size=150, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000b000
read(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 150
close(1)                                = 0
munmap(0x4000b000, 4096)                = 0
getpid()                                = 2184
sigaction(SIGPIPE, {0x400b1430, [], 0}, {SIG_IGN}) = 0
send(3, "<29>Dec  1 07:46:01 mountd[2184]"..., 83, 0) = 83
sigaction(SIGPIPE, {SIG_IGN}, NULL)     = 0
time([912469561])                       = 912469561
getpid()                                = 2184
sigaction(SIGPIPE, {0x400b1430, [], 0}, {SIG_IGN}) = 0
send(3, "<27>Dec  1 07:46:01 mountd[2184]"..., 82, 0) = 82
sigaction(SIGPIPE, {SIG_IGN}, NULL)     = 0
time([912469561])                       = 912469561
getpid()                                = 2184
sigaction(SIGPIPE, {0x400b1430, [], 0}, {SIG_IGN}) = 0
send(3, "<28>Dec  1 07:46:01 mountd[2184]"..., 83, 0) = 83
sigaction(SIGPIPE, {SIG_IGN}, NULL)     = 0
write(0, "\200\0\0\0345bh\273\0\0\0\1\0\0\0"..., 32) = 32
select(256, [0 4 5], NULL, NULL, NULL)  = 1 (in [0])
select(256, [0 4 5], NULL, NULL, {35, 0}) = 1 (in [0], left {35, 0})
read(0, "", 4000)                       = 0
close(0)                                = 0
select(256, [4 5], NULL, NULL, NULL)    = ? ERESTARTNOHAND (To be restarted)
--- SIGALRM (Alarm clock) ---
time([912469565])                       = 912469565
alarm(5)                                = 0
sigreturn()                             = ? (mask now [])
select(256, [4 5], NULL, NULL, NULL <unfinished ...>


-- 
Cheers
John Summerfield
http://os2.ami.com.au/os2/ for OS/2 support.
Configuration, networking, combined IBM ftpsites index.



More information about the plug mailing list