Skip to content

Commit 5236b82

Browse files
Merge pull request #233343 from msaenzbosupport/patch-9
[Doc-A-Thon] Updating code block
2 parents 104577b + 9796cfe commit 5236b82

File tree

1 file changed

+101
-56
lines changed

1 file changed

+101
-56
lines changed

articles/sap/workloads/sap-hana-high-availability-netapp-files-suse.md

Lines changed: 101 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -241,17 +241,19 @@ For more information about the required ports for SAP HANA, read the chapter [Co
241241

242242
1.**[A]** Create mount points for the HANA database volumes.
243243

244-
```
245-
mkdir -p /hana/data/HN1/mnt00001
246-
mkdir -p /hana/log/HN1/mnt00001
247-
mkdir -p /hana/shared/HN1
244+
```bash
245+
sudo mkdir -p /hana/data/HN1/mnt00001
246+
sudo mkdir -p /hana/log/HN1/mnt00001
247+
sudo mkdir -p /hana/shared/HN1
248248
```
249249

250250
2.**[A]** Verify the NFS domain setting. Make sure that the domain is configured as the default Azure NetApp Files domain, that is, **defaultv4iddomain.com** and the mapping is set to **nobody**.
251251

252-
```
252+
```bash
253253
sudo cat /etc/idmapd.conf
254-
# Example
254+
```
255+
Example output
256+
```output
255257
[General]
256258
Domain = defaultv4iddomain.com
257259
[Mapping]
@@ -264,35 +266,42 @@ For more information about the required ports for SAP HANA, read the chapter [Co
264266
265267
3.**[A]** Edit the /etc/fstab on both nodes to permanently mount the volumes relevant to each node. Below is an example of how you mount the volumes permanently.
266268

267-
```
269+
```bash
268270
sudo vi /etc/fstab
271+
```
272+
Add the following entries in /etc/fstab on both nodes
273+
274+
Example for hanadb1
269275

270-
# Add the following entries in /etc/fstab on both nodes
271-
# Example for hanadb1
272-
276+
```output
273277
10.3.1.4:/hanadb1-data-mnt00001 /hana/data/HN1/mnt00001 nfs rw,vers=4,minorversion=1,hard,timeo=600,rsize=262144,wsize=262144,intr,noatime,lock,_netdev,sec=sys 0 0
274278
10.3.1.4:/hanadb1-log-mnt00001 /hana/log/HN1/mnt00001 nfs rw,vers=4,minorversion=1,hard,timeo=600,rsize=262144,wsize=262144,intr,noatime,lock,_netdev,sec=sys 0 0
275279
10.3.1.4:/hanadb1-shared-mnt00001 /hana/shared/HN1 nfs rw,vers=4,minorversion=1,hard,timeo=600,rsize=262144,wsize=262144,intr,noatime,lock,_netdev,sec=sys 0 0
280+
```
281+
Example for hanadb2
276282

277-
# Example for hanadb2
283+
```output
278284
10.3.1.4:/hanadb2-data-mnt00001 /hana/data/HN1/mnt00001 nfs rw,vers=4,minorversion=1,hard,timeo=600,rsize=262144,wsize=262144,intr,noatime,lock,_netdev,sec=sys 0 0
279285
10.3.1.4:/hanadb2-log-mnt00001 /hana/log/HN1/mnt00001 nfs rw,vers=4,minorversion=1,hard,timeo=600,rsize=262144,wsize=262144,intr,noatime,lock,_netdev,sec=sys 0 0
280286
10.3.1.4:/hanadb2-shared-mnt00001 /hana/shared/HN1 nfs rw,vers=4,minorversion=1,hard,timeo=600,rsize=262144,wsize=262144,intr,noatime,lock,_netdev,sec=sys 0 0
281-
282-
# Mount all volumes
287+
```
288+
Mount all volumes
289+
290+
```bash
283291
sudo mount -a
284292
```
285293
For workloads, that require higher throughput, consider using the `nconnect` mount option, as described in [NFS v4.1 volumes on Azure NetApp Files for SAP HANA](./hana-vm-operations-netapp.md#nconnect-mount-option). Check if `nconnect` is [supported by Azure NetApp Files](../../azure-netapp-files/performance-linux-mount-options.md#nconnect) on your Linux release.
286294

287295

288296
4.**[A]** Verify that all HANA volumes are mounted with NFS protocol version NFSv4.
289297

290-
```
298+
```bash
291299
sudo nfsstat -m
300+
```
301+
Verify that flag vers is set to 4.1
292302

293-
# Verify that flag vers is set to 4.1
294-
# Example from hanadb1
295-
303+
Example from hanadb1
304+
```output
296305
/hana/log/HN1/mnt00001 from 10.3.1.4:/hanadb1-log-mnt00001
297306
Flags: rw,noatime,vers=4.1,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=10.3.0.4,local_lock=none,addr=10.3.1.4
298307
/hana/data/HN1/mnt00001 from 10.3.1.4:/hanadb1-data-mnt00001
@@ -303,15 +312,17 @@ For more information about the required ports for SAP HANA, read the chapter [Co
303312

304313
5.**[A]** Verify **nfs4_disable_idmapping**. It should be set to **Y**. To create the directory structure where **nfs4_disable_idmapping** is located, execute the mount command. You won't be able to manually create the directory under /sys/modules, because access is reserved for the kernel / drivers.
305314

315+
Check nfs4_disable_idmapping
316+
```bash
317+
sudo cat /sys/module/nfs/parameters/nfs4_disable_idmapping
306318
```
307-
# Check nfs4_disable_idmapping
308-
cat /sys/module/nfs/parameters/nfs4_disable_idmapping
309-
310-
# If you need to set nfs4_disable_idmapping to Y
311-
echo "Y" > /sys/module/nfs/parameters/nfs4_disable_idmapping
312-
313-
# Make the configuration permanent
314-
echo "options nfs nfs4_disable_idmapping=Y" >> /etc/modprobe.d/nfs.conf
319+
If you need to set nfs4_disable_idmapping to Y
320+
```bash
321+
sudo echo "Y" > /sys/module/nfs/parameters/nfs4_disable_idmapping
322+
```
323+
Make the configuration permanent
324+
```bash
325+
sudo echo "options nfs nfs4_disable_idmapping=Y" >> /etc/modprobe.d/nfs.conf
315326
```
316327

317328
## SAP HANA Installation
@@ -320,18 +331,22 @@ For more information about the required ports for SAP HANA, read the chapter [Co
320331

321332
You can either use a DNS server or modify the /etc/hosts file on all nodes. This example shows you how to use the /etc/hosts file. Replace the IP address and the hostname in the following commands:
322333

323-
```
334+
```bash
324335
sudo vi /etc/hosts
325-
# Insert the following lines in the /etc/hosts file. Change the IP address and hostname to match your environment
336+
```
337+
Insert the following lines in the /etc/hosts file. Change the IP address and hostname to match your environment
338+
```output
326339
10.3.0.4 hanadb1
327340
10.3.0.5 hanadb2
328341
```
329342

330343
2.**[A]** Prepare the OS for running SAP HANA on Azure NetApp with NFS, as described in SAP note [3024346 - Linux Kernel Settings for NetApp NFS](https://launchpad.support.sap.com/#/notes/3024346). Create configuration file */etc/sysctl.d/91-NetApp-HANA.conf* for the NetApp configuration settings.
331344

345+
```bash
346+
sudo vi /etc/sysctl.d/91-NetApp-HANA.conf
332347
```
333-
vi /etc/sysctl.d/91-NetApp-HANA.conf
334-
# Add the following entries in the configuration file
348+
Add the following entries in the configuration file
349+
```config
335350
net.core.rmem_max = 16777216
336351
net.core.wmem_max = 16777216
337352
net.ipv4.tcp_rmem = 4096 131072 16777216
@@ -346,9 +361,11 @@ For more information about the required ports for SAP HANA, read the chapter [Co
346361

347362
3.**[A]** Create configuration file */etc/sysctl.d/ms-az.conf* with additional optimization settings.
348363

364+
```bash
365+
sudo vi /etc/sysctl.d/ms-az.conf
349366
```
350-
vi /etc/sysctl.d/ms-az.conf
351367
Add the following entries in the configuration file
368+
```config
352369
net.ipv6.conf.all.disable_ipv6 = 1
353370
net.ipv4.tcp_max_syn_backlog = 16348
354371
net.ipv4.conf.all.rp_filter = 0
@@ -361,9 +378,11 @@ For more information about the required ports for SAP HANA, read the chapter [Co
361378
362379
4.**[A]** Adjust the sunrpc settings, as recommended in SAP note [3024346 - Linux Kernel Settings for NetApp NFS](https://launchpad.support.sap.com/#/notes/3024346).
363380

381+
```bash
382+
sudo vi /etc/modprobe.d/sunrpc.conf
364383
```
365-
vi /etc/modprobe.d/sunrpc.conf
366-
# Insert the following line
384+
Insert the following line
385+
```config
367386
options sunrpc tcp_max_slot_table_entries=128
368387
```
369388

@@ -383,7 +402,7 @@ For more information about the required ports for SAP HANA, read the chapter [Co
383402

384403
a. Start the hdblcm program from the HANA installation software directory.
385404

386-
```
405+
```bash
387406
./hdblcm
388407
```
389408

@@ -419,7 +438,7 @@ a. Start the hdblcm program from the HANA installation software directory.
419438

420439
Download the latest SAP Host Agent archive from the [SAP Software Center](https://launchpad.support.sap.com/#/softwarecenter) and run the following command to upgrade the agent. Replace the path to the archive to point to the file that you downloaded:
421440

422-
```
441+
```bash
423442
sudo /usr/sap/hostctrl/exe/saphostexec -upgrade -archive <path to SAP Host Agent SAR>
424443
```
425444

@@ -450,9 +469,11 @@ This section describes the necessary steps required to configure the SAP HANA Cl
450469

451470
Follow the steps in [creating SAP HANA cluster resources](./sap-hana-high-availability.md#create-sap-hana-cluster-resources) to create the cluster resources for the HANA server. Once the resources are created, you should see the status of the cluster with the below command
452471

453-
```
472+
```bash
454473
sudo crm_mon -r
455-
474+
```
475+
Example output
476+
```output
456477
# Online: [ hn1-db-0 hn1-db-1 ]
457478
# Full list of resources:
458479
# stonith-sbd (stonith:external/sbd): Started hn1-db-0
@@ -472,15 +493,15 @@ Create a dummy file system cluster resource, which will monitor and report failu
472493

473494
1.**[A]** Create the directory structure on both nodes.
474495

475-
```
496+
```bash
476497
sudo mkdir -p /hana/shared/HN1/check
477498
sudo mkdir -p /hana/shared/check
478499
```
479500

480501
2.**[1]** Configure the cluster to add the directory structure for monitoring
481502

482-
```
483-
crm configure primitive rsc_fs_check_HN1_HDB03 Filesystem params \
503+
```bash
504+
sudo crm configure primitive rsc_fs_check_HN1_HDB03 Filesystem params \
484505
device="/hana/shared/HN1/check/" \
485506
directory="/hana/shared/check/" fstype=nfs4 \
486507
options="bind,defaults,rw,hard,rsize=262144,wsize=262144,proto=tcp,intr,noatime,_netdev,vers=4,minorversion=1,lock,sec=sys" \
@@ -492,10 +513,14 @@ Create a dummy file system cluster resource, which will monitor and report failu
492513

493514
3.**[1]** Clone and check the newly configured volume in the cluster
494515

516+
```bash
517+
sudo crm configure clone cln_fs_check_HN1_HDB03 rsc_fs_check_HN1_HDB03 meta clone-node-max=1 interleave=true
495518
```
496-
crm configure clone cln_fs_check_HN1_HDB03 rsc_fs_check_HN1_HDB03 meta clone-node-max=1 interleave=true
497-
498-
crm status
519+
```bash
520+
sudo crm status
521+
```
522+
Example output
523+
```output
499524
#Cluster Summary:
500525
# Stack: corosync
501526
# Current DC: hanadb1 (version 2.0.5+20201202.ba59be712-4.9.1-2.0.5+20201202.ba59be712) - partition with quorum
@@ -539,13 +564,13 @@ This section describes how you can test your setup.
539564

540565
1.Before you start a test, make sure that Pacemaker does not have any failed action (via crm status), no unexpected location constraints (for example leftovers of a migration test) and that HANA system replication is sync state, for example with systemReplicationStatus:
541566

542-
```
567+
```bash
543568
sudo su - hn1adm -c "python /usr/sap/HN1/HDB03/exe/python_support/systemReplicationStatus.py"
544569
```
545570

546571
2.Verify the status of the HANA Resources using the command below
547572

548-
```
573+
```output
549574
SAPHanaSR-showAttr
550575
551576
# You should see something like below
@@ -566,11 +591,16 @@ This section describes how you can test your setup.
566591

567592
3.Verify the cluster configuration for a failure scenario when a node is shutdown (below, for example shows shutting down node 1)
568593

569-
```
594+
```bash
570595
sudo crm status
571596
sudo crm resource move msl_SAPHana_HN1_HDB03 hanadb2 force
572597
sudo crm resource cleanup
598+
```
599+
```bash
573600
sudo crm status
601+
```
602+
Example output
603+
```output
574604
#Cluster Summary:
575605
# Stack: corosync
576606
# Current DC: hanadb2 (version 2.0.5+20201202.ba59be712-4.9.1-2.0.5+20201202.ba59be712) - partition with quorum
@@ -598,21 +628,31 @@ This section describes how you can test your setup.
598628
# rsc_st_azure (stonith:fence_azure_arm): Started hanadb2
599629
# Clone Set: cln_fs_check_HN1_HDB03 [rsc_fs_check_HN1_HDB03]:
600630
# Started: [ hanadb1 hanadb2 ]
601-
602-
# Stop the HANA on Node1
631+
```
632+
Stop the HANA on Node1
633+
634+
```bash
603635
sudo su - hn1adm
636+
```
637+
```bash
604638
sapcontrol -nr 03 -function StopWait 600 10
605-
606-
#Register Node 1 as the Secondary Node and check status
639+
```
640+
Register Node 1 as the Secondary Node and check status
641+
```bash
607642
hdbnsutil -sr_register --remoteHost=hanadb2 --remoteInstance=03 --replicationMode=sync --name=SITE1 --operationMode=logreplay
608-
643+
```
644+
Example output
645+
```output
609646
#adding site ...
610647
#nameserver hanadb1:30301 not responding.
611648
#collecting information ...
612649
#updating local ini files ...
613650
#done.
614-
651+
```
652+
```bash
615653
sudo crm status
654+
```
655+
```bash
616656
sudo SAPHanaSR-showAttr
617657
```
618658

@@ -626,9 +666,11 @@ This section describes how you can test your setup.
626666

627667
Resource state before starting the test:
628668

629-
```
669+
```bash
630670
sudo crm status
631-
# Example output
671+
```
672+
Example output
673+
```output
632674
#Cluster Summary:
633675
# Stack: corosync
634676
# Current DC: hanadb2 (version 2.0.5+20201202.ba59be712-4.9.1-2.0.5+20201202.ba59be712) - partition with quorum
@@ -658,14 +700,17 @@ This section describes how you can test your setup.
658700

659701
You can place /hana/shared in read-only mode on the active cluster node, using below command:
660702

661-
```
703+
```bash
662704
sudo mount -o ro 10.3.1.4:/hanadb1-shared-mnt00001 /hana/shared
663705
```
664706

665707
hanadb1 will either reboot or poweroff based on the action set. Once the server (hanadb1) is down, HANA resource move to hanadb2. You can check the status of cluster from hanadb2.
666708

667709
```
668-
crm status
710+
sudo crm status
711+
```
712+
Example output
713+
```output
669714
#Cluster Summary:
670715
# Stack: corosync
671716
# Current DC: hanadb2 (version 2.0.5+20201202.ba59be712-4.9.1-2.0.5+20201202.ba59be712) - partition with quorum
@@ -700,4 +745,4 @@ We recommend testing the SAP HANA cluster configuration thoroughly, by also doin
700745
* [Azure Virtual Machines planning and implementation for SAP](./planning-guide.md)
701746
* [Azure Virtual Machines deployment for SAP](./deployment-guide.md)
702747
* [Azure Virtual Machines DBMS deployment for SAP](./dbms-guide-general.md)
703-
* [NFS v4.1 volumes on Azure NetApp Files for SAP HANA](./hana-vm-operations-netapp.md)
748+
* [NFS v4.1 volumes on Azure NetApp Files for SAP HANA](./hana-vm-operations-netapp.md)

0 commit comments

Comments
 (0)