iSCSI mount (NAS/RAID) node protection script

I created a script for iSCSI users, or users having network storage /mnt. The script will check in every 60 seconds to see if the folder is available. If the folder is no longer up, the storagenode container will be shut down - until the folder returns. Once the folder returns, the storagenode will be started back up.

If you plan on doing maintenance, run chrontab -e and comment out the script to stop it temporarily. You may also want to make watchtower stop the script if it’s taking the node down for maintenance

3 Likes