autofs problem

Hi,

I am new to this forum.
Right now I run Linux (desktops & servers) and I was curious about BSD so I installed PC-BSD 10.2 on a spare computer (192.168.0.38).
I tried to set up autofs(5) for my Linux servers NFS shares on the PC-BSD computer but something went wrong ...
Appreciate help.

Here is the error message:
Code:
sudo /etc/rc.d/automount start
/etc/rc.d/automount: WARNING: $autofs_enable is not set properly - see rc.conf(5).
Will not 'start' automount because autofs_enable is NO.
Here is what I did:
Code:
cat auto_master 
# $FreeBSD$
#
# Automounter master map, see auto_master(5) for details.
#
/net -hosts -nobrowse,nosuid,intr
# When using the -media special map, make sure to edit devd.conf(5)
# to move the call to "automount -c" out of the comments section.
#/media -media -nosuid
#/- -noauto

#NFS
/nfs /etc/auto_nfs
----------------------
cat auto_nfs 
# $FreeBSD$
#
# Automounter master map, see auto_master(5) for details.
#
/net -hosts -nobrowse,nosuid,intr
# When using the -media special map, make sure to edit devd.conf(5)
# to move the call to "automount -c" out of the comments section.
#/media -media -nosuid
#/- -noauto

#NFS
FARBAUTE -intr,nfsv4 192.168.0.32:/home/jurka/my_data
---------------------
sudo showmount -e 192.168.0.32
Password:
Exports list on 192.168.0.32:
/home/jurka/my_data 192.168.0.4 192.168.0.37 192.168.0.38 
--------------------
cat rc.conf
# Auto-Enabled NICs from pc-sysinstall
ifconfig_alc0="DHCP"
# Auto-Enabled NICs from pc-sysinstall
ifconfig_alc0_ipv6="inet6 accept_rtadv"
hostname="pcbsd"
pcsysconfig_enable="YES"
zfs_enable="YES"
sshd_enable="YES"

#AUTOFS
autofs_enable=”YES”

#NFS CLIENT
nfs_client_enable="YES"
 
I have posted the problem to PC-BSD forum but have not got any answers yet ... maybe my problem is too simple
 
OK - I ran sysrc (both with autofs_enable and nfs_client_enable) and now they are enabled.
Code:
[raivox@pcbsd] /usr/local/etc% sysrc -a | grep -i 'nfs\|auto'
autofs_enable: YES
nfs_client_enable: YES
The command sudo /etc/rc.d/automount start did not give any error message now and mount gives me map /etc/auto_nfs on /nfs (autofs) which seems OK.
Also showmount tells me that right shares are exported from my Linux server ... so far so good ... BUT /nfs - which is my mount point - is empty ... hmmm ... don't understand this.
 
IIRC you should be able to e.g. run ls /nfs/192.168.0.32/home/jurka/my_data at which point your share will be mounted.

From autofs(5):
Directories for individual NFS servers are not present until the first access, when they are automatically created.

EDIT: Ignore me that is the default for /net not for your setup.
 
ls /nfs/192.168.0.32/home/jurka/my_data gives Input/output error ...

I think there are some problems with autofs in pc-bsdPC-BSD... I tried the conventional method with mount -v 192.168.0.32:/home/jurka/my_data /nfs and now the shares were mounted correctly.
 
Hi,
Code:
...
cat auto_nfs
# $FreeBSD$
#
# Automounter master map, see auto_master(5) for details.
#
/net -hosts -nobrowse,nosuid,intr
# When using the -media special map, make sure to edit devd.conf(5)
# to move the call to "automount -c" out of the comments section.
#/media -media -nosuid
#/- -noauto

#NFS
FARBAUTE -intr,nfsv4 192.168.0.32:/home/jurka/my_data

I'm unsure what FARBAUTE is from but auto_master(5) has examples on what should be in these files. Please double check the syntax with the man page.
 
There are three pieces of code that need to be started. /etc/rc.d/automount is one, but there are also /etc/rc.d/automountd, and /etc/rc.d/autounmountd. The autofs_enable controls all three, but if you don't start those at boot and instead run it by hand, you need all three.
 
Back
Top