Add service to try to remount nfs share every 10 seconds
This commit is contained in:
12
pve2/etc/systemd/system/persistent-nfs-remount.service
Normal file
12
pve2/etc/systemd/system/persistent-nfs-remount.service
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Persistent NFS remount for /mnt/sdb
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/bin/sh -c "while true; do mount -v /mnt/sdb && break || sleep 10; done"
|
||||||
|
Restart=always
|
||||||
|
RestartSec=10
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
Reference in New Issue
Block a user