I have created a unit file /etc/systemd/system/mnt-Asus.mount:
Code: Select all
[Unit]
Description=Asus PC
After=network.target
[Mount]
What=192.168.2.22:/home/peer
Where=/mnt/Asus
Type=nfs
Options=_netdev,auto
[Install]
WantedBy=multi-user.target
I can mount the nfs server with 'systemctl start mnt-Asus.mnt' and umount it with 'systemctl start mnt-Asus.mnt' .
But when I shutdown the server-pc when the nfs connection is present I get the same problem on the client-pc.
The mount exits but the listing of the directory cannot be renewed because the server is unreachable.
But working with systemd-mount does not solve my problem either.
The command 'systemctl status mnt-Asus.mnt' gives the following:
Code: Select all
root@debian:~# systemctl status mnt-Asus.mount
● mnt-Asus.mount - Asus PC
Loaded: loaded (/etc/systemd/system/mnt-Asus.mount; disabled; preset: enabled)
Active: active (mounted) since Sat 2024-02-17 15:55:33 CET; 5min ago
Where: /mnt/Asus
What: 192.168.2.22:/home/peer
Tasks: 0 (limit: 19056)
Memory: 28.0K
CPU: 6ms
CGroup: /system.slice/mnt-Asus.mount
Feb 17 15:55:33 debian systemd[1]: Mounting mnt-Asus.mount - Asus PC...
Feb 17 15:55:33 debian systemd[1]: Mounted mnt-Asus.mount - Asus PC.
This is when the client-pc and the server-pc are connected. This good
When I execute the command 'systemctl status mnt-Asus.mnt' after I shutdown the server-pc I get the exact same results.
The server-pc is mounted but cannot be reached!!