ha opensuse

Post on 07-Apr-2017

649 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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

Presented bynetman<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 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 ...

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

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

top related