ha opensuse

20
HA-Cluster on OpenSUSE A workshop on OpenSUSE.asia Submit 2015 Presented by netman<[email protected]>

Upload: kenny-netman

Post on 07-Apr-2017

649 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Ha opensuse

HA-Cluster on OpenSUSE A workshop on OpenSUSE.asia Submit 2015

Presented bynetman<[email protected]>

Page 2: Ha opensuse

Netman➢臺灣酷學園 (Study-Area) 創辦人之一兼終身苦力成員➢自以推廣自由軟體及分享技術爲樂➢長年致力於 Linux 技術傳播

工作經歷➢住華科技 :工程師➢奇科電腦、巨匠電腦、聯成電腦 :講師➢網虎集團 :工程師➢洗碗工

證照➢LPIC 、 RHCE 、 NCLP

About Me ...

Page 3: Ha opensuse

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?

Page 4: Ha opensuse

Linux is NEVER down! ...

Why HA?

Page 5: Ha opensuse

Who knows ...

Page 6: Ha opensuse

Even like this?!

Page 7: Ha opensuse

➢ Increased availability➢ Improved performance➢ Low cost of operation➢ Scalability➢ Disaster recovery➢ Data protection➢ Server consolidation➢ Storage consolidation

Reasons ...

Page 8: Ha opensuse

So ...

HA is GOOOOOOOD for you!

Page 9: Ha opensuse

➢ Wide Range of Clustering ScenariosA/A, A/S, Local, Metro, GEO, ...

➢ Flexibilitymonitoring, management, automation

➢ Storage and Data Replication iSCSI, SAN, OCFS2, cLVM, DRBD, CTDB

➢ Support for Virtualized EnvironmentsXen, KVM

➢ Resource AgentsOCF Agents (Apache, IPv4, IPv6...)

➢ User-friendly Administration ToolsYast, Hawk, crm Shell

Key features ...

Page 10: Ha opensuse

Shared Storage

Page 11: Ha opensuse

➢ 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

Page 12: Ha opensuse

Process Flow

Page 13: Ha opensuse

➢ 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

Page 14: Ha opensuse

➢ Hawk➢ Web interface

➢ Redundant➢ Multi-Path➢ Bounding

➢ Time Synchronization➢ NTP

Notes ...

Page 15: Ha opensuse

the LAB

gw

ha1 ha2

Page 16: Ha opensuse
Page 17: Ha opensuse

➢ 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 ...

Page 18: Ha opensuse

➢ Check iscsi targetfdisk ­l

➢ Check sbd listsbd ­d /dev/XXX list

➢ Check ocfs2mounted.ocfs2 ­f

➢ Check csync2csync2 ­xv

➢ Start/Stop clustercrm cluster <start|stop>

➢ Show/Edit crm configurecrm configure <show|edit>

Troubleshooting ...

Page 19: Ha opensuse

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

Page 20: Ha opensuse