以前のDebian Linux 10次の場所にCIFS共有が定義されています/etc/fstab
。
//192.168.120.1/Share /mnt/Share cifs credentials=/etc/fstab-share.password,auto,nofail 0 0
この共有は、次の理由でシステム起動時にマウントされません。
$ systemctl status mnt-Share.mount
● mnt-Share.mount - /mnt/Share
Loaded: loaded (/etc/fstab; generated)
Active: failed (Result: exit-code) since Mon 2021-10-04 18:48:21 CEST; 23s ago
Where: /mnt/Share
What: //192.168.130.130/UnifiRecorder
Docs: man:fstab(5)
man:systemd-fstab-generator(8)
Oct 04 18:48:21 home-docker systemd[1]: Mounting /mnt/Share...
Oct 04 18:48:21 home-docker mount[397]: mount error(101): Network is unreachable
Oct 04 18:48:21 home-docker mount[397]: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Oct 04 18:48:21 home-docker systemd[1]: mnt-Share.mount: Mount process exited, code=exited, status=32/n/a
Oct 04 18:48:21 home-docker systemd[1]: mnt-Share.mount: Failed with result 'exit-code'.
Oct 04 18:48:21 home-docker systemd[1]: Failed to mount /mnt/Share.
しかし、systemctl start mnt-Share.mount
ログイン後に実行すると、すべてが正常です。
$ systemctl status mnt-Share.mount
● mnt-Share.mount - /mnt/Share
Loaded: loaded (/etc/fstab; generated)
Active: active (mounted) since Mon 2021-10-04 18:48:59 CEST; 1s ago
Where: /mnt/Share
What: //192.168.130.130/UnifiRecorder
Docs: man:fstab(5)
man:systemd-fstab-generator(8)
Tasks: 0 (limit: 4915)
Memory: 372.0K
CGroup: /system.slice/mnt-Share.mount
Oct 04 18:48:59 home-docker systemd[1]: Mounting /mnt/Share...
Oct 04 18:48:59 home-docker systemd[1]: Mounted /mnt/Share.
私のNASへの特定のルートを設定しました/etc/network/interfaces
。
# The primary network interface
allow-hotplug ens18
iface ens18 inet dhcp
up ip route add 192.168.120.0/24 via 192.168.1.1
静電気が疑われます。IPルーティング設定するには遅すぎますか?/etc/fstab
依存関係を正しく設定できますか?