AUTOFS not mounting filesystem

Latest response

My autofs says this FS is mounted /Data2, but when I go to the directory, it's empty, not mounted.
The share and path are correct as I can mount it manually :

mount -vvv -t cifs -o credentials=/etc/credential.txt,file_mode=0775,dir_mode=0775,uid=0,gid=994 "//boca1/Data/AES/Boca 250/1 Wrksp" /Data2

My configuration :

cat etc/redhat-release

Red Hat Enterprise Linux Server release 7.3 (Maipo)

cat installed-rpms |grep autofs

autofs-5.0.7-56.el7.x86_64

cat etc/auto.master

/Data2 /etc/auto.cifs --timeout=60

cat etc/auto.cifs

Data2 -fstype=cifs,rw,credentials=/etc/.cred.txt ://boca1/Data/AES/Boca\040250/1\040Wrksp

cat sos_commands/systemd/systemctl_list-units_--all |grep autofs

autofs.service loaded active running Automounts
filesystems on demand

cat proc/mounts

/etc/auto.cifs /Data2 autofs rw,relatime,fd=6,pgrp=18490,timeout=60,minproto=5,maxproto=5,indirect 0 0

cd /Data2

ls -l
ls -la
total 4
drwxr-xr-x. 2 root root 0 Apr 13 10:57 .
dr-xr-xr-x. 26 root root 4096 Apr 13 10:57 ..

Any ideas will be appreciated

wilfredo ocasio's picture

Responses

If I read your configuration correctly, your mount point will be /Data2/Data2. (the first Data2 comes from auto.master and the second from auto.cifs). Try accessing /Data2/Data2 and see if that now mounts.

I agree Akemi. Remove /Data2 entry in /etc/auto.cifs.

Replace

/Data2 /etc/auto.cifs --timeout=60

with

/- /etc/auto.cifs --timeout=60

My problems was wrong permissions on the /etc/auto.cifs file changed with : chmod 644 /etc/auto.cifs Now it works I will also consider removing the /Data2 and change it to /-

Thanks so much !

Excellent! Glad you got it working.

Was this helpful?

We appreciate your feedback. Leave a comment if you would like to provide more detail.
It looks like we have some work to do. Leave a comment to let us know how we could improve.