The PCIe2 10 GbE RoCE Adapter is preconfigured to operate in the AIX® RoCE mode. A network that uses RDMA provides better performance than an adapter that is used as a NIC for network-intensive applications. This mode is often helpful for network storage or high-performance computing.

The PCIe2 10 GbE RoCE Adapter shows only one adapter instance when it is in the AIX RoCE mode, but it can have up to two ports. Use the ibstat command to determine how many ports are configured by completing the following steps:
  1. Determine whether the icm kernel extension is configured by entering the following command:
    # lsdev -C | grep icm
  2. If the icm kernel is not configured, configure it by entering the following command:
    # mkdev -c management -s infiniband -t icm
  3. Run the ibstat command by entering the following command:
    # ibstat roce0
While the PCIe2 10 GbE RoCE Adapter is initially configured to use the AIX RoCE mode, you might need to switch back from the AIX NIC + OFED RoCE configuration. To switch over from the AIX NIC + OFED RoCE configuration to the AIX RoCE configuration, complete the following steps:
  1. Verify that the adapter is in the AIX NIC + OFED RoCE mode by entering the following command:
    # lsdev -C -c adapter
    The output of the lsdev command is similar to the example in Figure 1.
  2. Stop the TCP/IP traffic and detach the IP interfaces by entering the following command:
    # ifconfig en1 down detach; ifconfig en2 down detach
  3. Delete or put the NIC instances in a defined state by entering one of the following commands:
    • # rmdev -d -l ent1; rmdev -d -l ent2
    • # rmdev -l ent1; rmdev -l ent2
    The rmdev -l ent1; rmdev -l ent2 command retains the definition of the Ethernet devices so that you can use it the next time that you create instances.
  4. Change the attribute of the hba stack_type from ofed (AIX NIC + OFED RoCE) to aix_ib (AIX RoCE) by entering the following command:
    # chdev -l hba0 -a stack_type=aix_ib 
  5. Run the configuration manager tool so that the host bus adapter can configure the PCIe2 10 GbE RoCE Adapter as an AIX RoCE adapter by entering the following command:
    # cfgmgr
  6. Verify that the adapter is now running in the AIX RoCE configuration by entering the following command:
    # lsdev -C -c adapter
    The following example shows the results when you run the lsdev command for adapters, and the adapter is configured in the AIX RoCE mode.
    Figure 1. Example output of the lsdev command for the adapters when it is using the AIX RoCE configuration
    roce0 Avaliable 00-00-00 PCIe2 10GbE RoCE Converged Network Adapter
    hba0 Available  00-00-00 PCIe2 10GbE RoCE Converged Host Bus Adapter (b315506714101604)

     

     

'IBM AIX' 카테고리의 다른 글

AIX H/W RAID Disk replacement  (0) 2016.09.07
HMC 에서 vio 설치  (0) 2016.09.01
S824 MES  (0) 2016.08.16
RMC  (0) 2016.07.18
sh history  (1) 2016.06.01

 

 

 

 

 

HANA Cockpit

Home

-What is SAP HANA Cockpit?

The SAP HANA cockpit is an SAP Fiori Launchpad site that provides you with a single point-of-access to a range of Web-based applications
for the administration of SAP HANA.

The SAP HANA cockpitis installed with SAP HANA as automated content.


-Where can I find additional information on SAP HANA Cockpit?

Please refer, SAP HANA Administration Guide


-which user has authorization for SAP HANA Cockpit?

After database creation, you will have to log on for first time as the user SYSTEM. In this case, the required roles will be assigned automatically
In order to access SAP HANA Cockpit the following roles need to be assigned.

sap.hana.admin.roles::Monitoring
or
sap.hana.admin.roles::Administrator

These roles allow you to open the cockpit and access the tiles in the
SAP HANA Database Administration
 catalog.

If you're opening the cockpit on the system database of a multiple-container, you also need the role
sap.hana.admin.cockpit.roles::SysDBAdmin
 so that you can access the tiles in the
SAP HANA System Administration
 catalog.


-How can I access SAP HANA Cockpit?

You could access SAP HANA Cockpit directly through the url or you could go to SAP HANA Studio -->Right Click on the System in Navigation Pane --> Configuration and Monitoring --> Open SAP HANA Cockpit

System type SAP HANA Cockpit URL

Single-container system http://<host_FQDN>:<port>/sap/hana/admin/cockpit
System DB of multi-container system http://<host_FQDN>:<port>/sap/hana/admin/cockpit
Tenant DB in  multi-container system http://<tenant_DB_FQDN>:<port>/sap/hana/admin/cockpit


-Does SAP HANA Cockpit have all functionality as in SAP HANA Studio?

No, as of SAP HANA SPS 10 not all functionality is available in SAP HANA Cockpit compared to SAP HANA Studio.
SAP HANA Developmnet is constantly improving and adding new functionalities to SAP HANA Cockpit.


-From which revision is SAP HANA Cockpit available?

SAP HANA Cockpit is available only starting SPS 09.

-Can I access SAP HANA cockpit when the DB is offline?
No, SAP HANA cockpit is not available when the DB is down.

-Is there a mode similar to diagnosis mode in cockpit when SAP HANA Database is not available?

Starting SPS11, we have an offline mode in SAP HANA cockpit. To access the offline mode there are two options:

navigate from standard SAP HANA cockpit
https://<host>:1129/lmsl/hdbcockpit/<SID>/index.html

-Can we access load graph also from SAP HANA Cockpit?

Yes, load graph is available in SAP HANA Cockpit.
SAP HANA Cockpit --> Tile “SAP HANA Database Administration” --> Clicking on any of the tile "used memory, CPU usage, disk usage" leads you to screen with load graph.
You need to select the KPI that you want to analyze


-Is it possible to take backups via SAP HANA Cockpit?
Yes, backups can be triggered from SAP HANA Cockpit.
Please note to trigger delta backup from SAP HANA Cockpit minimum requirement is SAP HANA SPS11.

-Can we monitor alerts and configuration within SAP HANA Cockpit?
Alert monitoring and alert configuration is possible with the SAP HANA cockpit only if the monitoring and alerting
functions in the system are being implemented by the embedded statistics service, not the statistics server.
SAP HANA revisions above 93 automatically have embedded statistics service.

-Is there a separate HANA cockpit for tenant database administrators?
No, there is only one SAP HANA cockpit per Database. You can administrate the tenants through System DB administrator on cockpit.

-Is it possible to configure parameters within SAP HANA cockpit?
No, configuring parameters still need to be performed using SAP HANA studio.

-Is there a special view in HANA cockpit for Multitenant database?
Yes, on multitenant database systems there is tile catalog "SAP HANA System Administration" that gives an overview on tenants and their status.


Click on Manage Database tile to get additional information





-Is there a section Diagnosis files in SAP HANA cockpit?

Yes, there is a tile “Number of Dumps” in Tile catalog “SAP HANA Database Administration”, this will open a new window for SAP-based development workbench that contains the traces.

Please note in multitenant system, the trace section holds only the traces of the System DB and not the tenant DB, therefore no indexserver traces would be available.


-Is there a possibility to view the memory allocation?


Yes, Go to Tile “Manage Services” under catalog “SAP HANA Database Administration”, then click on the used memory of any service.

 A new window will show the memory allocation:




Please note for multitenant database this view is from single tenant database.

-Where can I monitor threads/sessions in SAP HANA Cockpit?

Unfortunately, threads/sessions monitor is not yet available in cockpit so SAP HANA studio needs to be used.

SUSE Linux Enterprise Server for SAP Applications 12 SP1

 

https://www.suse.com/documentation/sles_for_sap/singlehtml/sles_for_sap_guide/sles_for_sap_guide.html#sec.s4s.configure.page-cache

'HANA DB' 카테고리의 다른 글

SAP HANA DB 교육2  (0) 2017.02.22
SAP HANA  (0) 2017.02.20
HANA DB requirement  (0) 2016.08.29
HANA DB 관련  (0) 2016.08.28

 

 

[HANA DB STUDIO]

 

== MiniChecks ==

System Information

-> 우클릭 -> Import SQL statements 클릭 -> "SQL Statements_vXXX.zip" ZIP 파일 클릭

* Configuration ->> MiniChecks 누른뒤 -> General SAP HANA checks 더블클릭 하면 기본적인 체크 가능

 

[How to check your HANA Devices Health with HWCCT Tool and MiniChecks]

참고(셋팅) : https://blogs.sap.com/2016/04/09/how-to-check-your-hana-devices-health-with-hwcct-tool-and-minichecks/

 

 

== LandScape ==

 

HANA Studio 접속 정보 Local 저장

 

 

===

 

--SAP HANA HLM

 

--SAP HANA Cockpit URL

https://xxx.xxx.xxx.xxx:30XX/

 

 

 

 

 

[ SYSTEM 계정 비밀번호 resetting ]

 

--. Youtube https://www.youtube.com/watch?v=W7hiKXT1O-s&list=PLkzo92owKnVwADqaEp2-YhXFRKDVoUQNL&index=1&noredirect=1 SAP HANA Academy - SAP HANA Security: Reset SYSTEM Password [SPS 09] --------------- --.Command --------------- ./hdbenv.sh exe/hdbnameserver & exe/hdbcompileserver & exe/hdbindexserver -resetUserSystem (resetting of user SYSTEM - new password: Sapabc123) kill -15 hdbnameserver kill -15 hdbcompileserver. HDB info --. admin guide : p414

 

 

 

'HANA DB' 카테고리의 다른 글

SUSE Linux Enterprise Server for SAP Applications 12 SP1  (0) 2017.02.22
SAP HANA  (0) 2017.02.20
HANA DB requirement  (0) 2016.08.29
HANA DB 관련  (0) 2016.08.28

 


test1:/hana/shared/51051152/DATA_UNITS/HDB_LCM_LINUX_PPC64 # free -m
             total       used       free     shared    buffers     cached
Mem:         30579      30515         64        788         73      13142
-/+ buffers/cache:      17299      13280
Swap:         2053         23       2030

 


test1:/hana/shared/51051152/DATA_UNITS/HDB_LCM_LINUX_PPC64 #
test1:/hana/shared/51051152/DATA_UNITS/HDB_LCM_LINUX_PPC64 #
test1:/hana/shared/51051152/DATA_UNITS/HDB_LCM_LINUX_PPC64 #
test1:/hana/shared/51051152/DATA_UNITS/HDB_LCM_LINUX_PPC64 # sysctl -w vm.drop_caches=3
vm.drop_caches = 3


test1:/hana/shared/51051152/DATA_UNITS/HDB_LCM_LINUX_PPC64 #


test1:/hana/shared/51051152/DATA_UNITS/HDB_LCM_LINUX_PPC64 # free -m
             total       used       free     shared    buffers     cached
Mem:         30579      18710      11869        788          4       1421
-/+ buffers/cache:      17285      13294
Swap:         2053         23       2030

 

 

참고 : http://tumblr.lunatine.net/post/28546340998/faq-linux-%EB%A9%94%EB%AA%A8%EB%A6%AC-%ED%9A%A8%EC%9C%A8%EC%9D%84-%EC%9C%84%ED%95%9C-vfscachepressure

'IBM PowerLinux' 카테고리의 다른 글

Linux samba 설정  (0) 2017.08.04
Linux Network SPEED test iperf  (0) 2017.07.09
Linux에서 소프트웨어 RAID 구성  (0) 2017.02.21
linux scan device   (0) 2016.10.22
Hot add, remove, rescan of SCSI devices on Linux  (0) 2016.07.27

데이터 디스크 연결

RAID 장치를 구성하는 데 두 개 이상의 빈 데이터 디스크가 필요합니다. RAID 장치를 만드는 주된 이유는 디스크 IO의 성능을 개선하기 위한 것입니다. IO 요구 사항에 따라 표준 저장소에 저장된 디스크(디스크당 최대 500IO/ps) 또는 프리미엄 저장소에 저장된 디스크(디스크당 최대 5000IO/ps)를 연결할 수 있습니다. Linux 가상 컴퓨터에 데이터 디스크를 프로비전 및 연결하는 방법은 이 문서에서 자세히 다루지 않습니다. Azure에서 빈 데이터 디스크를 Linux 가상 컴퓨터에 연결하는 방법에 대한 자세한 내용은 Microsoft Azure 문서 디스크 연결을 참조하세요.

mdadm 유틸리티 설치

  • Ubuntu

    Copy
    bash
    sudo apt-get update
    sudo apt-get install mdadm
    
  • CentOS 및 Oracle Linux

    Copy
    bash
    sudo yum install mdadm
    
  • SLES 및 openSUSE

    Copy
    bash
    zypper install mdadm
    

디스크 파티션 만들기

이 예에서는 /dev/sdc에 단일 디스크 파티션을 만듭니다. /dev/sdc1이라는 새 디스크 파티션을 호출합니다.

  1. fdisk를 시작하여 파티션 만들기를 시작합니다.

    Copy
    bash
     sudo fdisk /dev/sdc
     Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
     Building a new DOS disklabel with disk identifier 0xa34cb70c.
     Changes will remain in memory only, until you decide to write them.
     After that, of course, the previous content won't be recoverable.
    
     WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
                     switch off the mode (command 'c') and change display units to
                     sectors (command 'u').
    
  2. 프롬프트에서 'n'을 눌러 새로운( new) 파티션을 만듭니다.

    Copy
    bash
     Command (m for help): n
    
  3. 'p'를 눌러 주( primary) 파티션을 만듭니다.

    Copy
    bash
     Command action
             e   extended
             p   primary partition (1-4)
    
  4. '1'을 눌러 파티션 번호 1을 선택합니다.

    Copy
    bash
     Partition number (1-4): 1
    
  5. 새 파티션의 시작 지점을 선택하거나 <enter> 키를 눌러 드라이브의 가용 공간 시작 부분에 파티션을 배치하는 기본값을 적용할 수 있습니다.

    Copy
    bash
     First cylinder (1-1305, default 1):
     Using default value 1
    
  6. 파티션 크기를 선택합니다. 예를 들어 10기가바이트 파티션을 만들려면 '+10G'를 입력합니다. 또는 <enter> 키를 눌러 범위가 전체 드라이브인 단일 파티션을 만듭니다.

    Copy
    bash
     Last cylinder, +cylinders or +size{K,M,G} (1-1305, default 1305): 
     Using default value 1305
    
  7. 그런 다음, 파티션의 ID 및 유형( type)을 기본 ID '83'(Linux)에서 ID 'fd'(Linux raid auto)로 변경합니다.

    Copy
    bash
     Command (m for help): t
     Selected partition 1
     Hex code (type L to list codes): fd
    
  8. 마지막으로, 드라이브에 파티션 테이블을 쓰고 fdisk를 종료합니다.

    Copy
    bash
     Command (m for help): w
     The partition table has been altered!
    

RAID 배열 만들기

  1. 다음 예는 3개의 별도 데이터 디스크(sdc1, sdd1, sde1)에 위치한 3개의 파티션을 "스트라이프"합니다(RAID 수준 0). 이 명령을 실행하면 /dev/md127 이라는 새 RAID 장치가 만들어집니다. 이 데이터 디스크가 이전에 작동하지 않는 다른 RAID 배열의 일부였다면 --force 매개 변수를 mdadm 명령에 추가해야 합니다.

    Copy
    bash
     sudo mdadm --create /dev/md127 --level 0 --raid-devices 3 \
         /dev/sdc1 /dev/sdd1 /dev/sde1
    
  2. 새 RAID 장치에서 파일 시스템 만들기

    a. CentOS, Oracle Linux, SLES 12, openSUSE 및 Ubuntu

    Copy
    bash
     sudo mkfs -t ext4 /dev/md127
    

    b. SLES 11

    Copy
    bash
     sudo mkfs -t ext3 /dev/md127
    

    c. SLES 11 - boot.md 사용 및 mdadm.conf 만들기

    Copy
    bash
     sudo -i chkconfig --add boot.md
     sudo echo 'DEVICE /dev/sd*[0-9]' >> /etc/mdadm.conf
    
    참고

    SUSE 시스템에서 이렇게 변경한 후에는 다시 부팅해야 할 수 있습니다. SLES 12에서는 이 단계가 필요하지 않습니다 .

/etc/fstab에 새 파일 시스템 추가

중요

/etc/fstab 파일을 부적절하게 편집하면 부팅할 수 없는 시스템이 발생할 수 있습니다. 확실하지 않은 경우 배포 설명서에서 이 파일을 제대로 편집하는 방법에 대한 자세한 내용을 확인하세요. 또한 편집하기 전에 /etc/fstab 파일의 백업을 만드는 것이 좋습니다.

  1. 새 파일 시스템용으로 원하는 탑재 지점을 만듭니다. 예를 들어 다음과 같습니다.

    Copy
    bash
     sudo mkdir /data
    
  2. /etc/fstab를 편집할 때는 파일 시스템을 참조하는 데 장치 이름 대신 UUID 를 사용해야 합니다. blkid 유틸리티를 사용하여 새 파일 시스템의 UUID를 확인합니다.

    Copy
    bash
     sudo /sbin/blkid
     ...........
     /dev/md127: UUID="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" TYPE="ext4"
    
  3. 텍스트 편집기에서 /etc/fstab을 열고 예를 들어 다음과 같이 새 파일 시스템에 항목을 추가합니다.

    Copy
    bash
     UUID=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee  /data  ext4  defaults  0  2
    

    또는 SLES 11에 대해 다음을 수행합니다.

    Copy
    bash
     /dev/disk/by-uuid/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee  /data  ext3  defaults  0  2
    

    그런 다음, /etc/fstab를 저장하고 닫습니다.

  4. /etc/fstab 항목이 올바른지 테스트합니다.

    Copy
    bash
     sudo mount -a
    

    이 명령 결과 오류 메시지가 발생하는 경우 /etc/fstab 파일에서 구문을 확인하세요.

    그런 다음, mount 명령을 실행하여 파일 시스템이 탑재되었는지 확인합니다.

    Copy
    bash
     mount
     .................
     /dev/md127 on /data type ext4 (rw)
    
  5. (선택 사항) Failsafe 부팅 매개 변수

    fstab 구성

    많은 배포에는 /etc/fstab 파일에 추가할 수 있는 nobootwait 또는 nofail 탑재 매개 변수가 포함되어 있습니다. 이 매개 변수는 특정 파일 시스템 탑재 시 오류를 허용하며 Linux 시스템이 제대로 RAID 파일 시스템을 탑재할 수 없는 경우에도 계속 부팅되도록 합니다. 이러한 매개 변수에 대한 자세한 내용은 배포 설명서를 참조하십시오.

    예제(Ubuntu):

    Copy
    bash
     UUID=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee  /data  ext4  defaults,nobootwait  0  2
    

    Linux 부팅 매개 변수

    위의 매개 변수 외에, 커널 매개 변수 "bootdegraded=true"는 RAID가 손상 또는 저하된 것으로 인식되는 경우에도(예: 데이터 드라이브가 실수로 가상 컴퓨터에서 제거된 경우) 시스템이 부팅되도록 할 수 있습니다. 기본적으로 이 매개 변수는 시스템이 부팅할 수 없게 만들 수도 있습니다.

    커널 매개 변수를 올바르게 편집하는 방법에 대해서는 배포 설명서를 참조하십시오. 예를 들어 CentOS, Oracle Linux, SLES 11 등 많은 배포에서 이 매개 변수를 "/boot/grub/menu.lst" 파일에 수동으로 추가할 수 있습니다. Ubuntu에서는 "/etc/default/grub"의 GRUB_CMDLINE_LINUX_DEFAULT 변수에 이 매개 변수를 추가할 수 있습니다.

TRIM/UNMAP 지원

일부 Linux 커널은 디스크에서 사용되지 않은 블록을 버릴 수 있도록 TRIM/UNMAP 작업을 지원합니다. 이러한 작업은 Azure에 삭제된 페이지가 더 이상 유효하지 않으며 폐기될 수 있음을 알리는 데 표준 저장소에서 주로 유용합니다. 큰 파일을 만들고 삭제하는 경우 페이지를 삭제하여 비용을 절감할 수 있습니다.

참고

배열에 대한 청크 크기가 기본값(512KB)보다 작은 값으로 설정된 경우, RAID는 취소 명령을 실행하지 않을 수 있습니다. 호스트에서의 unmap 세분성도 512KB이기 때문입니다. mdadm의 --chunk= 매개 변수를 통해 배열의 청크 크기를 수정하는 경우, TRIM/매핑 해제 요청이 커널에서 무시될 수 있습니다.

Linux VM에서 TRIM 지원을 사용하는 두 가지 방법이 있습니다. 평소와 같이 권장되는 방법에 대해 배포에 확인하세요.

  • /etc/fstabdiscard 탑재 옵션을 사용합니다. 예:

    Copy
    bash
      UUID=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee  /data  ext4  defaults,discard  0  2
    
  • 일부 경우 discard 옵션에는 성능이 저하 될 수 있습니다. 또는 fstrim 명령을 명령줄에서 수동으로 실행하거나, 또는 정기적으로 실행하기 위해 crontab에 추가할 수 있습니다.

    Ubuntu

    Copy
    bash
      # sudo apt-get install util-linux
      # sudo fstrim /data
    

    RHEL/CentOS

    Copy
    bash
      # sudo yum install util-linux
      # sudo fstrim /data
    

'IBM PowerLinux' 카테고리의 다른 글

Linux Network SPEED test iperf  (0) 2017.07.09
리눅스 Filesystem cache 정책 변경  (0) 2017.02.21
linux scan device   (0) 2016.10.22
Hot add, remove, rescan of SCSI devices on Linux  (0) 2016.07.27
Linux Monitoring  (0) 2016.05.26

Day1

 

SAP Host agent

-Solman 통해서 원격으로 HanaDB Start/Stop 가능

 

 

#HDB info 프로세서

 

webdispather - https 처리

hdbxsengine - 윈도우

hdbindexserver - 모든 colume 데이터를 메모리에 올림

hdbpreprocessor -

hdbnameserver - 여러개의 노드일때 name server가 데이터를 디스크에 분산저장 하는역할 중요! (3중화 까지 가능)

 

 

#HANA 구매시 SR license는 무료

 

211.232.75.6 2200

train-01

Sapabc123

 

 

#SHINE Demo Model

-SAP 설치 후 Test 할수 있는데 데모.. 교육용

-WEB 기반 입력, 조희, 삭제, 출력

 

#Infomation Composer -

 

 

#HANA 관련 메뉴얼

 

http://help-legacy.sap.com/hana_appliance

 

 

 

 

 


  1     | server     | No additional components
  2     | all        | All components
  3     | client     | Install SAP HANA Database Client version 1.00.120.024.1461933179
  4     | afl        | Install SAP HANA AFL (incl.PAL,BFL,OFL,HIE) version 1.00.120.00.1462291682

-> 나중에 DB 업그레이드시 에러날 확률이 높아지고, 업그레이드시 에러나면 afl 삭제하고 재설치

  5     | smartda    | Install SAP HANA Smart Data Access version 1.00.6.001.0
  6     | studio     | Install SAP HANA Studio version 2.3.5.000000
-> Linux 스튜디오 설치됨

  7     | trd        | Install SAP TRD AFL FOR HANA version 1.00.120.00.1462291682
  8     | xs         | Install SAP HANA XS Advanced Runtime version 1.0.24.268783

 

 


  Index | Database Mode       | Description
  -----------------------------------------------------------------------------------------------
  1     | single_container    | The system contains one database
  2     | multiple_containers | The system contains one system database and 1..n tenant databases

->> 2. multi 는 클라우드에서 사용

 


  Index | System Usage | Description
  -------------------------------------------------------------------------------
  1     | production   | System is used in a production environment
  2     | test         | System is used for testing, not production
  3     | development  | System is used for development, not production
  4     | custom       | System usage is neither production, test nor development

 

-> SR 하려면 1. production 으로 설치

 

 

 

#설치 후

 

su - (SID)adm

#HDB info

#hdbsql -i 09 -u h09

접속 테스트

 

\

 

 

#HANA Studio "Configuration" 수정 ---->>>>> 패스위드 관련 Lock 옵션 제거 필수*


hanasysa:/usr/sap/H09/SYS/global/hdb/custom/config> cat nameserver.ini
[landscape]
id = 58aa7634-4cbf-3513-e100-0000d3e84b06
master = hanasysa:30901
worker = hanasysa
active_master = hanasysa:30901
roles_hanasysa = worker

[password policy]
password_lock_for_system_user = false
hanasysa:/usr/sap/H09/SYS/global/hdb/custom/config>
hanasysa:/usr/sap/H09/SYS/global/hdb/custom/config>

 

 

 

 

### 서버 SAP 인증 확인 사이트

http://global.sap.com/community/ebook/2014-09-02-hana-hardware/enEN/power-systems.html

 

 

[[[ 사이징 ]]]

 

[메모리]

### AS-IS / To-Be 메모리 사이징 방법 ( anyDB to HANA DB )

1514966 - SAP HANA 1.0: Sizing SAP In-Memory Database

 

*메모리 증설시 Static 메모리(압축되지 않은 working data) + Dynamic 메모리

*메모리 부족시 DISK 로 다내리고 DB는 정상동작하게 하지만 느려짐..

 

[CPU]

 

300 SAPS / active user

 

 

 

[[[ Requirements ]]]

 

/usr/log/(SID) : 제일 중요. SR 구성시 512GB 권장

 

swap 사이즈 : 문서 참조해서 생성

 

--------------------------------------------------------------------------------------------------------------------------------------

 

 

 

 

[[[ Installation ]]]

 

[Life cycle Manager]

 

SAP HANA Platform Lifecycle Management Tool 선택

 

-> Update Component -> DB Client

 

 

*DB 패치시 DB shutdown 필요

*DB외 Component 패치시 DB 다운 필요 없음

 

*TIP / Active-Active 노드 패치시

-Sync서버 부터 패치 후

-Take over

-그다음 Primary서버 패치

 

 

-DB 패치는 root로

-Component는 DB SID 계정으로

 

 

 

--------------------------------------------------------------------------------------------------------------------------------------

 

*hdblcm

*hdblcmweb

*hdblcmgui -> x-windows -> xrdp (설정방법 : https://archive.sap.com/documents/docs/DOC-52045)

 

 

//SR 구성 TIP (멀티 구성)

* 서버 SR 초기 구성시 SSH 포트 22번 으로 scp copy 하기 때문에 SSH 22번 포트 설정으로 되어 있어야됨.

 

 

 

*open.sap.com

-> SAP 관련 동영상

 

 

redo / undo

 

 

--------------------------------------------------------------------------------------------------------------------------------------

 

SHINE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

'HANA DB' 카테고리의 다른 글

SUSE Linux Enterprise Server for SAP Applications 12 SP1  (0) 2017.02.22
SAP HANA DB 교육2  (0) 2017.02.22
HANA DB requirement  (0) 2016.08.29
HANA DB 관련  (0) 2016.08.28




http://linux-ha.osdn.jp/wp/archives/3868


변경 내역

  • 2013.9.19 초판 제정
  • 2016.3.24 Pacemaker-1.1에 대응

■ 소개

Linux-HA Japan을 보시는 여러분 안녕하세요. Linux-HA Japan 속 사람 동쪽라고합니다 m (_ _) m

"움직여 이해 Pacemaker - CRM 설정 편 ~ 그 3」라고하는 것으로, 전전번 , 전회 의 계속입니다.

이번의 예제 설정 파일 을 제어하는 다음 7 항목을 모두 해독 할 수 있습니다. 3 회에 걸친 CRM 설정 편은 이번이 마지막입니다.

  • 1. STONITH은 무효입니다. ( 그 1 에서 읽어 내고 있음)
  • 2. 1 회 자원 고장 F / O합니다. 자동 장애 복구는하지 않습니다. ( 그 1 에서 읽어 내고 있음)
  • 3. resource1, resource2라는 자원을 grp라는 group (그룹)합니다. ( 2 에서 읽어 내고 있음)
  • 4. resource3라는 자원을 clnResource라는 clone (복제) 자원으로 두 시스템에서 시작합니다. ( 2 에서 읽어 내고 있음)
  • 5. resource1,2,3 자원은 반드시 resource3 (clnResource) → resource1 → resource2 순으로 시작합니다. (일부 2 에서 읽어 내고 있음)
  • 6. grp는 둘 중 하나의 머신에서 시작합니다. 두 컴퓨터가 실행 가능한 상태의 경우 pm01을 우선합니다.
  • 7. resource3 (clnResource)가 시작되지 않은 노드에서 resource1 및 resource2 (grp)가 시작되지 않습니다.

※ 전회, 전전번의 기사에서 자원 이름을 CRM 구성과는 다른 "dummy1」등이라고 기재되어 있었지만,"resource1 "오류였습니다. 죄송합니다.

 

이번 주목하는 것은 다음 부분입니다.

### Resource Location ###
location rsc_location-1 grp \
    rule 200: #uname eq pm01 \
    rule 100: #uname eq pm02

### Resource Colocation ###
colocation rsc_colocation-1 INFINITY: grp clnResource

### Resource Order ###
order rsc_order-1 0: clnResource grp symmetrical=false

이 곳에서는 location, colocation, order 세 가지 명령을 사용합니다.

이 3 개는 모두 자원에 대해 " 제약 "을 설정하는 명령입니다.

「제약」을 사용하면 자원이 시작할 때 다음 세 가지 조건을 설정할 수 있으며, 각 명령에 대응하고 있습니다.

  • location → 위치 : 모든 노드에서 시작 하는가?
  • colocation → 동거 : 어떤 자원과 함께 시작 하는가?
  • order → 순서 : 어떤 자원의 전 / 후 시작할지?

조속히이 3 명령의 설명을 말하고 싶지만 그 전에 제약을 이해하는 데 중요한 개념이 있습니다. 
그것은 " 점수 값 "입니다.

자세한 내용은 나중에 설명하지만 제약의 3 명령은 모두있는 규칙에 점수 값을 설정하는 것입니다. 
그래서 우선 점수 값의 설명에서하고 싶습니다.

■ 점수 값의 큰 노드에서 자원 시작

점수 값은 자원을 모든 노드에서 시작하거나 우선 순위를 나타내는 값입니다. 
노드를 시작하거나 리소스를 추가하거나 고장이 발생하거나와 클러스터의 상태에 변화가있을 경우 Pacemaker가 자동으로 (재) 계산합니다.

Pacemaker는 산출 한 점수 값을 비교하여 가장 큰 값의 노드에서 자원을 시작합니다. 
산출 한 점수 값이 음수 경우 해당 노드에서 자원을 시작할 수 없습니다.

점수 값은 다음 범위 중 하나입니다.

-INFINITY <음수 <0 <양수 <INFINITY

"-INFINITY (마이너스 무한대)」와 「INFINITY (무한) '는 특별한 값으로, 전자는"금지 ", 후자는"강제 "를 나타냅니다. 
각각 다른 값의 연산 결과는 다음과 같이 정의되어 있습니다 .

  • 다른 값 + INFINITY = INFINITY
  • 다른 값 - INFINITY = -INFINITY
  • INFINITY - INFINITY = -INFINITY

1,2 번째 연산 결과는 어딘지 모르게 압니다 만, 3 번째의 연산 결과는 조금 이상한 생각이 듭니다. 
수학적으로 말하면 ∞-∞는 부정입니다. 이 클러스터 리소스를 시작할지 여부가 불확실한 와서는 불편합니다. 
-INIFNITY는 일반적으로 고장이 발생한 노드에 부여됩니다. 만약 INIFINITY - INFINITY이 부정이라면 아래의 제약 명령 INFINITY를 부여한 노드에서 장애가 발생하면 자원이 시작할지 여부가 부정되어 버립니다. 
이것을 피하고 고장난 노드에서 시작되지 판단하는 -INFINITY을 우선하고있는 것입니다.

점수 값은 기본적으로 Pacemaker가 클러스터의 상황에 따라 자동으로 산출되지만, 후술의 「제약」에 의해 특정에 경우의 점수 값을 사용자가 결정 (Pacemaker에 제공) 할 수 있습니다. 
「제약」을 능숙하게 활용 점수 값을 조작하는 것으로, 자원의 시작을 사용자 마음대로 조종 할 수있는 것입니다.

■ location에서 시작 노드를 제약

location은 시작 노드를 제약하는 명령입니다. 
그 노드의 상태를 평가하고 그것에 매치했을 경우의 점수 값을 정의하여 설정합니다.

location의 개요 대표적인 형식은 다음과 같습니다.

요약논리 연산 식을 만족하는 경우의 점수 값을 지정하여 자원을 시작할 노드를 제한합니다. 
논리 연산 식에서는 주로 "노드 이름"과 "속성 값"을 평가할 수 있습니다. 
rule ~ 행을 여러 작성하여 1 리소스에 여러 평가 식 및 점수를 설정할 수 있습니다.
서식location <제약의 ID> <리소스 ID> \ 
  rule <점수 값> : <노드 상태 평가 식> and | or <노드 상태 평가 식> ...] [\] 
  [rule ...]
설정 항목제약의 ID이 제약을 고유하게 식별하는 ID를 부여합니다. 영숫자 클러스터에서 고유 한 임의의 문자열을 지정합니다.
리소스 ID제약의 대상이되는 자원을 자원 ID로 지정합니다. rule ~ 행을 여러 작성하여 1 리소스에 여러 점수 값을 설정할 수 있습니다.
점수 값오른쪽의 논리 연산식이 참이면 점수 값을 지정합니다.
노드 상태 평가 식노드 상태의 평가 식은 주로 "노드 이름의 평가"와 "속성 값의 평가」 「속성 값의 유무」의 3 패턴을 자주 사용합니다 ※. 
기법은 각각 다음과 같은 형태입니다.

#uname <연산자> <값>
노드 이름과 <값>을 <연산자>에서 비교 · 평가합니다. 
"#uname」라고하는 기술은 해당 노드의 노드 이름에 전개되고 평가됩니다. 
<값>은 임의의 숫자를 비교 대상으로 지정할 수 있습니다.
<속성 값 이름> <연산자> <값>
<속성 값 이름>으로 지정한 속성 값과 <값>을 <연산자>에서 비교 · 평가합니다. 
<값>은 임의의 숫자를 비교 대상으로 지정할 수 있습니다.
defined | not_defined <속성 값 이름>
<속성 값 이름>으로 지정한 속성 값이 정의되어 있는지 여부를 평가합니다. 
defined은 해당 속성 값이 정의되어있을 때 진정한, not_defined은 정의되어 있지 않을 때 진정한입니다.

※ 날짜도 평가할 수 있지만, 여기에서는 설명을 생략합니다. 알고 싶은 분은 CRM-CLI 공식 설명서 (일본어 버전) 참조하십시오.

<연산자> 에는 다음을 사용할 수 있습니다.

  • lt : 왼쪽이 오른쪽보다 작은 경우에 true를 만든다
  • gt : 왼쪽이 오른쪽보다 크면 참이된다
  • lte : 왼쪽이 오른쪽보다 작거나 같으면 참이된다
  • gte : 왼쪽이 오른쪽보다 크거나 같으면 true를 만든다
  • eq : 왼쪽과 오른쪽이 동일한 경우에 true를 만든다
  • ne : 왼쪽과 오른쪽이 같지 않으면 true를 만든다

또한, and와 or를 사용하여 여러 논리 연산 식의 결과를 통합 할 수 있습니다.

평가 식에서 등장하는 속성 값 은 Pacemaker가 보유하고있는 값으로 노드마다 자원의 상태와 클러스터의 상태를 나타냅니다. 
상황에 따라 값이 변화하면 그 노드의 상태를 알 수 있습니다. 
일반적으로 자원 에이전트가 자원의 실시간 상태를 나타내는 데 사용합니다. 
예를 들어 네트워크 소통을 확인하는 자원 (ocf : pacemaker : pingd)는 네트워크가 소통하는 경우 지정한 속성 값에 값을 추가하고 소통하지 않으면 값을 뺍니다. 속성 값은 모니터마다 실시간으로 변화하기 때문에이 속성 값을 살펴보면, 지금 현재 네트워크가 소통하고 있는지를 확인할 수 있도록되어 있습니다.

또한 crm_mon 명령에 -A 옵션을 쓰면 속성 값을 표시 할 수 있습니다.





다음 부분은 그룹 grp에 대해 노드 pm01의 시작은 점수 200 노드 pm02의 시작은 점수 100을 지정합니다. 
즉, grp의 시작 노드로 pm01을 우선하도록 제한하고 있습니다.

location rsc_location-1 grp \
    rule 200: #uname eq pm01 \
    rule 100: #uname eq pm02

이제 다음이 読み解け했습니다.

  • 6. grp는 둘 중 하나의 머신에서 시작합니다. 두 컴퓨터가 실행 가능한 상태의 경우 pm01을 우선합니다.

■ colocation에서 동거하는 자원을 제약

colocation는 지정된 (여러) 자원이 동일 노드에서 시작하는 것에 대해 점수 값을 설정합니다.

colocation의 개요 대표적인 형식은 다음과 같습니다.

요약자원과 다른 자원이 동일한 노드에 존재하는 것에 대해 점수 값을 설정합니다.
서식colocation <제약의 ID> <점수 값> : <리소스 ID> : <역할> <리소스 ID> : <역할>] [<리소스 ID> : <역할>]] ...
설정 항목제약의 ID이 제약을 고유하게 식별하는 ID를 부여합니다. 영숫자 클러스터에서 고유 한 임의의 문자열을 지정합니다.
점수 값오른쪽에 기술 한 자원을 동거하는 것에 대한 점수 값을 지정합니다. 
일반적으로 INFINITY를 지정 동거를 강제 또는 -INFINITY을 지정 다른 노드에서 시작을 강제합니다.
리소스 ID제약의 대상이되는 자원을 자원 ID로 지정합니다. 
왼쪽의 자원 시작할 때 오른쪽 자원이 동일한 노드에 존재하는 것에 대해 점수 값을 설정합니다. 
리소스 ID를 기술하는 순서에 의미가 약간 변경에 유의하십시오. 
또한 ": <역할>"와 롤을 작성할 수 있습니다. 롤은 ms 명령으로 자원을 정의 할 때 필요한 개념입니다. Master와 Slave 등의 자원 상태를 말합니다. ms 명령은 이번 기사에서는 대상으로하고 있지 않기 때문에 자세한 설명은 생략합니다.

다음 부분은 그룹 grp의 시작시 clnResource가 동일한 노드에서 시작하는 (하고있는) 것을 강제하고 있습니다.

colocation rsc_colocation-1 INFINITY: grp clnResource

이제 다음이 読み解け했습니다.

  • 7. resource3 (clnResource)가 시작되지 않은 노드에서 resource1 및 resource2 (grp)가 시작되지 않습니다.


■ order 순서를 제약

order는 지정된 (여러) 자원의 액션을 실시하는 순서 에 대해 점수 값을 설정합니다.

order의 개요 대표적인 형식은 다음과 같습니다.

요약지정된 (여러) 자원의 액션을 실시하는 순서에 대해 점수 값을 설정합니다. 
액션은 시작, 승격 등이 포함됩니다.
서식order <제약의 ID> <점수 값> : <리소스 ID> : <액션> <리소스 ID> : <액션>] ... 
[symmetrical = true | false]
설정 항목제약의 ID이 제약을 고유하게 식별하는 ID를 부여합니다. 영숫자 클러스터에서 고유 한 임의의 문자열을 지정합니다.
점수 값이 제약에 대한 점수 값을 지정합니다. 
0보다 큰 값을 지정하면 왼쪽의 자원이 상태 변화하면 오른쪽의 리소스에 영향 (중지하거나 시작 실행)합니다 ( Mandatory Ordering ). 
0을 지정하면 왼쪽 자원의 액션 실행시 이외의 상태 변화가 오른쪽 자원에 영향을주지 않습니다. ( Advisory Ordering ) 
조금 어려운 표현되었습니다 만, 0과 INFINITY를 설정 한 경우 다음과 같은 이미지가된다고 이해하면 좋을 것입니다.

  • 0 : 가급적 왼쪽 → 오른쪽으로 <액션>하기
  • INFINITY : 절대 왼쪽 → 오른쪽으로 <액션>해야한다
리소스 ID제약의 대상이되는 자원을 자원 ID로 지정합니다. 
왼쪽의 자원 시작할 때 오른쪽 자원이 동일한 노드에 존재하는 것에 대해 점수 값을 설정합니다. 
리소스 ID를 기술하는 순서에 의미가 약간 변경에 유의하십시오.
액션액션은 대상이되는 자원을 시작 (start), 정지 (stop) 상승 (promote) 강등 (demote) 중 어느 것을 실행시 제한 여부를 지정합니다. 
지정하지 않으면 기본값은 start입니다. 
※ 승격 (promote) 및 강등 (demote)은 ms 명령으로 자원을 정의 할 때 필요한 개념입니다. ms 명령은 이번 기사에서는 대상으로하고 있지 않기 때문에 자세한 설명은 생략합니다.
symmetricalsymmetrical이 제한 역순 제약을 자동으로 설정할지 여부를 true (=) 또는 false (= 안)에서 지정합니다. 
예를 들어, "시작 A → B의 순서로 수행"이라는 제약에 대해 "정지는 B → A 순으로 진행할 것"이라고 반대의 제약을 자동으로 설정할 수 있습니다. 
지정하지 않으면 기본값은 true입니다.

다음 부분은 clnResource → grp의 순서로 시작하는 것을 보여줍니다. 
점수 값은 0이므로 시작 후 clnResource의 상태 변화는 grp에 영향을주지 않습니다. 
symmetrical을 false로하고 있기 때문에 정지 순서는 부정입니다.

### Resource Order ###
order rsc_order-1 0: clnResource grp symmetrical=false

이제 다음이 読み解け했습니다.

  • 5. resource1,2,3 자원은 반드시 resource3 (clnResource) → resource1 → resource2 순으로 시작합니다.




염려되는 분도 있을지도 모릅니다 만, 전회 소개 한 group 명령도 동거과 순서를 지정하는 것이 었습니다. 
예를 들어, "group grp1 resource1 resource2"는 "resource1과 2는 반드시 동거」, 「resource1 → resource2의 순서로 시작"을 정의합니다.

group은 colocation과 order를 조합하여 재현 할 수 있습니다.



다음 페이지에서 이번 찾은 것을 응용 한 실험을 해 봅시다.


■ 실험 1 colocation 점수 값을 -INFINITY에 보면

먼저 예의 CRM 설정 에서 Pacemaker를 시작합니다. 
다음과 같이 시작해야합니다.

# crm_mon -rfA
~略~

Online: [ pm01 pm02 ]

Full list of resources:

Resource Group: grp
    resource1 (ocf::heartbeat:Dummy): Started pm01
    resource2 (ocf::heartbeat:Dummy): Started pm01
Clone Set: clnResource
    Started: [ pm01 pm02 ]

Node Attributes:
* Node pm01:
    + pm02-eth1 : up
    + pm02-eth2 : up
* Node pm02:
    + pm01-eth1 : up
    + pm01-eth2 : up

Migration summary:
* Node pm01:
* Node pm02:

다음 클러스터를 가동시킨 채로 다음 명령 colocation 점수 값을 -INFINITY에 다시 씁니다. 
두 노드에서 실행해도 괜찮습니다.

# crm configure edit
→vi等のエディタが起動し、現在のCRM設定が編集可能になる。
 以下部分の「inf」を「-inf」に書き換える。

    colocation rsc_colocation-1 inf: grp clnResource
      ↓書き換え
    colocation rsc_colocation-1 -inf: grp clnResource

 書き換えたらエディタを保存終了する。(viの場合、Esc→:wq)

변경은 즉시 Pacemaker에 반영되어 아마 다음과 같이됩니다.

# crm_mon -rfA
~略~

Online: [ pm01 pm02 ]

Full list of resources:

 Resource Group: grp
     resource1  (ocf::heartbeat:Dummy): Stopped ★
     resource2  (ocf::heartbeat:Dummy): Stopped ★
 Clone Set: clnResource
     Started: [ pm01 pm02 ]

Node Attributes:
* Node pm01:
    + pm02-eth1                         : up
    + pm02-eth2                         : up
* Node pm02:
    + pm01-eth1                         : up
    + pm01-eth2                         : up

Migration summary:
* Node pm01:
* Node pm02:

★ 부분에서 resource1,2이 정지되었음을 알 수 있습니다.

이것은 grp (= resource1,2)와 clnResource (= resource3)의 colocation 점수 값을 -INFINITY에 다시 쓴 것으로, 
제약 "grp과 clnResource 절대로 다른 노드에서 시작한다 '는 의미 되었기 때문에 입니다. 
clnResource는 복제를위한 두 노드에서 시작하고 그대로는이 제약을 지킬 수 없기 때문에 grp을 중단 할 수밖에 없었습니다.

이 상태에서 clnResource을 중지하면 어떻게 될까요? 
다음 명령을 실행하십시오. 두 노드에서 실행해도 괜찮습니다.

# crm resource stop resource3

아마 다음과 같이되었다고 생각합니다.

# crm_mon -rfA
~略~
Online: [ pm01 pm02 ]

Full list of resources:

 Resource Group: grp
     resource1  (ocf::heartbeat:Dummy): Started pm01 ★
     resource2  (ocf::heartbeat:Dummy): Started pm01 ★
 Clone Set: clnResource
     Stopped: [ resource3:0 resource3:1 ] ☆

Node Attributes:
* Node pm01:
    + pm02-eth1                         : up
    + pm02-eth2                         : up
* Node pm02:
    + pm01-eth1                         : up
    + pm01-eth2                         : up

Migration summary:
* Node pm01:
* Node pm02:

☆ 부분에서 clnResource (resource3)가 정지하고 ★ 부분에서 정지했다 resource1,2가 시작되었는지 알 수 있습니다.

clnResource를 수동으로 중지함으로써 colocation 제약으로 억제되어 있던 resource1,2가 부팅 가능하게 된 것입니다.



■ 실험 2 order 점수 값을 INFINITY에 보면

order 점수 값에 0과 INFINITY를 설정하고 0과 INIFINITY의 의미의 차이를 확인합니다.

CRM 구성은 3 개의 Dummy 자원을 order에서 순서 제약을 건 그냥 단순한 것을 사용합니다.

### Cluster Option ###
property no-quorum-policy="ignore" \
    stonith-enabled="false" \
    crmd-transition-delay="2s"

### Resource Defaults ###
rsc_defaults resource-stickiness="INFINITY" \
    migration-threshold="1"

### Primitive Configuration ###
primitive resource1 ocf:heartbeat:Dummy \
    op start interval="0s" timeout="300s" on-fail="restart" \
    op monitor interval="10s" timeout="60s" on-fail="restart" \
    op stop interval="0s" timeout="300s" on-fail="block"

primitive resource2 ocf:heartbeat:Dummy \
    op start interval="0s" timeout="300s" on-fail="restart" \
    op monitor interval="10s" timeout="60s" on-fail="restart" \
    op stop interval="0s" timeout="300s" on-fail="block"

primitive resource3 ocf:heartbeat:Dummy \
    op start interval="0s" timeout="300s" on-fail="restart" \
    op monitor interval="10s" timeout="60s" on-fail="restart" \
    op stop interval="0s" timeout="300s" on-fail="block"

### Resource Order ###
order rsc_order-1 0: resource1 resource2 resource3

2016.3.24 수정 : 이전 기사에서는 order에 "symmetrical = false"를 부여하고있었습니다 만,이 경우 Pacemaker-1.1 계에서는 다음 실험에서는 0과 INFINITY 동작의 차이가 없어졌다 (본 0 의 경우와 같은) 때문에 "symmetrical = false"를 삭제했습니다.

또한 Dummy 자원 (/usr/lib/ocf/resource.d/heartbeat/Dummy)가 시작 타이밍 (문맥)을 알기 쉽게하기 위해 start시 1 초 sleep하도록 개조하고 있습니다.

또한 order 제약 밖에 쓸 수 없기 때문에 pm01와 pm02를 동시에 시작하면 각 자원이 흩어지게 거동이 어려워집니다. 따라서 우선 pm01을 시작, 설정을 읽어 모든 자원이 pm01에서 시작하고 pm02를 시작합니다.

# crm_mon -rfA
~略~

Online: [ pm01 pm02 ]

Full list of resources:

resource1       (ocf::heartbeat:Dummy): Started pm01
resource2       (ocf::heartbeat:Dummy): Started pm01
resource3       (ocf::heartbeat:Dummy): Started pm01

Node Attributes:
* Node pm01:
    + pm02-eth1                         : up
* Node pm02:
    + pm01-eth1                         : up

Migration summary:
* Node pm01:
* Node pm02:

다음 명령을 실행하여 resource1 장애를 유발합니다.

# rm -f /var/run/resource-agents/Dummy-resource1.state

Pacemaker가 고장을 감지하고 F / O를 수행합니다.

# crm_mon -rfA
~略~

Online: [ pm01 pm02 ]

Full list of resources:

resource1       (ocf::heartbeat:Dummy): Started pm02 ★F/Oし、pm02で起動
resource2       (ocf::heartbeat:Dummy): Started pm01
resource3       (ocf::heartbeat:Dummy): Started pm01

Node Attributes:
* Node pm01:
    + pm02-eth1                         : up
* Node pm02:
    + pm01-eth1                         : up

Migration summary:
* Node pm01:
   resource1: migration-threshold=1 fail-count=1
* Node pm02:

Failed actions:
    resource1_monitor_10000 (node=pm01, call=52, rc=7, status=complete): not running

고장 (파일 삭제)를 발생시킨 시간 이후의 로그를 grep하여 두 노드에서 자원이 어떤 행동을했는지를 확인하자. 
Pacemaker-1.0 계와 1.1 계에서 로그 형식이 다르기 때문에 다음 각각의 경우를 나타냅니다.

Pacemaker-1.0 계의 경우
○ pm01 로그

# egrep "lrmd:.*info: rsc:[A-Za-z0-9]+ (start|stop)" /var/log/ha-log
Jan  8 12:57:58 pm01 lrmd: [1518]: info: rsc:resource1 stop[53] (pid 4772)

○ PM02 の ロ グ

# egrep "lrmd:.*info: rsc:[A-Za-z0-9]+ (start|stop)" /var/log/ha-log
Jan  8 12:57:58 pm02 lrmd: [1492]: info: rsc:resource1 start[21] (pid 7667)

Pacemaker-1.1 계의 경우
○ pm01 로그

# egrep "Operation .*_(start|stop)_" /var/log/ha-log
Mar 24 10:29:51 pm01 crmd[25011]:  notice: process_lrm_event: Operation resource1_stop_0: ok (node=pm01, call=21, rc=0, cib-update=72, confirmed=true)

○ PM02 の ロ グ

# egrep "Operation .*_(start|stop)_" /var/log/ha-log
Mar 24 10:29:51 pm02 crmd[6357]:  notice: process_lrm_event: Operation resource1_start_0: ok (node=pm02, call=14, rc=0, cib-update=14, confirmed=true)

고장난 resource1가 pm01에서 정지 후 pm02에서 시작하고 F / O가 성공했음을 로그에서도 확인할 수있었습니다.



다음은 order 점수 값을 INFINITY로 변경하고 이전처럼 resource1 장애를 유발합니다.

order rsc_order-1 0: resource1 resource2 resource3

  ↓ 書 き 換 え

order rsc_order-1 INFINITY: resource1 resource2 resource3

고장 후 crm_mon는 다음과 같이 될 것입니다.

# crm_mon -rfA
~略~

Online: [ pm01 pm02 ]

Full list of resources:

resource1       (ocf::heartbeat:Dummy): Started pm02 ★F/Oし、pm02で起動
resource2       (ocf::heartbeat:Dummy): Started pm01
resource3       (ocf::heartbeat:Dummy): Started pm01

Node Attributes:
* Node pm01:
    + pm02-eth1                         : up
* Node pm02:
    + pm01-eth1                         : up

Migration summary:
* Node pm01:
   resource1: migration-threshold=1 fail-count=1
* Node pm02:

Failed actions:
    resource1_monitor_10000 (node=pm01, call=60, rc=7, status=complete): not running

점수 값이 0 일 때처럼 pm02에서 resource1가 시작 (F / O)했습니다. 
그러나 약간 거동이 조금 전과는 다른 것을 깨달았다 있을까요? 
crm_mon을 잘 ~보고 있던 사람은 발견 할 수도 있지만, 실은 resource2,3도 resource1 고장에 끌려 다시 시작했습니다.

로그 (/ var / log / ha-log)에서 resource1 ~ 3의 거동을 확인하려고합니다.

Pacemaker-1.0 계의 경우
○ pm01 로그

# egrep "lrmd:.*info: rsc:[:A-Za-z0-9]+ (start|stop)" /var/log/ha-log
Jan  8 13:19:02 pm01 lrmd: [1518]: info: rsc:resource3 stop[61] (pid 5848) ★
Jan  8 13:19:02 pm01 lrmd: [1518]: info: rsc:resource2 stop[62] (pid 5849) ★
Jan  8 13:19:02 pm01 lrmd: [1518]: info: rsc:resource1 stop[63] (pid 5850)
Jan  8 13:19:04 pm01 lrmd: [1518]: info: rsc:resource2 start[64] (pid 5859) ★
Jan  8 13:19:05 pm01 lrmd: [1518]: info: rsc:resource3 start[66] (pid 5869) ★

○ PM02 の ロ グ

# egrep "lrmd:.*info: rsc:[:A-Za-z0-9]+ (start|stop)" /var/log/ha-log
Jan  8 13:19:03 pm02 lrmd: [8126]: info: rsc:resource1 start[5] (pid 8154)

Pacemaker-1.1 계의 경우
○ pm01 로그

# egrep "Operation .*_(start|stop)_" /var/log/ha-log
Mar 24 10:33:11 pm01 crmd[25288]:  notice: process_lrm_event: Operation resource3_stop_0: ok ~略~ ★
Mar 24 10:33:13 pm01 crmd[25288]:  notice: process_lrm_event: Operation resource2_stop_0: ok ~略~ ★
Mar 24 10:33:15 pm01 crmd[25288]:  notice: process_lrm_event: Operation resource1_stop_0: ok ~略~
Mar 24 10:33:19 pm01 crmd[25288]:  notice: process_lrm_event: Operation resource2_start_0: ok ~略~ ★
Mar 24 10:33:21 pm01 crmd[25288]:  notice: process_lrm_event: Operation resource3_start_0: ok ~略~ ★

○ PM02 の ロ グ

# egrep "Operation .*_(start|stop)_" /var/log/ha-log
Mar 24 10:33:15 pm02 crmd[6453]:  notice: process_lrm_event: Operation resource1_start_0: ok (node=pm02, call=14, rc=0, cib-update=11, confirmed=true)

★ 부분에서 이전과는 달리 resource2,3도 정지 → 시작을하고 있는지 알 수 있습니다. 
각각 start 한 시간을 확인하면 resource1 → resource2 → resource3 순으로 시작한 것을 알 수 있습니다.

이것은 설정 한 order 제약이 
절대 (= INFINITY) resource1 → resource2 → resource3의 순서로 시작 / 중지해야한다" 
는 것이었다 때문에 고장에 의한 상태 변화에 따라 resource2 및 resource3를 중지 → 시작하는 거동이 때문입니다.

한편 점수 값이 0 인 경우의 order 제약 
"가급적 (= 0) resource1 → resource2 → resource3의 순서로 시작 / 중지 ' 
라는 것이며, 고장으로 인한 상태 변화는 resource2 및 resource3에 영향을주지 않았습니다.


■ 실험 3 속성 값을 평가하는

location 제약에서 속성 값을 평가 해 봅니다.

CRM 설정은 하나의 Dummy 리소스를 location으로 배치 조건을 건 그냥 단순한 것을 사용합니다.

### Cluster Option ###
property no-quorum-policy="ignore" \
    stonith-enabled="false" \
    crmd-transition-delay="2s"

### Resource Defaults ###
rsc_defaults resource-stickiness="INFINITY" \
    migration-threshold="1"

### Primitive Configuration ###
primitive resource1 ocf:heartbeat:Dummy \
    op start interval="0s" timeout="300s" on-fail="restart" \
    op monitor interval="10s" timeout="60s" on-fail="restart" \
    op stop interval="0s" timeout="300s" on-fail="block"

### Resource Location ###
location rsc_location-1 resource1 \
    rule -INFINITY: not_defined my_attribute or my_attribute lt 100

이를 Pacemaker에 반영합니다. 
하지만, 다음과 같이 resource1는 중지 된 상태가 될 것입니다 (★ 부분).

# crm_mon -rfA
~略~
Online: [ pm01 pm02 ]

Full list of resources:

resource1       (ocf::heartbeat:Dummy): Stopped ★resource1は停止したまま

Node Attributes:
* Node pm01:
    + pm02-eth1                         : up
    + pm02-eth2                         : up
* Node pm02:
    + pm01-eth1                         : up
    + pm01-eth2                         : up

Migration summary:
* Node pm01:
* Node pm02:

이것은 CRM 설정의 다음 부분에서 "my_attribute"라는 속성 값이 존재하지 않는 경우 또는 100 이하인 경우에는 시작할 수 없다고 제약하고 있기 때문입니다.

위치 rsc_location-1 리소스 1 \
    규칙 무한대 : not_defined my_attribute 또는 my_attribute LT (100)

resource1를 시작하려면 다음 crm_attribute 명령으로 속성 값을 수동으로 정의합니다. 
두 노드에서 실행해도 괜찮습니다. 
-N 옵션에서 속성 값을 생성하는 노드를 -n으로 속성 값 이름을 -v 값을 설정합니다. 
-l은 reboot 또는 forever 중 하나에서, reboot는 그 속성 값이 Pacemaker 정지로 속성치가 삭제되는 것을 나타냅니다. forever은 Pacemaker 종료 된 후에도 속성 값을 담고 있습니다.

# crm_attribute -N pm01 -n my_attribute -v 100 -l reboot

속성 값이 설정되면 resource1가 시작합니다.

# crm_mon -rfA
~略~

Online: [ pm01 pm02 ]

Full list of resources:

resource1       (ocf::heartbeat:Dummy): Started pm01 ★resource1が起動

Node Attributes:
* Node pm01:
    + my_attribute                      : 100 ★属性値が100で設定された
    + pm02-eth1                         : up
    + pm02-eth2                         : up
* Node pm02:
    + pm01-eth1                         : up
    + pm01-eth2                         : up

Migration summary:
* Node pm01:
* Node pm02:

속성 값의 값을 10으로 변경하려고합니다.

# crm_attribute -N pm01 -n my_attribute -v 10 -l reboot

resource1가 중지 생각합니다.

# crm_mon -rfA
~略~
Online: [ pm01 pm02 ]

Full list of resources:

resource1       (ocf::heartbeat:Dummy): Stopped ★resource1が停止

Node Attributes:
* Node pm01:
    + my_attribute                      : 10 ★属性値が10に変更
    + pm02-eth1                         : up
    + pm02-eth2                         : up
* Node pm02:
    + pm01-eth1                         : up
    + pm01-eth2                         : up

Migration summary:
* Node pm01:
* Node pm02:

또한, 실제로 본 실험과 같이 속성 값을 수동으로 설정하거나 변경하는 경우는 거의없고, NW 감시 (ocf : pacemaker : pingd)과 디스크 모니터링 (ocf : pacemaker : diskd)가 내부적으로 사용 하고 있습니다.




■ お わ り に

3 회에 걸친 "움직여 이해 Pacemaker - CRM 설정 편 ~」은 이번으로 끝입니다.

끝까지 읽어 주신 분은 예제 설정 파일 은 물론, 데모 환경의 CRM 설정 파일 도 읽을 수있게되어 있다고 생각합니다. 


'IBM PowerLinux > PaceMaker - Cluster' 카테고리의 다른 글

Pacemaker OVerview  (0) 2016.04.18
pacemaker  (0) 2016.04.16
페이스 메이커 overall  (0) 2016.04.13
클러스터 참고자료  (0) 2016.04.13
Fencing  (0) 2016.04.13



System exit to emegency shell at boot with multipath enabled (SLES12, MPIO)

This document (7015462) is provided subject to the disclaimer at the end of this document.
Environment

SUSE Linux Enterprise Server 12 (SLES 12)
Situation

During boot the system exits into the emergency shell with messages similar to

[ OK ] Listening on multipathd control socket.
Starting Device-Mapper Multipath Device Controller...
[ OK ] Listening on Device-mapper event daemon FIFOs.
Starting Device-mapper event daemon...
Expecting device dev-disk-by\x2duuid-34be48b2\x2dc21...32dd9.device...
Expecting device dev-sda2.device...
[ OK ] Listening on udev Kernel Socket.
[ OK ] Listening on udev Control Socket.
Starting udev Coldplug all Devices...
Expecting device dev-disk-by\x2duuid-1172afe0\x2d63c...5d0a7.device...
Expecting device dev-disk-by\x2duuid-c4a3d1de\x2d4dc...ef77d.device...
[ OK ] Started Create list of required static device nodes ...current kernel.
Starting Create static device nodes in /dev...
[ OK ] Started Collect Read-Ahead Data.
[ OK ] Started Device-mapper event daemon.
[ OK ] Started udev Coldplug all Devices.
Starting udev Wait for Complete Device Initialization...
[ OK ] Started Replay Read-Ahead Data.
Starting Load Kernel Modules...
Starting Remount Root and Kernel File Systems...
[ OK ] Started Create static devices
[ 13.682489] floppy0: no floppy controllers found
[* ] (1 of 4) A start job is running for dev-disk-by\x2du...(7s / 1min 30s)
[* ] (1 of 4) A start job is running for dev-disk-by\x2du...(7s / 1min 30s)

...

Timed out waiting for device dev-disk-by\x2duuid-c4a...cfef77d.device.
[DEPEND] Dependency failed for /opt.
[DEPEND] Dependency failed for Local File Systems.
[DEPEND] Dependency failed for Postfix Mail Transport Agent.
Welcome to emergency shell
Give root password for maintenance
(or press Control-D to continue):

this is the exit to the emergency shell


This issue is logical consequence of the multipath integration in systemd and occurs if the root filesystem is not on multipath but multipath is enabled.

In this setup multipath tries to setup its paths for all devices that are not blacklisted, as the device of the root filesystem is mounted already it is inaccessible making multipath fail.

Resolution

There are a number of ways to deal with this issue. The best and recommended way is to configure multipath correctly. This means that if root is not on multipath it should be blacklisted in /etc/multipath.conf

Issue for example

'multipath -v2'

and identify the device for the root filesystem. It will result in an output similar to:

Jul 29 10:10:03 | 3600508b1001030343841423043300400: ignoring map

The string between '| ' and ':' is the wwid, which should be added to /etc/multipath.conf as:

blacklist {
wwid "3600508b1001030343841423043300400"
}

Once this is added multipath will not try to access the wrong device, the non-multipathed Device for the root Filesystem during boot.

Another way of dealing with this would be to enable multipath in the initrd; re-run 'mkinitrd' and include the 'multipath' dracut module. Then the system will always come up multipathed, which is clearly not the intention if the root device is not multipathed.

As an immediate short term workaround one could disable multipath in the root filesystem

systemctl stop multipathd
systemctl stop multipathd.socket
systemctl disable multipathd

CAVEAT: Please keep in mind that this wwid is most likely local to the specific machine. As such

/etc/multipath.conf

should then be removed from syncing of configuration files between different machines. Which applies for example to csync2.
Change Log

2014-Aug-1 - Rolf Schmidt - Initial version

'IBM PowerLinux > SUSE' 카테고리의 다른 글

SUSE 12 root multipath  (0) 2017.08.20
SAP HANA system  (0) 2016.05.20
Storage Administration Guide  (0) 2016.05.19
multipath  (0) 2016.05.19

http://linoxide.com/storage/scandetect-luns-redhat-linux-outputs-remember/

+ Recent posts