I was following the tutorial from https://youtu.be/yS9C5k1Jc5Y , so my setup is : NFS server centos 7, NFS client centos 7.
Both have firewall disabled between them , also enforcing is permissive on both .
NFS server IP : 192.168.122.1
NFS client IP : 192.168.122.10
Mounting manually works without a problem .
Trying with autofs is another thing ..
Here is the config on NFS client :
/etc/auto.master contents :
Code: Select all
+dir:/etc/auto.master.d
+auto.master
Code: Select all
/home /etc/autofs.home
Code: Select all
* -rw 192.168.122.1:/home/&
But it looks mounted :
Code: Select all
[root@nfs-client etc]# df -h /home
Filesystem Size Used Avail Use% Mounted on
/etc/autofs.home 0 0 0 - /home
service autofs status
Code: Select all
[root@nfs-client etc]# service autofs status
Redirecting to /bin/systemctl status autofs.service
● autofs.service - Automounts filesystems on demand
Loaded: loaded (/usr/lib/systemd/system/autofs.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2023-05-24 15:50:58 EEST; 17min ago
Main PID: 2624 (automount)
CGroup: /system.slice/autofs.service
└─2624 /usr/sbin/automount --systemd-service --dont-check-daemon
May 24 15:50:58 nfs-client systemd[1]: Starting Automounts filesystems on demand...
May 24 15:50:58 nfs-client systemd[1]: Started Automounts filesystems on demand.
Code: Select all
[root@nfs-client etc]# service autofs stop
Redirecting to /bin/systemctl stop autofs.service
[root@nfs-client etc]#
[root@nfs-client etc]# /usr/sbin/automount -dvf
Starting automounter version 5.0.7-116.el7_9.1, master map auto.master
using kernel protocol version 5.02
lookup_nss_read_master: reading master files auto.master
do_init: parse(sun): init gathered global options: (null)
spawn_mount: mtab link detected, passing -n to mount
spawn_umount: mtab link detected, passing -n to mount
lookup_read_master: lookup(file): read entry +dir:/etc/auto.master.d
lookup_nss_read_master: reading master dir /etc/auto.master.d
lookup_read_master: lookup(dir): scandir: /etc/auto.master.d
include_file: lookup(dir): include: /etc/auto.master.d/home.autofs
lookup_nss_read_master: reading master file /etc/auto.master.d/home.autofs
do_init: parse(sun): init gathered global options: (null)
lookup_read_master: lookup(file): read entry /home
lookup_read_master: lookup(file): read entry +auto.master
lookup_nss_read_master: reading master files auto.master
do_init: parse(sun): init gathered global options: (null)
lookup_nss_read_master: reading master nisplus auto.master
lookup_nss_read_master: no map - continuing to next source
lookup_nss_read_master: reading master sss auto.master
lookup_nss_read_master: no map - continuing to next source
master_do_mount: mounting /home
automount_path_to_fifo: fifo name /run/autofs.fifo-home
lookup_nss_read_map: reading map file /etc/autofs.home
do_init: parse(sun): init gathered global options: (null)
spawn_mount: mtab link detected, passing -n to mount
spawn_umount: mtab link detected, passing -n to mount
mounted indirect on /home with timeout 300, freq 75 seconds
st_ready: st_ready(): state = 0 path /home