Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jan 2017 15:03:56 -0800
From:      Karl Young <karly@kipshouse.org>
To:        Greg Byshenk <freebsd@byshenk.net>
Cc:        FreeBSD Stable Mailing List <freebsd-stable@freebsd.org>
Subject:   Re: NFS and amd on older FreeBSD [SOLVED]
Message-ID:  <20170118230356.GD26386@mailboy.kipshouse.net>
In-Reply-To: <20170112190007.GQ26386@mailboy.kipshouse.net>
References:  <20170111234737.GK26386@mailboy.kipshouse.net> <20170112075816.GQ731@v1.leiden.byshenk.net> <20170112190007.GQ26386@mailboy.kipshouse.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Karl Young(karly@kipshouse.org)@2017.01.12 11:00:07 -0800:
> Thanks Greg
> 
> One correction.  The new server is FreeBSD 9.2, not 9.3.  Replies below
> 
> Greg Byshenk(freebsd@byshenk.net)@2017.01.12 08:58:16 +0100:
> > On Wed, Jan 11, 2017 at 03:47:37PM -0800, Karl Young wrote:
> > > I inherited a lab that has a few hundred hosts running FreeBSD 7.2.
> > > These hosts run test scripts that access files that are stored on
> > > FreeBSD 6.3 host.  The 6.3 host exports a /data directory with NFS
> > > 
> > > [...]
> > >
> > > $ showmount -e  9.3-host
> > > Exports list on 9.3-host:
> > > /data                           Everyone
> > > 
> > > But I can't automount it:
> > > 
> > > $ ls -l /net/9.3-host/data
> > > ls: /net/9.3-host/data: No such file or directory
> > > 
> > > If I manually mount the exported directory, it works:
> > > 
> > > $ sudo mount -t nfs 9.3-host:/data /mnt/data/
> > > $ mount | grep nfs
> > > 9.3-host:/data on /mnt/data (nfs)
> > > 
> > > $ ls -l /mnt/data
> > > total 4
> > > drwxr-xr-x  9 root  wheel  512 Dec 20 17:41 iaf2
> > > 
> > > I've spent some time on Google, but haven't found a solution.  I realize
> > > these are very old versions, but I'm not in a position to upgrade them
> > > right now.  My last resort will be to use /etc/fstab to do the NFS
> > > mount, but I'd rather avoid that if I can.
> > 
> > If you can mount the share manually, there is almost 
> > certainly nothing wrong with the server. Based on the
> > error ("No such file or directory"), I would recommend
> > checking your amd config on the client.
> > 
> 
> Yes, that makes sense, but I'm using the same client in both cases.  In
> rc.conf on client, I have:
> 
> 	nfs_reserved_port_only="YES"
> 	nfs_client_enable="YES"
> 	amd_enable="YES"
> 
> 
> And ps shows the amd process started with these flags:
> 
> /usr/sbin/amd -p -a /.amd_mnt -l syslog /host /etc/amd.map /net /etc/amd.map
> 
> amd.map is the default
> 
> $ cat /etc/amd.map 
> # $FreeBSD: src/etc/amd.map,v 1.10.8.1 2009/04/15 03:14:26 kensmith Exp
> # $
> #
> /defaults       type:=host;fs:=${autodir}/${rhost}/host;rhost:=${key}
> *               opts:=rw,grpid,resvport,vers=3,proto=tcp,nosuid,nodev
> 
> This is the same default amd.map as 9.2.
> 
> Another data point: I see the same behavior with a 9.2 client:  I can
> automount a share from my 6.3 server, but not from the 9.2 server.

Well, I might have found a workaround, but it's weird, seems to be
DNS-related.

Something I left out (didn't think it was important) is that the 6.3
server is out on our corporate net, so I used a FQDN:

    ls -l 6.3-server.example.com/data

But the new server lives in our lab, so it has an RFC1918 address, and
doesn't have a .com TLD.

    ls -l 9.2-server.lab/data

I found that if I use the IP address, OR if I terminate the server name
with a '.', it now works.

    ls -l /net/10.15.2.22/data/
    total 4
    drwxr-xr-x  9 root  wheel  512 Dec 20 17:41 iaf2

    $ ls -l /net/9.2-server.lab./data/     
    total 4
    drwxr-xr-x  9 root  wheel  512 Dec 20 17:41 iaf2

    $ ls -l /net/9.2-server.lab/data/
    ls: /net/9.2-server.lab/data/: No such file or directory

    $ showmount -e 9.2-server.lab
    Exports list on 9.2-server.lab:
    /data                           Everyone

Sorry for the diversion.

-karl




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170118230356.GD26386>