Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: autofs in -current



On Wed, 27 Nov 2019 at 23:56, Tomohiro Kusumi <kusumi.tomohiro%gmail.com@localhost> wrote:
>
> Also setting "autofs_debug" sysctl to >1 (e.g. 2) enables a few debug
> prints for autofs side.
>
> https://github.com/NetBSD/src/blob/trunk/sys/fs/autofs/autofs_vfsops.c#L401
>
> 2019年11月28日(木) 8:47 Tomohiro Kusumi <kusumi.tomohiro%gmail.com@localhost>:
> >
> > Recent commits are mostly cleanups except for
> > "autofs: Fix change by r1.3 "prevent assert on unmount."",
> > which is a real bug fix.
> >
> > I see both NFS and local fs succeed.
> > From autofs perspective, there is no difference between automounting
> > NFS and local fs except that you usually specify fs name in
> > /etc/auto_master, etc.
> >
> > Maybe try automountd with debug mode (-d) and/or run it without daemonized.

I am getting:
....
 # /usr/sbin/automountd  -d -T -v
automountd: waiting for request from the kernel
automountd: not forking due to -d flag; will exit after servicing a
single request
automountd: got request 73: from map -hosts, path /net/, prefix
"/net", key "freenas", options "nobrowse,nosuid,intr"
automountd: parsing map "-hosts"
automountd: executing "/etc/autofs/special_hosts freenas" as pid 22822
automountd: "/etc/autofs/special_hosts freenas", pid 22822, terminated
gracefully
automountd: map may contain wildcard entries
automountd: found node defined at [kernel request]:0; not a mountpoint
automountd: creating subtree at /net
automountd: creating subtree at /net/freenas
automountd: creating subtree at /net/freenas/mnt/zxc/common
automountd: creating subtree at /net/freenas/mnt/data/all
automountd: creating subtree at /net/freenas/mnt/data/src
automountd: creating subtree at /net/freenas/mnt/data/xsrc
automountd: creating subtree at /net/freenas/mnt/data/pkgsrc
automountd: creating subtree at /net/freenas/mnt/zxc/iocage/jails/plex/root/mnt
automountd: nothing to mount; exiting
automountd: completing request 73 with error 0
.....

At the same time - after setting the debug level to 2 - I am getting:
...
[ 178492.488590] WARNING: autofs_timeout_wq: request 74 for
/net/freenas/ timed out after 30 seconds
[ 178492.488590] WARNING: autofs_trigger_one: request for
/net/freenas/ completed with error 60
[ 178492.488590] autofs_trigger: trigger failed with error 60; will
retry in 1 seconds, 2 attempts left
[ 178523.491380] WARNING: autofs_timeout_wq: request 75 for
/net/freenas/ timed out after 30 seconds
[ 178523.491380] WARNING: autofs_trigger_one: request for
/net/freenas/ completed with error 60
[ 178523.491380] autofs_trigger: trigger failed with error 60; will
retry in 1 seconds, 1 attempts left
...

The first output correlates with the output of
$ showmount -E freenas
/mnt/zxc/common
/mnt/data/all
/mnt/data/src
/mnt/data/xsrc
/mnt/data/pkgsrc
/mnt/zxc/iocage/jails/plex/root/mnt
....

and, as I said, there is no problem with nfs itself:
...
# tail -01 /etc/fstab
freenas:/mnt/zxc/iocage/jails/plex/root/mnt/Music /mnt/Music nfs rw,auto 0 0
# mount /mnt/Music
# ls /mnt/Music
 0-Test   .......

This didn't tell me much; I then checked /etc/defaults/rc.conf for the
default settings and saw that there is only default setting for autofs
and not for any of the others; so I took off 'automountd=YES' and
'autounmountd=YES' frm /etc/rc.conf :
....
autofs=YES
#automountd=YES
#autounmountd=YES
automount_flags="-v -c"
automountd_flags="-v"
autounmountd_flags="-v"
...

Now it works as expected, except that I am getting
...
# /etc/rc.d/automount stop
umount: /net: Device busy
# umount -At autofs
umount: /net: Device busy

and on every such attempt in dmesg:
...
[ 180242.460510] WARNING: autofs_unmount: vflush failed with error 16
...

I can unmount the individual mounted autofs systems, though.

Thanks,

> >
> > 2019年11月26日(火) 18:36 Chavdar Ivanov <ci4ic4%gmail.com@localhost>:
> > >
> > > Hi,
> > >
> > > After the yesterday's update to autofs my system completely fails to
> > > use it. I get an endless stream of
> > >
> > > [   491.607638] WARNING: autofs_trigger_one: request for /net/freenas/
> > > completed with error 5
> > >
> > > messages and nothing ever gets mounted.  As I said earlier, NFS
> > > otherwise works just fine.
> > >
> > > Chavdar
> > >
> > >
> > > On Sun, 17 Nov 2019 at 15:17, Chavdar Ivanov <ci4ic4%gmail.com@localhost> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I've setup autofs on one of my -current systems with nfs, nothing
> > > > modified. It kinda works, but a typical session would look like:
> > > > .....
> > > >
> > > > > ls /net/freenas
> > > > gls: reading directory '/net/freenas': No such file or directory
> > > > > ls /net/freenas
> > > > gls: reading directory '/net/freenas': No such file or directory
> > > > > ls /net/freenas
> > > > gls: reading directory '/net/freenas': No such file or directory
> > > > mnt
> > > > > ls /net/freenas/mnt
> > > > gls: reading directory '/net/freenas/mnt': No such file or directory
> > > > > ls /net/freenas/mnt
> > > > gls: reading directory '/net/freenas/mnt': No such file or directory
> > > > > ls /net/freenas/mnt
> > > > gls: reading directory '/net/freenas/mnt': No such file or directory
> > > > data  zxc
> > > > > ls /net/freenas/mnt/zxc
> > > > gls: reading directory '/net/freenas/mnt/zxc': No such file or directory
> > > > common  iocage
> > > > > ls /net/freenas/mnt/zxc/common
> > > > gls: reading directory '/net/freenas/mnt/zxc/common': No such file or directory
> > > > > ls /net/freenas/mnt/zxc/common
> > > > gls: reading directory '/net/freenas/mnt/zxc/common': No such file or directory
> > > > hosts  testagain  testroot
> > > > > ls /net/freenas/mnt/zxc/common/hosts
> > > > /net/freenas/mnt/zxc/common/hosts
> > > > > cat /net/freenas/mnt/zxc/common/hosts
> > > > # $FreeBSD: src/etc/hosts,v 1.16.34.1.2.1 2009/10/25 01:10:29 kensmith Exp $
> > > > #
> > > > # Host Database
> > > > #
> > > > ......
> > > >
> > > > to any of the other nfs servers in the network, some NetBSD, some
> > > > FreeBSD, some Linux.
> > > >
> > > > Otherwise NFS works as expected with manual mounts or mounts via /etc/fstab.
> > > >
> > > > Am I missing something from the autofs setup? My understanding was
> > > > that if  I have
> > > >
> > > > autofs=YES
> > > > automountd=YES
> > > > autounmountd=YES
> > > > in /etc/rc.conf and /etc/auto_master is untouched - with
> > > >
> > > > /net            -hosts          -nobrowse,nosuid,intr
> > > >
> > > > present, then just refering to /net/<host> should do the work.
> > > >
> > > > The system is
> > > > > uname -a
> > > > NetBSD ymir 9.99.17 NetBSD 9.99.17 (GENERIC) #7: Sun Nov 17 13:43:02
> > > > GMT 2019  sysbuild@ymir:/home/sysbuild/amd64/obj/home/sysbuild/src/sys/arch/amd64/compile/GENERIC
> > > > amd64
> > > >
> > > > built just a moment ago (I noticed a few commits in autofs, so I
> > > > rebuilt to test).
> > > >
> > > > showmount -E reports as expected:
> > > >
> > > > > showmount -E freenas
> > > > /mnt/zxc/common
> > > > /mnt/data/all
> > > > /mnt/data/src
> > > > /mnt/data/xsrc
> > > > /mnt/data/pkgsrc
> > > > /mnt/zxc/iocage/jails/plex/root/mnt
> > > >
> > > >
> > > >
> > > > --
> > > > ----
> > >
> > >
> > >
> > > --
> > > ----



--
----


Home | Main Index | Thread Index | Old Index