SAPHanaSR_maintenance_examples(7)
πΈ SAPHanaSR_maintenance_examples(7) β the SAPHanaSR manual, section 7 πΈ
okay bestie so you're reading SAPHanaSR_maintenance_examples(7), which lives in the SAPHanaSR manual, and it's literally just a big pile of maintenance glow-up routines for SAPHanaController. no cap, this page is your group chat for "what do i actually type when i have to do maintenance." π
β¨ NAME β¨
SAPHanaSR_maintenance_examples β maintenance examples for SAPHanaController. that's it, that's the name, she's serving exactly what it says on the tin π«Ά
π¦ DESCRIPTION π¦
Maintenance examples for SAPHanaController. periodt. π
but before you vibe-check any of these, please go read the other pages too, because this one is the highlight reel, not the whole story:
ocf_suse_SAPHanaController(7)susHanaSR.py(7)susHanaSrMultiTarget.py(7)susTkOver.py(7)susChkSrv.py(7)SAPHanaSR-manageAttr(8)SAPHanaSR_multi-target(7)
those have more examples, and honestly you should also read the REQUIREMENTS section below, like actually read it, not just scroll past it π
π₯ EXAMPLES π₯
β Check status of Linux cluster and HANA system replication pair
bestie this is the get ready with me of cluster work: you do this before you touch anything, and again after you've done something. it's giving ritual. see also cs_show_saphanasr_status(8) and the REQUIREMENTS section below π
# cs_clusterstate -i
# crm_mon -1r
# crm configure show | grep cli-
# SAPHanaSR-showAttr
# cs_clusterstate -i
β Watch status of HANA cluster resources and system replication
this one's cozy for when you're doing admin stuff or running cluster tests and you just want to watch. it's the live stream version of your cluster π but lowkey: it does not replace the checks above, it's a bonus, not a substitute. see also SAPHanaSR-showStatus(8).
# SAPHanaSR-showStatus -w
β Overview on stopping the HANA database at one site
okay so this procedure works for scale-up and scale-out both. and guess what β no takeover will be done. none. zero. it's a nap, not a handoff π΄
use this when you genuinely need to stop the HANA database. and hear me on this: stopping the HANA database should not be done by just stopping the Linux cluster or shutting down the OS. like, don't do that. this particularly applies to scale-out systems, fr fr. π
it might be smart to define upfront which HANA site needs to stop. and if both sites need to stop, define the order too β first stopping the primary should keep system replication in sync. main character planning energy β¨
how long a stop takes? depends on database size, performance of underlying infrastructure, SAP HANA version and configuration. so yeah, it's giving "it depends." please refer to SAP HANA documentation for details on tuning and stopping an HANA database π
the steps, in order:
- Checking status of Linux cluster and HANA system replication pair.
- Setting
SAPHanaorSAPHanaControllermulti-state resource into maintenance. - Stopping HANA database at the given site by using
"sapcontrol -nr <nr> -function StopSystem". - Checking that HANA is stopped.
Note: do not forget to end the resource maintenance after you have re-started the HANA database. like. please. π
β Initiate an administrative takeover of the HANA primary from one node to the other by using the Linux cluster
heads up bestie: this procedure does not work for scale-out. on scale-up it will stop the HANA primary, and that might take a while π if you want to avoid waiting for the stopped primary, use the procedure below which suspends the primary instead β much more demure, much more mindful π
if the cluster should also register the former primary as secondary, AUTOMATED_REGISTER="true" is needed. before the takeover gets initiated, the status of the Linux cluster and the HANA system replication has to be checked. the takeover should be initiated as a forced migration of the multi-state SAPHanaController resource. π
Not working (so don't come crying): regular migration, migration of IP address, migration of primitive SAPHanaController resource, setting primary node standby.
after the takeover of the primary has been finished, the migration rule has to be deleted. and if AUTOMATED_REGISTER="true" is set, finally the former primary will be registered as secondary, once the migration rule has been deleted. the way it all just falls into place π§
# crm_mon -1r
# SAPHanaSR-showAttr
# crm configure show | grep cli-
# cs_clusterstate -i
# crm resource move mst_SAPHanaCon_SLE_HDB10 force
# cs_clusterstate -i
# SAPHanaSR-showAttr
# crm resource clear mst_SAPHanaCon_SLE_HDB10
# SAPHanaSR-showAttr
# cs_clusterstate -i
Note: former versions of the Linux cluster used"migrate"instead of"move"and"unmigrate"instead of"clear". vintage behavior, we respect the elders π΅
β Perform an SAP HANA takeover by using SAP tools
this one's described here for scale-out, and it works for scale-up as well. slay. versatile icon π
the procedure will stop the HANA primary, and yes, this might take a while. if you want to avoid waiting for the stopped primary, use the procedure below which suspends the primary instead. the status of HANA databases, system replication and Linux cluster has to be checked. then the SAP HANA resources are set into maintenance, an sr_takeover is performed, and the old primary is registered as new secondary β therefore the correct secondary site name has to be used, see the later example π finally the SAP HANA resources are given back to the Linux cluster. see also the REQUIREMENTS section below and the later example on determining the correct site name.
1. On either node
# crm_mon -1r
# SAPHanaSR-showAttr
# crm configure show | grep cli-
# cs_clusterstate -i
If everything looks fine, proceed.
# crm resource maintenance mst_SAPHanaCon_SLE_HDB10
# crm_mon -1r
2. On the HANA primary master nameserver (e.g. node11)
# su - sleadm
~> sapcontrol -nr 10 -function StopSystem HDB
~> sapcontrol -nr 10 -function GetSystemInstanceList
Only proceed after you made sure the HANA primary is down!
3. On the HANA secondary master nameserver (e.g. node21)
# su - sleadm
~> hdbnsutil -sr_takeover
~> cdpy; python3 ./systemReplicationStatus.py; echo rc:$?
~> cdpy; python3 ./landscapeHostConfiguration.py; echo rc:$?
If everything looks fine, proceed.
4. On the former HANA primary master nameserver, now future secondary
master nameserver (e.g. node11)
~> hdbnsutil -sr_register --remoteHost=node21 --remoteInstance=10
--replicationMode=sync --name=site2 --operationMode=logreplay
~> sapcontrol -nr 10 -function StartSystem HDB
~> exit
5. On the new HANA primary master nameserver (e.g. node21)
~> cdpy; python3 ./systemReplicationStatus.py; echo rc:$?
~> cdpy; python3 ./landscapeHostConfiguration.py; echo rc:$?
~> exit
If everything looks fine, proceed.
6. On either node
# cs_clusterstate -i
# crm resource refresh mst_SAPHanaCon_SLE_HDB10
# crm resource maintenance mst_SAPHanaCon_SLE_HDB10 off
# SAPHanaSR-showAttr
# crm_mon -1r
# cs_clusterstate -i
Only proceed after you made sure the HANA primary is down! like actually down. not "probably down." down down. π
β Overview on SAP HANA takeover using SAP tools and suspend primary feature
this one works for scale-up and scale-out both, we love an inclusive queen π
the status of HANA databases, system replication and Linux cluster has to be checked. the SAP HANA resources are set into maintenance, an sr_takeover is performed with suspending the primary, and the old primary is registered as new secondary β therefore the correct secondary site name has to be used. finally the SAP HANA resources are given back to the Linux cluster. see also the REQUIREMENTS section below and the later example on determining the correct site name β¨
- Check status of Linux cluster and HANA, show current site names.
- Set
SAPHanaControllermulti-state resource into maintenance. - Perform the takeover, make sure to use the suspend primary feature:
~> hdbnsutil -sr_takeover --suspendPrimary - Check if the new primary is working.
- Stop suspended old primary.
- Register old primary as new secondary, make sure to use the correct site name.
- Start the new secondary.
- Check new secondary and its system replication.
- Refresh
SAPHanaControllermulti-state resource. - Set
SAPHanaControllermulti-state resource to managed. - Finally check status of Linux cluster and HANA.
β Check the two site names that are known to the Linux cluster
this is useful in case AUTOMATED_REGISTER is not yet set β because in that case a former primary needs to be registered manually, with the former site name as new secondary. the whole point is finding the site name that already is in use by the Linux cluster. that exact site name has to be used for registration of the new secondary. iykyk π
see also REQUIREMENTS of SAPHanaSR(7) and SAPHanaSR-ScaleOut(7).
in this example, node is suse11 on the future secondary site to be registered. remote HANA master nameserver is suse21 on current primary site. lowercase-SID is ha1. write that down bestie π
# crm configure show suse11 suse21
# crm configure show SAPHanaSR | grep hana_ha1_site_mns
# ssh suse21
# su - ha1adm -c "hdbnsutil -sr_state; echo rc:"
# exit
β Manually start the HANA primary if only one site is available
this might be necessary in case the cluster can not detect the status of both sites. heads up: this is an advanced task π₯
Before doing this, make sure HANA is not primary on the other site! like genuinely make sure. this is the part where you check twice and type once π
- Start the cluster on remaining nodes.
- Wait and check for cluster is running, and in status idle.
- Become
sidadm, and start HANA manually. - Wait and check for HANA is running.
- In case the cluster does not promote the HANA to primary, instruct the cluster to migrate the IP address to that node.
- Wait and check for HANA has been promoted to primary by the cluster.
- Remove the migration rule from the IP address.
- Check if cluster is in status idle.
- You are done, for now.
- Please bring back the other node and register that HANA as soon as possible. If the HANA primary stays alone for too long, the log area will fill up. π
β Start Linux cluster after node has been fenced
it is recommended to not configure the Linux cluster for always starting autmatically on boot. better is to start automatically only, if cluster and/or node have been stopped cleanly. if the node has been rebooted by STONITH, the cluster should not start automatically. and if the cluster is configure that way, some steps are needed to start the cluster after a node has been rebooted by STONITH. STONITH via SBD is used in this example, bestie π
# cs_clear_sbd_devices --all
# cs_show_sbd_devices
# crm cluster start
# crm_mon -r
β Overview on maintenance procedure for Linux, HANA remains running, on pacemaker-2.0
the vibe here: HANA stays up, Linux goes down for maintenance. it is necessary to wait for each step to complete and to check the result β no rushing, she's a process π§ it also is necessary to test and document the whole procedure before applying in production. yes, document it. future you says thank you π«Ά
see also the REQUIREMENTS section below and the example on checking status of HANA and cluster above.
- Check status of Linux cluster and HANA, see above.
- Set HANA multistate resource into maintenance mode.
# crm resource maintenance mst_... on - Set the Linux cluster into maintenance mode, on either node.
# crm maintenance on - Stop Linux Cluster on all nodes. Make sure to do that on all nodes.
# crm cluster run "crm cluster stop" - Perform Linux maintenance.
- Start the Linux cluster on all nodes β and yeah, that means all of them, don't skip one, bestie.
# crm cluster run "crm cluster start"
- Set the cluster ready for operations, on either node.
# crm maintenance off
- Let the Linux cluster detect the status of the HANA multistate resource, on either node.
# crm resource refresh mst_...
- Set the HANA multistate resource ready for operations, on either node.
# crm maintenance mst_... off
- Check status of Linux cluster and HANA, see above. π
- Overview on simple procedure for stopping and temporarily disabling the Linux cluster</p> β HANA gets fully stopped.
This one is literally the go-to for updating HANA, the OS, or hardware. HANA roles and resource status stay exactly the same the whole time. You have to wait for each step to finish and check the result β no rushing, no skipping the vibe check. And fr fr, test and document the whole procedure before you even think about running it in production.
- disabling pacemaker on HANA primary
- disabling pacemaker on HANA secondary
- stopping cluster on HANA secondary
- HANA secondary will be stopped
- system replication goes
SFAIL
- stopping cluster on HANA primary
- HANA primary will be stopped
- doing something with OS or hardware
- enabling pacemaker on HANA primary
- enabling pacemaker on HANA secondary
- starting cluster on HANA primary
- HANA stays down
- starting cluster on HANA secondary
- HANA primary and secondary will be started
- system replication recovers to
SOK
Note: HANA is not available from step 4 to step 9. Like, nine whole steps of downtime β plan accordingly. π
- Overview on update procedure for the
SAPHanaSR-angipackage.
Use this one to update RAs, the HANA HADR provider hook scripts, and related tools while HANA and the Linux cluster stay online the whole time. Slay. See also SAPHanaSR-manageAttr(8) for the deets on reloading the HANA HADR provider.
- Check status of Linux cluster and HANA, see above.
- Set resources
SAPHanaControllerandSAPHanaTopologyto maintenance. - Update RPM on all cluster nodes.
- Reload HANA HADR provider hook script on both sites.
- Refresh resources
SAPHanaControllerandSAPHanaTopology. - Set resources
SAPHanaControllerandSAPHanaTopologyfrom maintenance to managed. - Check status of Linux cluster and HANA, see above.
- Remove left-over maintenance attribute from the overall Linux cluster.
Do this to dodge the confusion caused by different maintenance procedures. See the overview above on maintenance procedures with a running Linux cluster. Before you do anything, check for cluster attribute maintenance-mode="false".
# SAPHanaSR-showAttr
# crm_attribute --query -t crm_config -n maintenance-mode
# crm_attribute --delete -t crm_config -n maintenance-mode
# SAPHanaSR-showAttr
- Remove left-over standby attribute from Linux cluster nodes.
Same energy β do it to avoid confusion from different maintenance procedures. See the overview above on maintenance procedures with a running Linux cluster. Before doing this for all nodes, check for node attribute standby="off" on all nodes.
# SAPHanaSR-showAttr
# crm_attribute --query -t nodes -N node1 -n standby
# crm_attribute --delete -t nodes -N node1 -n standby
# SAPHanaSR-showAttr
- Remove left-over maintenance attribute from resource.
Ngl, this should usually not be needed. See the overview above on maintenance procedures with a running Linux cluster.
# SAPHanaSR-showAttr
# crm_resource --resource cln_SAPHanaTop_HA1_HDB00 --delete-parameter maintenance --meta
# SAPHanaSR-showAttr
- Manually update HANA version attribute.
The node attribute "version" shows the HANA version on that node. It's used by the YaST HANA update wizard β and it is not used by SAPHanaSR-angi. So if the attribute doesn't reflect the new HANA version after a HANA update, you can refresh it by hand.
# crm resource refresh cln_SAPHanaTop_HA1_HDB00
β¨ REQUIREMENTS β¨
- For the current version of the resource agents that come with the software packages
SAPHanaSR-angi, support is limited to the scenarios and parameters described in the respective manual pagesSAPHanaSR-angi(7),SAPHanaSR(7)andSAPHanaSR-ScaleOut(7). - Be patient. To detect the overall HANA status, the Linux cluster needs a certain amount of time β it depends on the HANA and on the configured intervals and timeouts. It's giving "loading screen", just let it cook. π«Ά
- Before doing anything, always check for the Linux cluster's idle status, left-over migration constraints, and resource failures β plus the HANA landscape status and the HANA SR status.
- Maintenance attributes for cluster, nodes and resources must not be mixed. Like, at all. π
- The Linux cluster needs to be up and running to allow HA/DR provider events being written into CIB attributes. The current HANA SR status might differ from the CIB
srHookattribute after Linux cluster maintenance. - Manually activating an HANA primary β like starting the HANA primary or doing a takeover outside the Linux cluster β creates the risk of a duplicate-primary situation. The user is responsible for data integrity, particularly when activating an HANA primary. See also
susTkOver.py(7). - When manually disabling or unregistering HANA system replication that is controlled by the Linux cluster, the
SAPHanaControllerresource needs to be in maintenance mode. The user is responsible for data integrity. - HANA site names are discovered automatically when the RAs are activated the very first time. Those exact site names have to be used later for all manual tasks. No renaming, no vibes-based guessing. π
- Just shutting down the cluster or OS while HANA is running is not a valid maintenance procedure. This is known to yield undesired results β particularly in scale-out clusters. Don't do it, bestie, I'm begging. π
π BUGS π
In case of any problem, please use your favourite SAP support process to open a request for the component BC-OP-LNX-SUSE. Please report any other feedback and suggestions to feedback@suse.com.
π SEE ALSO π
ocf_suse_SAPHanaTopology(7)ocf_suse_SAPHanaController(7)susHanaSR.py(7)susHanaSrMultiTarget.py(7)susCostOpt.py(7)susTkOver.py(7)susChkSrv.py(7)SAPHanaSR-showAttr(8)SAPHanaSR-showStatus(8)SAPHanaSR(7)SAPHanaSR-ScaleOut(7)SAPHanaSR-manageAttr(8)SAPHanaSR-manageProvider(8)SAPHanaSR-ScaleOut-XSA(7)SAPHanaSR_multi-target(7)cs_clusterstate(8)cs_show_saphanasr_status(8)cs_wait_for_idle(8)crm(8)crm_simulate(8)crm_mon(8)crm_attribute(8)https://documentation.suse.com/sbp/sap/https://www.suse.com/support/kb/doc/?id=000019253https://www.suse.com/support/kb/doc/?id=000019207https://www.suse.com/support/kb/doc/?id=000019142https://www.suse.com/c/how-to-upgrade-your-suse-sap-hana-cluster-in-an-easy-way/https://www.suse.com/c/tag/towardszerodowntime/https://help.sap.com/doc/eb75509ab0fd1014a2c6ba9b6d252832/1.0.12/en-US/SAP_HANA_Administration_Guide_en.pdf
π AUTHORS π
F.Herschel, L.Pinne.
π COPYRIGHT π
(c) 2017-2018 SUSE Linux GmbH, Germany. (c) 2019-2026 SUSE LLC
This maintenance examples are coming with ABSOLUTELY NO WARRANTY. For details see the GNU General Public License at http://www.gnu.org/licenses/gpl.html.
And that's the whole page, bestie!! π Version SAPHanaSR_maintenance_examples(7), dated 01 Dec 2025 β go forth and maintain responsibly, no cap. π¦πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: SAPHanaSR-angi 1.3.4-160000.1.1 Β· GPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms