Date: 18 Feb 2003 20:11:31 -0500 From: Chris Shenton <chris@shenton.org> To: current@freebsd.org Subject: Re: Diskless: 5.0R scripts, boot, NFS mount problems I didn't have in 4.7S Message-ID: <87fzql6pmk.fsf@Pectopah.shenton.org> In-Reply-To: <87el65pi4e.fsf@Pectopah.shenton.org> References: <87el65pi4e.fsf@Pectopah.shenton.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Chris Shenton <chris@shenton.org> writes:
> I've moved the "mount -a" near the top of rc.d/diskless since it
> runs commands which are and not available until /usr is mounted
> (e.g., mtree). The NFS mount fails with a message I don't
> understand:
>
> [udp] pectopah.shenton.org:/usr: RPCPROG_NFS: RPC: Unknown host
Tasteless self-followup:
I get the same error when the boot process fails and drops me to a
shell; I can get it with UDP or TCP mounts. For example:
mount_nfs -U -2 192.168.255.185:/usr /mnt
mount_nfs -U -3 192.168.255.185:/usr /mnt
mount_nfs -T -2 192.168.255.185:/usr /mnt
mount_nfs -T -3 192.168.255.185:/usr /mnt
The only difference is the [udp] vs [tcp] in the error msg:
[tcp] 192.168.255.185:/usr: RPCPROG_NFS: RPC: Unknown host
I sniffed traffic with tcpdump and ethereal: the diskless client is
contacting the server so it's not having problems resolving that IP
addr.
I'm not hard-core enough to understand what might cause this failure,
which occurs in /usr/src/sbin/mount_nfs/mount_nfs.c:
if (portspec != NULL) {
/* `ai' contains the complete nfsd sockaddr. */
nfs_nb.buf = ai->ai_addr;
nfs_nb.len = nfs_nb.maxlen = ai->ai_addrlen;
} else {
/* Ask the remote rpcbind. */
nfs_nb.buf = &nfs_ss;
nfs_nb.len = nfs_nb.maxlen = sizeof nfs_ss;
if (!rpcb_getaddr(RPCPROG_NFS, nfsvers, nconf, &nfs_nb,
hostp)) {
if (rpc_createerr.cf_stat == RPC_PROGVERSMISMATCH &&
trymntmode == ANY) {
trymntmode = V2;
goto tryagain;
}
snprintf(errbuf, sizeof errbuf, "[%s] %s:%s: %s",
netid, hostp, spec,
clnt_spcreateerror("RPCPROG_NFS"));
return (returncode(rpc_createerr.cf_stat,
&rpc_createerr.cf_error));
}
}
To see if this was a portmapper/rpcbind issue, I tried doing the
client mount and specifying the port:
mount -o port=2049 192.168.255.185:/usr /mnt
and got a slightly different error:
[udp] 192.168.255.185:/usr: RPCMNT: clnt_create: RPC: Unknown host
and now I'm definitely over my head trying to read mount_nfs.c. :-(
I don't understand this since the client is able to mount
/usr/local/diskless to get the root filesystem and run the kernel.
But I believe pxeboot is doing this, not a full FreeBSD binary.
What's the difference in the way the mount?
Any suggestions? Thanks.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87fzql6pmk.fsf>
