I have an nfs at 192.168.1.10:/home/vm1/Desktop/nfs and will like to mount locally to /home/vm1/Desktop/nfs-mount using automounter...need help doing do
You have specified an indirect map auto.nfs, mounted on /home/vm1/Desktop.
df /home/vm1/Desktop
will tell it's controlled by automount.
The key in auto.nfs is nfs-bind, so you will find the actual mount
cd /home/vm1/Desktop/nfs-bind
df .
If the NFS server denies the mount (no NFS share access) it should be syslogged to /var/log/messages.
But some autofs5 versions don't log it (but log other things that do not make sense at all). So, as root, test it with a manual mount:
mkdir -p /mnt
mount 192.168.1.34:/home/vm1/Desktop/nfs /mnt
umount /mnt
[root@vm1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_sda2-lv_root
6.5G 3.5G 2.7G 57% /
tmpfs 940M 236K 940M 1% /dev/shm
/dev/sda1 485M 64M 396M 14% /boot
/dev/sr0 57M 57M 0 100% /media/VBOXADDITIONS_4.2.12_84980
df: `/home/vm1/Desktop/nfs-mount': No such file or directory
[root@vm1 ~]# df /home/vm1/Desktop
Filesystem 1K-blocks Used Available Use% Mounted on
- 0 0 0 - /home/vm1/Desktop
[root@vm1 ~]# cat /var/log/messages | tail
May 2 03:13:10 vm1 kernel: Registering the id_resolver key type
May 2 03:13:10 vm1 kernel: FS-Cache: Netfs 'nfs' registered for caching
May 2 03:13:10 vm1 rpc.mountd[1703]: authenticated mount request from 192.168.1.34:756 for /home/vm1/Desktop/nfs (/home/vm1/Desktop/nfs)
May 2 03:15:12 vm1 yum[2994]: Installed: 1:telnet-0.17-47.el6_3.1.x86_64
May 2 03:15:55 vm1 kernel: RPC: fragment too large: 0x7ff4fffd
May 2 03:29:55 vm1 automount[3534]: lookup_read_master: lookup(nisplus): couldn't locate nis+ table auto.master
May 2 03:29:59 vm1 automount[3534]: lookup_read_master: lookup(nisplus): couldn't locate nis+ table auto.master
May 2 03:48:48 vm1 automount[3534]: lookup_read_master: lookup(nisplus): couldn't locate nis+ table auto.master
May 2 05:05:03 vm1 automount[3534]: key "nfs-mount" not found in map source(s).
May 2 05:07:15 vm1 automount[3534]: key "nfs" not found in map source(s).
[root@vm1 ~]# mount 192.168.1.34:/home/vm1/Desktop/nfs /mnt
mount.nfs: access denied by server while mounting 192.168.1.34:/home/vm1/Desktop/nfs
---------- Post updated at 05:20 AM ---------- Previous update was at 05:16 AM ----------
Just noticed something strange
[root@vm1 ~]# cd /home/vm1/Desktop/nfs-bind
-bash: cd: /home/vm1/Desktop/nfs-bind: No such file or directory
[root@vm1 ~]# ls -lh /home/vm1/Desktop
total 0
I cannot list the files and folders under /home/vm1/Desktop anymore..what is going on here? Something went wrong and can't figure it out...i think this is probably the same reason i was finding it hard to mount nfs and samba/cifs as well
Another strange thing...i restarted the system and i lost all folders and files created under /home/vm1/Desktop..Desktop is not back to default like fresh install...what is going on here? Before i restarted i could see the folders and files on the desktop even though i got the error that directory does not exist (from above) but now after restart...the desktop is back to default...all folders created before are gone/disappeared
---------- Post updated at 09:00 AM ---------- Previous update was at 05:20 AM ----------
Can someone tell me what is wrong here?
And yes i was trying to mount nfs using autofs at some point and wasn't running so seeing autofs there is confusing me..maybe it caused a problem somewhere...
also after the autofs problem i noticed the whole folders and files in /home/vm1/Desktop are all gone.