metal.no-wipe
Setting on NCNsConfigure the metal.no-wipe
setting on non-compute nodes (NCNs) to preserve data on the nodes before doing an NCN reboot.
Run the ncnGetXnames.sh
script to view the metal.no-wipe
settings for each NCN. The xname and metal.no-wipe
settings are also dumped out when executing the ncnHealthChecks.sh script.
This procedure requires administrative privileges.
It also requires that the CSM_SCRIPTDIR variable is defined. Set this variable and verify that it is set.
ncn-m001# export CSM_SCRIPTDIR=/usr/share/doc/metal/scripts
ncn-m001# echo $CSM_SCRIPTDIR
Run the ${CSM_SCRIPTDIR}/ncnGetXnames.sh
script.
The output will include a listing of all of the NCNs, their xnames, and what the metal.no-wipe
setting is for each.
ncn-m001# "${CSM_SCRIPTDIR}/ncnGetXnames.sh"
ncn-m001: x3000c0s1b0n0 - metal.no-wipe=1
ncn-m002: x3000c0s2b0n0 - metal.no-wipe=1
ncn-m003: x3000c0s3b0n0 - metal.no-wipe=1
ncn-w001: x3000c0s4b0n0 - metal.no-wipe=1
ncn-w002: x3000c0s5b0n0 - metal.no-wipe=1
ncn-w003: x3000c0s6b0n0 - metal.no-wipe=1
ncn-s001: x3000c0s7b0n0 - metal.no-wipe=1
ncn-s002: x3000c0s8b0n0 - metal.no-wipe=1
ncn-s003: x3000c0s9b0n0 - metal.no-wipe=1
The metal.no-wipe
setting must be set to 1 (metal.no-wipe=1) if doing a reboot of an NCN to preserve the current data on it. If it is not set to 1 when the NCN is rebooted, it will be completely wiped and will subsequently have to be rebuilt. If the metal.no-wipe
status for one or more NCNs is not returned, re-run the ncnGetXnames.sh script.
Reset the metal.no-wipe
settings for any NCN where it is set to 0.
This step can be skipped if the metal.no-wipe
is already set to 1 for any NCNs being rebooted.
Generate a token from any master or worker NCN.
ncn-m001# export TOKEN=$(curl -k -s -S -d grant_type=client_credentials -d client_id=admin-client \
-d client_secret=`kubectl get secrets admin-client-auth -o jsonpath='{.data.client-secret}' \
| base64 -d` https://api-gw-service-nmn.local/keycloak/realms/shasta/protocol/openid-connect/token \
| jq -r '.access_token')
Update the metal.no-wipe
settings.
ncn-m001# csi handoff bss-update-param --set metal.no-wipe=1
Run the ${CSM_SCRIPTDIR}/ncnGetXnames.sh
script again to verify the no-wipe settings have been reset as expected.
ncn-m001# "${CSM_SCRIPTDIR}/ncnGetXnames.sh"
ncn-m001: x3000c0s1b0n0 - metal.no-wipe=1
ncn-m002: x3000c0s2b0n0 - metal.no-wipe=1
ncn-m003: x3000c0s3b0n0 - metal.no-wipe=1
ncn-w001: x3000c0s4b0n0 - metal.no-wipe=1
ncn-w002: x3000c0s5b0n0 - metal.no-wipe=1
ncn-w003: x3000c0s6b0n0 - metal.no-wipe=1
ncn-s001: x3000c0s7b0n0 - metal.no-wipe=1
ncn-s002: x3000c0s8b0n0 - metal.no-wipe=1
ncn-s003: x3000c0s9b0n0 - metal.no-wipe=1