diff --git a/proxmox/proxmox-fix-pbs-storage-down-spamming-logs.sh b/proxmox/proxmox-fix-pbs-storage-down-spamming-logs.sh new file mode 100644 index 0000000..4fe379d --- /dev/null +++ b/proxmox/proxmox-fix-pbs-storage-down-spamming-logs.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# REF: https://forum.proxmox.com/threads/reduce-log-spamming-when-pbs-is-offline-error-fetching-datastores-500-cant-connect-to.147310/ + +echo "arg1 = 1/0, 1=enable" +echo "arg2 = storagename [optional]" + +# running from cron, we need this +PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/games:/usr/games:/root/bin:/root/bin/boojum:/usr/X11R6/bin:/usr/NX/bin: + +if [ "$2" = "" ]; then + storname=pbs-p2300m-laptop +else + storname="$2" +fi + +pvesm status + +if [ "$1" = "1" ]; then + echo "Enabling storage $storname" + pvesm set $storname --disable 0 +else + echo "Disabling storage $storname" + pvesm set $storname --disable 1 +fi + +pvesm status + +exit; + +$0 0 pbs-vm-on-macpro