I dont normally use proxmox in a "homelab" environment, so I never ran into this type of issue before.
I have a sample usecase with a NAS that is normally asleep, since its only used as a backup target. the typical method to address this type of connection is to have a magic packet sent prior to automount it using autofs, but here come the proxmox wrinkles.
problem 1: when the NAS goes back to sleep, it remains in mtab and hangs disk metadata ops such as df. I cant get automount to cut the connection without umount -l.
problem 2: if I add the store to storage.cfg as a folder, it will of course hang pvestatd once the nas goes to sleep- and if I kill the connection using umount -l, it immediately wakes up because pvesm polls it.
Ideas?
/etc/auto.master
/etc/auto.nfs
I have a sample usecase with a NAS that is normally asleep, since its only used as a backup target. the typical method to address this type of connection is to have a magic packet sent prior to automount it using autofs, but here come the proxmox wrinkles.
problem 1: when the NAS goes back to sleep, it remains in mtab and hangs disk metadata ops such as df. I cant get automount to cut the connection without umount -l.
problem 2: if I add the store to storage.cfg as a folder, it will of course hang pvestatd once the nas goes to sleep- and if I kill the connection using umount -l, it immediately wakes up because pvesm polls it.
Ideas?
/etc/auto.master
Code:
/nfs /etc/auto.nfs --timeout=10
/etc/auto.nfs
Code:
#!/bin/bash
nfs_ipv4="xxxx"
nfs_mac="yyyy"
ping -c 1 -w 1 -q $nfs_ipv4 > /dev/null
if [ $? -ne 0 ];
then
wakeonlan "$nfs_mac"
sleep 5
fi
echo "-fstype=nfs,retry=0,retrans=1,bg,intr,hard,timeo=10 $nfs_ipv4:/mnt/proxmox"