I’ve followed this same steps before successfully, but I had to reinstall the system and now the same steps don’t seem to work.
server $ id -u user
1000
client $ id -u user
1000
client $ showmount -e 192.168.1.122
Export list for 192.168.1.122:
/mnt/V 192.168.1.122/24
client $ sudo systemctl enable --now nfs-client.target
Created symlink /etc/systemd/system/multi-user.target.wants/nfs-client.target → /usr/lib/systemd/system/nfs-client.target.
Created symlink /etc/systemd/system/remote-fs.target.wants/nfs-client.target → /usr/lib/systemd/system/nfs-client.target.
client $ sudo vi /etc/systemd/system/mnt-v.mount
[Unit]
Description=NFS share mount
[Mount]
What=192.168.1.122:/mnt/V
Where=/mnt/v
Type=nfs
Options=_netdev,rw
[Install]
WantedBy=multi-user.target
client $ sudo systemctl start mnt-v.mount
Job failed. See "journalctl -xe" for details.
client $ journalctl -xe
░░ The job identifier is 2173.
sep 14 11:10:47 client mount[22129]: mount.nfs: No such device
sep 14 11:10:47 client systemd[1]: mnt-v.mount: Mount process exited, code=exited, status=32/n/a
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░
░░ An n/a= process belonging to unit mnt-v.mount has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 32.
sep 14 11:10:47 client systemd[1]: mnt-v.mount: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░
░░ The unit mnt-v.mount has entered the 'failed' state with result 'exit-code'.
sep 14 11:10:47 client systemd[1]: Failed to mount Music.
░░ Subject: A start job for unit mnt-v.mount has failed
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░
░░ A start job for unit mnt-v.mount has finished with a failure.
░░
░░ The job identifier is 2173 and the job result is failed.
sep 14 11:10:47 client sudo[22125]: pam_unix(sudo:session): session closed for user root
sep 14 11:10:47 client audit[22125]: USER_END pid=22125 uid=1000 auid=1000 ses=4 subj==unconfined msg='op=PAM:session_c>
sep 14 11:10:47 client audit[22125]: CRED_DISP pid=22125 uid=1000 auid=1000 ses=4 subj==unconfined msg='op=PAM:setcred >
sep 14 11:10:47 client kernel: audit: type=1106 audit(1663146647.993:426): pid=22125 uid=1000 auid=1000 ses=4 subj==unc>
sep 14 11:10:47 client kernel: audit: type=1104 audit(1663146647.993:427): pid=22125 uid=1000 auid=1000 ses=4 subj==unc>
client $ sudo systemctl stop mnt-v.mount
client $ sudo chmod 777 /mnt/v
client $ sudo vi /etc/systemd/system/mnt-v.automount
[Unit]
Description=Automount nfs share
ConditionPathExists=/mnt/v
[Automount]
Where=/mnt/v
TimeoutIdleSec=10
[Install]
WantedBy=multi-user.target
client $ sudo systemctl enable --now mnt-v.automount
client $ ls -l /mnt/v
ls: cannot open directory '/mnt/v': Device does not exist
When you use both mount and automount - the mount unit must be started manually once in order to create the folder to mount in - then stopped.
Only then you can enable and start the automount unit.
Mount unit must be disabled for automount to work, because automount activates the mount unit.
And - for your own sanity’s sake - use a dedicated structure - do not use the system’s temporary mountpoint /mnt - you may find it difficult to control permissions for content of your mountpoint
Since manually mounting works, looks like it’s related to what @linux-aarhus said in the previous post:
Which means you should stop/unmount any instance of this NFS share, then safely remove the empty /mnt/v directory (using the rmdir command), then proceed as he explained above.