# Newbie question : autofs is not working

**URL:** <https://forums.rockylinux.org/t/newbie-question-autofs-is-not-working/10029>\
**Category:** Rocky Linux Help & Support\
**Created:** [May 24, 2023, 1:56pm UTC](https://forums.rockylinux.org/t/newbie-question-autofs-is-not-working/10029 "2023-05-24T13:56:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cozsmin](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/cozsmin/32/3130_2.png) [@cozsmin](https://forums.rockylinux.org/u/cozsmin)\
**Post date:** [May 24, 2023, 1:56pm UTC](https://forums.rockylinux.org/t/newbie-question-autofs-is-not-working/10029/1 "2023-05-24T13:56:36Z")

</div>

Hello ladies and gents ,

I was following the tutorial from [RHCSA RHEL 8 - Using AutoFS with NFS - YouTube](https://youtu.be/yS9C5k1Jc5Y) , so my setup is : NFS server centos 7, NFS client RockyLinux 9.2  
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.20

Mounting manually works without a problem .

Trying with autofs is another thing …

Here is the config on NFS client :

/etc/auto.master contents :

```auto
+dir:/etc/auto.master.d
+auto.master

```

/etc/auto.master.d/home.autofs contents :

```auto
/home	/etc/autofs.home

```

/etc/autofs.home contents :

```auto
*	-rw	192.168.122.1:/home/&

```

After i restart the autofs dameon , the “/home” directory is empty

But it looks mounted :

```auto
[root@nfs-client etc]# df -h /home
Filesystem Size Used Avail Use% Mounted on
/etc/autofs.home 0 0 0 - /home

```

Daemon does look up and fine :

```auto
[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.

```

So i tried to run the autofs manually with “/usr/sbin/automount -dvf” to get more logs out of it :

```auto
[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
===========================

```

Someone may help me here ? i am totally lost …

---

<div class="post-metadata">

**Author:** ![neil](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/neil/32/34_2.png) [@neil](https://forums.rockylinux.org/u/neil)\
**Post date:** [May 24, 2023, 1:57pm UTC](https://forums.rockylinux.org/t/newbie-question-autofs-is-not-working/10029/2 "2023-05-24T13:57:29Z")

</div>

I’ve edited your post to put content in `code` blocks. You can surround text with three back ticks (```) in order to make blocks like in your post, now.

---

<div class="post-metadata">

**Author:** ![cozsmin](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/cozsmin/32/3130_2.png) [@cozsmin](https://forums.rockylinux.org/u/cozsmin)\
**Post date:** [May 24, 2023, 2:02pm UTC](https://forums.rockylinux.org/t/newbie-question-autofs-is-not-working/10029/3 "2023-05-24T14:02:18Z")

</div>

Ok

Thank you very much Neil

---

<div class="post-metadata">

**Author:** ![Zilvermeeuw](https://avatars.discourse-cdn.com/v4/letter/z/5f8ce5/32.png) [@Zilvermeeuw](https://forums.rockylinux.org/u/Zilvermeeuw)\
**Post date:** [August 22, 2023, 2:04pm UTC](https://forums.rockylinux.org/t/newbie-question-autofs-is-not-working/10029/4 "2023-08-22T14:04:17Z")

</div>

I had the same problem. I solved it by installing mount.nfs

```auto
dnf install mount.nfs

```
