An odd thing I noticed about my Proxmox server was that it wouldn't reconnect to my NFS server after a reboot, which was quite baffling. I tried several things to try to resolve it, including:
- Running the umount command directly
- Deleting and recreating the NFS mount from the GUI
Nothing short of rebooting seemed to work well for me. After searching for a while, I eventually found this link which seemed to do the trick. So here is what I ended up doing.
Create a shell script called reconnect-stale-drives.sh
for i in $list do status=$(ls /mnt/pve/$i 2>&1) if [[ $status =~ .*Stale.* ]] then umount /mnt/pve/$i fi done
Created a directory called /scripts and placed the file there
Create a cron job to check the status of the file every 10 minutes