add admin_scripts/affinity_maintenance.sh

This commit is contained in:
2026-05-16 00:02:11 +03:00
parent 6c58689d1d
commit 56ebe214d8
2 changed files with 66 additions and 1 deletions

View File

@@ -71,9 +71,21 @@ function off {
_off "$HOSTNAME"
fi
roff
updl
}
function roff {
/root/admin_scripts/affinity_maintenance.sh 1
echo 'resource affinities: disabled'
}
function ron {
/root/admin_scripts/affinity_maintenance.sh 0
echo 'resource affinities: enabled'
}
function _on {
ha-manager crm-command node-maintenance disable "$1" && \
echo "$1": normal mode
@@ -87,9 +99,11 @@ function on {
else
_on "$HOSTNAME"
fi
echo 're-enable resource affinities: ron'
}
alias h="echo 'avail cmds: off on | upg upgr | updl localprogress'"
alias h="echo 'avail cmds: off on roff ron | upg upgr | updl localprogress'"
function localprogress () {
watch ls -lh "/var/lib/vz/images/$1"