Resolved - Cannot access automounted nas share
Resolved - Cannot access automounted nas share
New to CentOS and just converted and older desktop to a server running 6.5_x86-64.
I am trying to mount a Buffalo NAS using the "Even-better method" explained in the wiki.
All seem to go ok and autofs restarts with no error messages.
The object is to mount "share" from the nas to /mnt/xl1b4/, which it appears to do as indicated below; however, when I try to access the share, it returns the "No such file" message.
[root@acer ~]# /sbin/service autofs restart
Stopping automount: [ OK ]
Starting automount: [ OK ]
[root@acer ~]# ls -l /mnt/xl1b4
total 0
dr-xr-xr-x. 2 root root 0 Dec 31 10:44 share
[root@acer ~]# ls -l /mnt/xl1b4/share
ls: cannot open directory /mnt/xl1b4/share: No such file or directory
[root@acer ~]#
I did not find any relevant messages in /var/log/messages.
Any suggestions to solve this issue and access the nas share?
I am trying to mount a Buffalo NAS using the "Even-better method" explained in the wiki.
All seem to go ok and autofs restarts with no error messages.
The object is to mount "share" from the nas to /mnt/xl1b4/, which it appears to do as indicated below; however, when I try to access the share, it returns the "No such file" message.
[root@acer ~]# /sbin/service autofs restart
Stopping automount: [ OK ]
Starting automount: [ OK ]
[root@acer ~]# ls -l /mnt/xl1b4
total 0
dr-xr-xr-x. 2 root root 0 Dec 31 10:44 share
[root@acer ~]# ls -l /mnt/xl1b4/share
ls: cannot open directory /mnt/xl1b4/share: No such file or directory
[root@acer ~]#
I did not find any relevant messages in /var/log/messages.
Any suggestions to solve this issue and access the nas share?
Last edited by zuser on 2014/01/02 19:56:59, edited 1 time in total.
Re: Cannot access automounted nas share
It will help if you post relevant lines from your /etc/auto.master and auto.misc (or whatever file you designated) and the actual command to mount the share.
CentOS Forum FAQ
Re: Cannot access automounted nas share
Thanks for reply. Mounting nas was attempted by restarting autofs as shown above after editing files as indicated below.toracat wrote:It will help if you post relevant lines from your /etc/auto.master and auto.misc (or whatever file you designated) and the actual command to mount the share.
For what it's worth, can manually mount and access share with no problems.
Code: Select all
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#
/misc /etc/auto.misc
#
# NOTE: mounts done from a hosts map will be mounted with the
# "nosuid" and "nodev" options unless the "suid" and "dev"
# options are explicitly given.
#
/net -hosts
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
/mnt/xl1b4 /etc/auto.xl1b4 --timeout=600 --ghost
from 'auto.xl1b4'
Code: Select all
share -fstype=cifs,rw,noperm,credentials=/etc/credentials.txt ://192.168.1.13/share
Re: Cannot access automounted nas share
The directory /mnt/xl1b4 exists? Your /etc/credentials.txt exists and is owned root:root and chmod 600 with contents similar to
Code: Select all
username=myusername
password=mypassword
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Cannot access automounted nas share
Yes both exist and I believe in the right places
produces
credentials.txt is as you describe
and produces
I see permissions are different for xl1b4 , is that an issue?
Code: Select all
ls -l /etc/
Code: Select all
-rw-r--r--. 1 root root 26 Dec 31 06:56 credentials.txt
and
Code: Select all
# ls -l /mnt
Code: Select all
drwxr-xr-x. 1 root root 0 Dec 17 09:30 xl1b4
Re: Cannot access automounted nas share
Your credentials.txt needs to be chmod 600 not the current 644 as that's open to everyone to read. That may be enough to stop if from working depending what checks automount does.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Cannot access automounted nas share
Permissions changed but no help.
On reboot, "share" shows as mounted on /mnt/xl1b4 but on attempt to access, reported as no such file or directory.
Any other suggestions?
On reboot, "share" shows as mounted on /mnt/xl1b4 but on attempt to access, reported as no such file or directory.
Code: Select all
[root@localhost ~]# cd /mnt/xl1b4
[root@localhost xl1b4]# ls
share
[root@localhost xl1b4]# cd share
-bash: cd: share: No such file or directory
[root@localhost xl1b4]#
Re: Cannot access automounted nas share
You used the "--ghost" option for the automounter map, so the fact that "ls /mnt/xl1b4" returns "share" is no indication that the directory is mounted.On reboot, "share" shows as mounted on /mnt/xl1b4 but on attempt to access, reported as no such file or directory.
The "df" command will show you mounted filesystems and you can also look in /etc/mtab.
You should look in /var/log/messages just after you try accessing /mnt/xl1b4/share and just after restarting autofs. I think that it is unlikely that no relevent information is being logged -- I see that you did already look there, but perhaps you missed something?
Re: Cannot access automounted nas share
Ok, hopefully this will help.
Contents of "/etc/mtab"
Also, I did apparently miss messages in log. Following is log from this AM. "autofs" was restarted at 06:20
Also, FWIW, confirming share can be mounted manually as follows:
Contents of "/etc/mtab"
Code: Select all
/dev/mapper/vg_acercentos-lv_root / ext4 rw 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs rw,rootcontext="system_u:object_r:tmpfs_t:s0" 0 0
/dev/sda1 /boot ext4 rw 0 0
/dev/mapper/vg_acercentos-lv_home /home ext4 rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0
~
Code: Select all
Jan 2 05:27:55 localhost kernel: CIFS VFS: Error connecting to socket. Aborting operation
Jan 2 05:27:55 localhost kernel: CIFS VFS: cifs_mount failed w/return code = -111
Jan 2 05:30:59 localhost kernel: CIFS VFS: Error connecting to socket. Aborting operation
Jan 2 05:30:59 localhost kernel: CIFS VFS: cifs_mount failed w/return code = -111
Jan 2 05:32:37 localhost kernel: CIFS VFS: Error connecting to socket. Aborting operation
Jan 2 05:32:37 localhost kernel: CIFS VFS: cifs_mount failed w/return code = -111
Jan 2 06:03:19 localhost kernel: CIFS VFS: Error connecting to socket. Aborting operation
Jan 2 06:03:19 localhost kernel: CIFS VFS: cifs_mount failed w/return code = -111
Jan 2 06:20:25 localhost automount[6745]: lookup_read_master: lookup(nisplus): couldn't locate nis+ table auto.master
Code: Select all
[root@localhost ~]# mount -t cifs //192.168.1.15/share /mnt/xl1b4 -o user=wlz
Password:
[root@localhost ~]# ls -l /mnt/xl1b4
total 1613252
-rwxr-xr-x. 0 root root 10701 Jul 26 12:56 2013-07-25 Quest-envelope.odt
drwxr-xr-x. 0 root root 0 Aug 2 07:51 backup
drwxr-xr-x. 0 root root 0 Oct 28 2012 Cards
drwxr-xr-x. 0 root root 0 Dec 29 2008 CBS
Re: Cannot access automounted nas share
That's a different IP address in your mount command (192.168.1.15) vs the .13 you have in auto.xl1b4
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke