Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma...

44
Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità Cluster storage in alta affidabilità con GNU/Linux In particolare... Pacemaker DRBD iSCSI RFC 3720 RFC 3720

Transcript of Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma...

Page 1: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Cluster storage in alta affidabilità con GNU/Linux

In particolare...

Pacemaker

DRBD

iSCSI RFC 3720RFC 3720

Page 2: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Obiettivi

● Illustrare e dimostrare come Linux possa diventare un sistema operativo affidabile per garantire la continuità di un servizio a basso costo e alla portata di tutti.

● Implementare una SAN in HA su piattaforma GNU/Linux attraverso la realizzazione di un cluster “fault tollerance”

Page 3: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Percorso

● Concetti preliminari su dispositivi di memorizzazione non volatile (storage)

● Concetti preliminari su infrastrutture “cluster”● Illustrazione elementi del progetto● Sviluppo e procedura di esecuzione (in laboratorio)

Page 4: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

STORAGE – definizione

● Storage – Sono dispositivi ed infrastrutture hardware, per la memorizzazione, non volatile di dati.

Page 5: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

STORAGE - tipologie● DAS – Direct Attached Storage

● IDE

● SCSI

● SATA

● NAS - Network Attached Storage● Solitamente vengono implementati grazie

all'utilizzo di un S.O. che gestisce lo storage di tipo tradizionale con maggiore efficienza e specificità. (Freenas, Openfiler, Lacie-NASOS2, Synology ecc. ). Gestisce partizionamento e filesystem.

Page 6: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

STORAGE - tipologie● SAN – Storage Area Network

● Le SAN sono molto più scalabili e possono raggiungere capacità dell'ordine di decine o centinaia di Terabyte

● Dispongono di hardware più performante

● Composizione variegata di dispositivi (Storage dedicati, FcoE, Tape, Autoloader, NAS ecc.)

Page 7: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

STORAGE - Esempio di SAN

Page 8: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

STORAGE - logica

Page 9: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Controller RAID

Host

UPSG.E.

switchswitch

Bonding

Situazione base

Abbiamo ridotto ma non eliminato i SPOFSingle Point Of Failure

CLUSTER - premessa

Page 10: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Controller RAID

Host 2

UPS

G.E.

switch

Controller RAID

Host 1

switch

Bonding Bonding

CLUSTER - premessa

Page 11: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Finalmente abbiamo eliminato tutti gli SPOF possibili, ma ora è necessario trovare un sistema che ci permette di far dialogare e di gestire i due nodi come fossero una sola entità:

Un “CLUSTER”Cluster (grappolo) – In informatica è un insieme di computer connessi tra di loro e che cooperano al raggiungimento di un unico scopo.

CLUSTER - definizione

Page 12: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

CLUSTER - tipologie● Fault tollerance – HA (hight availability)

● Tolleranza ai guasti. Dove tutto è ridondante!

● Non ci devono essere SPOF.

● Load Balancing

● Non è necessaria la ridondanza dei dispositivi

● È necessario software specifico per la gestione del carico

● HPC (High performance computing)

● Calcolo parallelo per raggiungere prestazioni nell'ordine dei PetaFLOPS

● Supercomputer (www.top500.org)

● Ambito universitario e ricerca scientifica

Page 13: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

CLUSTER - complicazioni● Split brain

● Si verifica in genere su cluster con due nodi

● L'heartbeat si interrompe ed entrambi vogliono diventare DC

● Soluzione: STONITH (shoot the other node in the head) Dispositivi di “fence”.

● Quorum

● Spanning tree

● Si tratta di un protocollo che permette di abbattere una porta di uno switch quando “sente” un loop.

● Non tutti gli switch implementano questa funzione.

Page 14: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Elementi del progetto● DRBD – Distributed Redoundant Block Device

● Distribuito da LINBIT con GPL2

● www.drbd.org

● Pacemaker – Evoluzione di Linux-HA● Comunità di sviluppatori in tutto il mondo

● www.clusterlabs.org

● ISCSI - RFC 3720 Request For CommentRFC 3720 Request For Comment● http://www.internetsociety.org/ http://www.internetsociety.org/

● http://www.rfc-editor.org/rfcxx00.html#Historichttp://www.rfc-editor.org/rfcxx00.html#Historic

● http://www.ietf.org/http://www.ietf.org/

Page 15: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

DRBD – lo schema

Page 16: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Mirroring

host

host

Page 17: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Struttura DRBD

yy

Page 18: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

PACEMAKERCluster fault tollerance

● Messaging

Gestore della connettività

Heartbeat, OpenAIS/Corosync

● CRM – Cluster Resource Manager

Gestore delle risorse e dei processi

PACEMAKER, CONGA(RHEL)

Page 19: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Pacemaker – la suite!

● Cluster Resource Manager: ha visibilita' su tutti i nodi del cluster

● Local resource Manager: esegue su un nodo le indicazioni del CRM

● Resource agents: Le entita' che gestiscono le risorse

● Messaging & Membership: La parte che si occupa di fare parlare fra di loro i nodi di un

cluster(heartbeat o corosync)

Page 20: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Situazioni possibili

Page 21: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Pacemaker – i componenti● CRMD – demone. Gira su ogni

nodo ma solo uno viene eletto come cabina di regia (Designated Coordinator)

● PE o Policy Engine, calcola lo stato ideale del cluster e fornisce le direttive al DC

● CIB o Cluster Information Base, è un file XML contenente la configurazione e lo stato attuale del cluster. E’ presente ed uguale su tutti i nodi

● STONITHd o Shoot The Other Node In The Head, arresta i nodi 'erranti' (fence)

Page 22: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

CLUSTER - risorse

● Web server (Apache)● Mail server (xmail, postfix ecc.)● Database (mysql, postgrsql, oracol ecc.)● Filesystem (nfs, gfs2, clvmd ecc.)● ISCSI (target e lun)● Dispositivi a blocchi (DRBD)

Page 23: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

CLUSTER – altre note● RHEL richiede CMAN per la gestione specifica

di CLVM e GFS2 (propietari).. cosa che corosync e heartbeat non fanno o lo fanno attraverso la gestione del servizio. Invece CMAN si inserisce nel kernel attraverso patch. Questo gli permette di operare in modo molto più efficace.

● Si inserisce tra lo strato di messaging e di management

● E' un plugin e richiede il file di configurazione

/etc/cluster/cluster.conf

Page 24: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

CLUSTER – altre note

Page 25: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

ISCSI - RFC 3720RFC 3720

Page 26: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

ISCSI – esempio reale

Page 27: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

SCHEMA FINALE

Page 28: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

ESECUZIONE DEL PROGETTO● Installazione S.O. -GNU/Linux CentOS 6.4

● Configurazione S.O.

● Rete

● Sicurezza

● Predisposizione repository● Installazione Pacchetti

● Configurazione software

● Drbd

● Corosync

● Pacemaker

● LCMC (gui)

Page 29: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Riferimenti e ringraziamenti

● http://www.miamammausalinux.orghttp://www.miamammausalinux.org● http://www.rfc-editor.org/rfcxx00.html#Historic http://www.rfc-editor.org/rfcxx00.html#Historic ● http://www.clusterlabshttp://www.clusterlabs● http://www.linux-ha.orghttp://www.linux-ha.org● http://www.drbd.orghttp://www.drbd.org● http://www.ietf.org/http://www.ietf.org/

Page 30: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Installazione S.O.

Page 31: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Configurazione S.O.

● Rete● Cluster – configurazione cross

● Lan

● Partizionamento● Fdisk /devx

Page 32: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Configurazione S.O.

● Sicurezza● Firewall – iptables

● Openssh

● hosts

Page 33: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Configurazione S.O.

● Predisposizione “media”● Vi /etc/yum.repos.d/CentOS-Base.repo

● VI /etc/yum.repos.d/CentOS-Media.repo

● Mkdir /media/CentOS

Page 34: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Installazione pacchetti

● Yum install openssh-clients● Yum install corosync pacemaker● Yum install scsi-target-utils

aggiuntivi● Yum install crmsh......rpm● Yum install drbd......rpm

Page 35: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Configurazione DRBD 1/4#vi /etc/drbd.d/global_common.confglobal { usage-count yes; # minor-count dialog-refresh disable-ip-verification }

common { handlers { pri-on-incon-degr "/usr/lib/drbd/notify-pri-on-incon-degr.sh; /u sr/lib/drbd/notify-emergency-reboot.sh; echo b > /proc/sysrq-trigger ; reboot -f"; pri-lost-after-sb "/usr/lib/drbd/notify-pri-lost-after-sb.sh; /usr/lib/drbd/notify-emergency-reboot.sh; echo b > /proc/sysrq-trigger ; reboot -f"; local-io-error "/usr/lib/drbd/notify-io-error.sh; /usr/lib/drbd/notify-emergency-shutdown.sh; echo o > /proc/sysrq-trigger ; halt -f"; #fence-peer "/usr/lib/drbd/crm-fence-peer.sh"; # split-brain "/usr/lib/drbd/notify-split-brain.sh root"; # out-of-sync "/usr/lib/drbd/notify-out-of-sync.sh root"; # before-resync-target "/usr/lib/drbd/snapshot-resync-target-lvm.sh -p 15 -- -c 16k"; #after-resync-target /usr/lib/drbd/unsnapshot-resync-target-lvm.sh; ###fence-peer /sbin/obliterate-peer.sh; }

Page 36: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Configurazione DRBD 2/4

startup { wfc-timeout 10; degr-wfc-timeout 120; #become-primary-on both; #outdated-wfc-timeout wait-after-sb }

options { # cpu-mask on-no-data-accessible }

disk { #fencing resource-and-stonith; # size max-bio-bvecs on-io-error fencing disk-barrier disk-flushes # disk-drain md-flushes resync-rate resync-after al-extents # c-plan-ahead c-delay-target c-fill-target c-max-rate # c-min-rate disk-timeout } protocol C;

Page 37: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Configurazione DRBD 3/4

net { # protocol timeout max-epoch-size max-buffers unplug-watermark # connect-int ping-int sndbuf-size rcvbuf-size ko-count allow-two-primaries; #cram-hmac-alg shared-secret after-sb-0pri discard-zero-changes; after-sb-1pri discard-secondary; after-sb-2pri disconnect; #always-asbp rr-conflict # ping-timeout data-integrity-alg tcp-cork on-congestion # congestion-fill congestion-extents csums-alg verify-alg # use-rle } }

Page 38: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Configurazione DRBD 4/4 [ALL]#vi /etc/drbd.d/risorsa1.res deve essere lo stesso nome file su ogni nodo !!! resource hd1 { deve essere lo stesso nome su ogni nodo !!!

device /dev/vda4; può essere diverso per ogni nodo disk /dev/drbd0; deve essere lo stesso su ogni nodo !!! Meta-disk internal;

on cc1 { address 192.168.2.75:7788; rete peer to peer (cavo cross) }

on cc2 { address 192.168.2.75:7788; le porte devono essere le stesse sui nodi } }

[ALL]#drbdadm create-md hd1 [ALL]#service drbd reload [ONE]#drbdadm -- --overwrite-data-of-pper primary hd1 [ALL]#service drbd status

Page 39: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Configurazione Corosync [ALL]#vi /etc/corosync/corosunc.conf.example /etc/corosync/corosync.conf [ALL]#vi /etc/corosync/corosync.conf

amf { deve essere lo stesso nome su ogni nodo !!! mode: disabled } logging { to_stderr: no debug: off timestamop: on to_syslog: yes to_file: no syslog_facility: daemon }

totem { version: 2 token: 3000 secauth: on token_retransmits_before_loss_const: 10 join: 60 consensus: 4000

Page 40: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Configurazione Corosync

[ALL]#vi /etc/corosync/corosunc.conf.example /etc/corosync/corosync.conf [ALL]#vi /etc/corosync/corosync.conf

# Please read the corosync.conf.5 manual pagecompatibility: whitetank

totem { version: 2 secauth: off threads: 0 interface { ringnumber: 0 bindnetaddr: 192.168.122.1 mcastaddr: 226.94.1.1 mcastport: 5405 ttl: 1 }}

Page 41: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Configurazione Corosync logging { fileline: off to_stderr: no to_logfile: yes to_syslog: yes logfile: /var/log/cluster/corosync.log debug: off timestamp: on logger_subsys { subsys: AMF debug: off }}amf { mode: disabled}service { name: pacemaker ver: 1}

[ALL]#service corosync start [ALL]#service pacemaker start

Page 42: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Configurazione pacemaker

[ONE]#crm configure property stonith-enabled="false"

[ONE]#crm configure property no-quorum-policy="ignore"

[ONE]#crm configure property default-resource-stickiness=INFINITY

CONFIGURAZIONE RISORSE

[ONE]#crm configure primitive ping ocf:pacemaker:ping params host_list="192.168.1.33" name="ping" op monitor interval="10s" timeout="60s" op start interval="0" timeout="60s" op stop interval="0" timeout="60s"

[ONE]#crm configure clone c_ping ping meta globally-unique="false"

[ONE]#crm configure primitive p_ip_web ocf:heartbeat:IPaddr2 \ params ip="192.168.100.200" nic="virbr0" \ op monitor interval="10s" timeout="20s" \ op start interval="0" timeout="20s" \ op stop interval="0" timeout="20s"

Page 43: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Configurazione pacemaker [ONE]#crm configure primitive p_tgt_web ocf:heartbeat:iSCSITarget \ params iqn="web" tid="1" \ op monitor interval="60s"

[ONE]#crm configure primitive p_lun_web ocf:heartbeat:iSCSILogicalUnit \ params target_iqn="web" lun="1" path="/dev/drbd0" \ op monitor interval="10"

[ONE]#crm configure group g_web p_tgt_web p_lun_web p_ip_web

---E' necessario indicare al cluster che il gruppo appena creato deve obbligatoriamente risiedere sul nodo che ha la connessione con il seguente comando:

#crm configure location l_web g_web rule -inf: not_defined ping or ping lte 0

Et voilà!

Page 44: Cluster storage in alta affidabilità con GNU/Linux · Implementare una SAN in HA su piattaforma ... # protocol timeout max-epoch-size max-buffers unplug-watermark ... syslog_facility:

Reggio Emilia - Linux Day 2014 – Stefano Strozzi – Cluster Storage in alta affidabilità

Consiglio

● Ci sono tante variabili e tante possibilità di errore ma anche di soluzione.

● Prima di mettere in produzione un sistema provate provate provate!!