HA-Cluster on OpenSUSE
A workshop on OpenSUSE.asia Submit 2015
Presented by
netman<netman@study-area.org>
Netman
➢臺灣酷學園 (Study-Area) 創辦人之一兼終身苦力成員
➢自以推廣自由軟體及分享技術爲樂
➢長年致力於 Linux 技術傳播
工作經歷
➢住華科技 : 工程師
➢奇科電腦、巨匠電腦、聯成電腦 : 講師
➢網虎集團 : 工程師
➢洗碗工
證照
➢LPIC 、 RHCE 、 NCLP
About Me ...
High Availability
➢Elimination of single points of failure.(redundancy)
➢Reliable crossover. (multithreaded)
➢Detection of failures as they occur. (never see a
failure)
Ref: Wikipedia, the free encyclopedia
What is a HA Cluster?
Linux is NEVER down! ...
Why HA?
Who knows ...
Even like this?!
➢ Increased availability
➢ Improved performance
➢ Low cost of operation
➢ Scalability
➢ Disaster recovery
➢ Data protection
➢ Server consolidation
➢ Storage consolidation
Reasons ...
So ...
HA is GOOOOOOOD for you!
➢ Wide Range of Clustering Scenarios
A/A, A/S, Local, Metro, GEO, ...
➢ Flexibility
monitoring, management, automation
➢ Storage and Data Replication
iSCSI, SAN, OCFS2, cLVM, DRBD, CTDB
➢ Support for Virtualized Environments
Xen, KVM
➢ Resource Agents
OCF Agents (Apache, IPv4, IPv6...)
➢ User-friendly Administration Tools
Yast, Hawk, crm Shell
Key features ...
Shared Storage
➢ Messaging and Infrastructure Layer
➢ Corosync / Heart-beat
➢ Resource Allocation Layer
➢ Cluster Resource Manager (CRM)
➢ Cluster Information Base (CIB)
➢ Designated Coordinator (DC)
➢ Policy Engine (PE)
➢ Local Resource Manager (LRM)
➢ Resource Layer
➢ Resource Agents (RA)
➢ Programs(Shell Scripts)
Architecture
Process Flow
➢ Purpose
➢ to power off nodes to protect shared data or complete
resource recovery
➢ Classes
➢ Resource Level
➢ Node Level
➢ STONITH
➢ Shoot The Other Node In The Head
➢ H/W & S/W Solutions
➢ PDU, UPS, Blade Power, Lights-out Devices, etc.
➢ SBD, kdumpcheck, ssh, etc.
Fencing
➢ Hawk
➢ Web interface
➢ Redundant
➢ Multi-Path
➢ Bounding
➢ Time Synchronization
➢ NTP
Notes ...
the LAB
gw
ha1 ha2
➢ Use raw device.
➢ Use Disk ID(/dev/disk/by­id/xxxxxx)
➢ ISCSI IQN must be unique.
➢ Incoming Authentication should be enough.
➢ Load softdog module on boot.
➢ Run mkfs.ocfs2 with stack and cluster names
first. (mkfs.ocfs2 --cluster-stack=pcmk --cluster-name=hacluser
/dev/disk/by-id/XXXXXX ; mounted.ocfs2 -t)
➢ Run csync2 ­xv before service cluster setup.
➢ Use CIDR mask format in Hawk.
➢ Put resources into groups & clones.
Tips ...
➢ Check iscsi target
fdisk ­l
➢ Check sbd list
sbd ­d /dev/XXX list
➢ Check ocfs2
mounted.ocfs2 ­f
➢ Check csync2
csync2 ­xv
➢ Start/Stop cluster
crm cluster <start|stop>
➢ Show/Edit crm configure
crm configure <show|edit>
Troubleshooting ...
References ...
➢ SUSE Linux Enterprise High Availability
Extension 12
➢ https://www.suse.com/documentation/sle-ha-12/
➢ SDB Wiki
➢ http://www.linux-ha.org/wiki/SBD_Fencing
➢ Hawk Wiki
➢ http://clusterlabs.org/wiki/Hawk
Ha opensuse

Ha opensuse

  • 1.
    HA-Cluster on OpenSUSE Aworkshop on OpenSUSE.asia Submit 2015 Presented by netman<netman@study-area.org>
  • 2.
    Netman ➢臺灣酷學園 (Study-Area) 創辦人之一兼終身苦力成員 ➢自以推廣自由軟體及分享技術爲樂 ➢長年致力於Linux 技術傳播 工作經歷 ➢住華科技 : 工程師 ➢奇科電腦、巨匠電腦、聯成電腦 : 講師 ➢網虎集團 : 工程師 ➢洗碗工 證照 ➢LPIC 、 RHCE 、 NCLP About Me ...
  • 3.
    High Availability ➢Elimination ofsingle points of failure.(redundancy) ➢Reliable crossover. (multithreaded) ➢Detection of failures as they occur. (never see a failure) Ref: Wikipedia, the free encyclopedia What is a HA Cluster?
  • 4.
    Linux is NEVERdown! ... Why HA?
  • 5.
  • 6.
  • 7.
    ➢ Increased availability ➢Improved performance ➢ Low cost of operation ➢ Scalability ➢ Disaster recovery ➢ Data protection ➢ Server consolidation ➢ Storage consolidation Reasons ...
  • 8.
    So ... HA isGOOOOOOOD for you!
  • 9.
    ➢ Wide Rangeof Clustering Scenarios A/A, A/S, Local, Metro, GEO, ... ➢ Flexibility monitoring, management, automation ➢ Storage and Data Replication iSCSI, SAN, OCFS2, cLVM, DRBD, CTDB ➢ Support for Virtualized Environments Xen, KVM ➢ Resource Agents OCF Agents (Apache, IPv4, IPv6...) ➢ User-friendly Administration Tools Yast, Hawk, crm Shell Key features ...
  • 10.
  • 11.
    ➢ Messaging andInfrastructure Layer ➢ Corosync / Heart-beat ➢ Resource Allocation Layer ➢ Cluster Resource Manager (CRM) ➢ Cluster Information Base (CIB) ➢ Designated Coordinator (DC) ➢ Policy Engine (PE) ➢ Local Resource Manager (LRM) ➢ Resource Layer ➢ Resource Agents (RA) ➢ Programs(Shell Scripts) Architecture
  • 12.
  • 13.
    ➢ Purpose ➢ topower off nodes to protect shared data or complete resource recovery ➢ Classes ➢ Resource Level ➢ Node Level ➢ STONITH ➢ Shoot The Other Node In The Head ➢ H/W & S/W Solutions ➢ PDU, UPS, Blade Power, Lights-out Devices, etc. ➢ SBD, kdumpcheck, ssh, etc. Fencing
  • 14.
    ➢ Hawk ➢ Webinterface ➢ Redundant ➢ Multi-Path ➢ Bounding ➢ Time Synchronization ➢ NTP Notes ...
  • 15.
  • 17.
    ➢ Use rawdevice. ➢ Use Disk ID(/dev/disk/by­id/xxxxxx) ➢ ISCSI IQN must be unique. ➢ Incoming Authentication should be enough. ➢ Load softdog module on boot. ➢ Run mkfs.ocfs2 with stack and cluster names first. (mkfs.ocfs2 --cluster-stack=pcmk --cluster-name=hacluser /dev/disk/by-id/XXXXXX ; mounted.ocfs2 -t) ➢ Run csync2 ­xv before service cluster setup. ➢ Use CIDR mask format in Hawk. ➢ Put resources into groups & clones. Tips ...
  • 18.
    ➢ Check iscsitarget fdisk ­l ➢ Check sbd list sbd ­d /dev/XXX list ➢ Check ocfs2 mounted.ocfs2 ­f ➢ Check csync2 csync2 ­xv ➢ Start/Stop cluster crm cluster <start|stop> ➢ Show/Edit crm configure crm configure <show|edit> Troubleshooting ...
  • 19.
    References ... ➢ SUSELinux Enterprise High Availability Extension 12 ➢ https://www.suse.com/documentation/sle-ha-12/ ➢ SDB Wiki ➢ http://www.linux-ha.org/wiki/SBD_Fencing ➢ Hawk Wiki ➢ http://clusterlabs.org/wiki/Hawk