### Vorbereiten ###
Zum Install von GPFS
Die beiden GPFS Nodes müssen passwortlos miteinander und mit sich selbst via SSH kommunizieren können. Die im ersten Schritt erstellten SSH Keys pflanzen wir nun in die gegenseitigen authorized_keys files des andern Clusternodes.
node1# ssh node1 date
node1# ssh node2 date
node2# ssh node1 date
node2# ssh node2 date

Kurzer Test und Abnicken des Hostkeys in beide Richtungen.
Um in Zukunft Ruhe zu haben erstellen wir eine .hushlogin im Home.
touch $HOME/.hushlogin
### Cluster erstellen ###
Beispielhaft erstellen wir einen Cluster aus zwei Nodes.
Jetzt legen wir uns eine Nodelist an.
Also eine Liste in der die Clusternodes und deren Verwendung aufgeführt ist.
epgpfs01.server.lan:quorum
epgpfs02.server.lan:quorum
Jetzt das Command:
mmcrcluster -N /root/GPFS/nodelist -p epgpfs01 -s epgpfs02
root@gpfs01:~/GPFS-Files# mmcrcluster -N /root/GPFS-Files/nodelist -p gpfs01 -s gpfs02
mmcrcluster: Command successfully completed
mmcrcluster: Warning: Not all nodes have proper GPFS license designations.
Use the mmchlicense command to designate licenses as needed.
mmcrcluster: Propagating the cluster configuration data to all
affected nodes. This is an asynchronous process.
root@gpfs01:~/GPFS-Files#
Jetzt können wir checken ob der Cluster sauber gebaut wurde:
root@gpfs01:~/GPFS-Files# mmlscluster
===============================================================================
| Warning: |
| This cluster contains nodes that do not have a proper GPFS license |
| designation. This violates the terms of the GPFS licensing agreement. |
| Use the mmchlicense command and assign the appropriate GPFS licenses |
| to each of the nodes in the cluster. For more information about GPFS |
| license designation, see the Concepts, Planning, and Installation Guide. |
===============================================================================
GPFS cluster information
========================
GPFS cluster name: gpfs01
GPFS cluster id: 1300000000000000077
GPFS UID domain: gpfs01
Remote shell command: /usr/bin/rsh
Remote file copy command: /usr/bin/rcp
GPFS cluster configuration servers:
———————————–
Primary server: gpfs01
Secondary server: gpfs02
Node Daemon node name IP address Admin node name Designation
————————————————————————————–
1 gpfs01 10.30.4.229 gpfs01 quorum
2 gpfs02 10.30.4.230 gpfs02 quorum
root@gpfs01:~/GPFS-Files#
####################################
—> Unter den beiden Remotecommands (rsh & rcp) kann mittels -r “remote Shell” und -R “Remote File Copy” auch in die verschlüsselte Variante scp und ssh geändert werden – hier sollte man allerdings den kompletten Pfad angeben!
####################################
Weil wir natürlich eine Lizenz haben schalten wir den nervigen Banner aus.
root@gpfs01:~/GPFS-Files# mmchlicense server –accept -N gpfs01,gpfs02
The following nodes will be designated as possessing GPFS server licenses:
gpfs01
gpfs02
mmchlicense: Command successfully completed
mmchlicense: Propagating the cluster configuration data to all
affected nodes. This is an asynchronous process.
root@gpfs01:~/GPFS-Files#
### Cluster starten & Stoppen ###
Um den Cluster zu starten und zu stoppen benötigen wir drei Commands:
mmstartup
mmshutdown
mmgetstate
Ich denke die Commands sprechen für sich ;)
-a Gilt jeweils für ALLE
-N Gilt für einzelne Nodes oder eine Reihe von Nodes durch Commata getrennt
root@ep-gpfs01-data:~/GPFS-Files# mmgetstate -a
Node number Node name GPFS state
——————————————
1 gpfs01 down
2 gpfs02 down
root@gpfs01:~/GPFS-Files#
Starten:
root@gpfs01:~/GPFS-Files# mmstartup -a
Wed Jun 26 17:43:23 CEST 2013: mmstartup: Starting GPFS …
root@gpfs01:~/GPFS-Files#
Status:
root@gpfs01:~/GPFS-Files# mmgetstate -a
Node number Node name GPFS state
——————————————
1 gpfs01 active
2 gpfs02 active
root@gpfs01:~/GPFS-Files#
### NSD ###
Jetzt ist Zeit die NetworkSharedDisks zu bauen.
Dafür schneide ich mir aus dirct attached SAS Storage ein paar Disks zu je 450gb.
Die Disks liegen unter /dev/cciss
Wichtig: LIES MICH (falls eure NSDs nicht direkt in /dev/ liegen)
- c0d1
- c0d2
- c0d3
- c0d4
- c0d5
- c0d6
Da wir hier ein kleines Setup haben und auch nicht zwingend auf ausgelagerte Metadaten angewiesen sind lege ich diese auf den gleichen Disks ab.
Wie schon beim Clusterbau benötigen wir nun ein File, welches die NSDs und ihre Verwendung definiert.
#DiskName:ServerList::DiskUsage:FailureGroup:DesiredName:StoragePool
/dev/cciss/c0d1:::dataAndMetadata::nsd1:
/dev/cciss/c0d2:::dataAndMetadata::nsd2:
/dev/cciss/c0d3:::dataAndMetadata::nsd3:
/dev/cciss/c0d4:::dataAndMetadata::nsd4:
/dev/cciss/c0d5:::dataAndMetadata::nsd5:
/dev/cciss/c0d6:::dataAndMetadata::nsd6:
Jetzt können wir mittels des File unser NSDs erstellen.
Da im obigen File die zweite Spalte frei blieb sehen beide Clusternodes alle Disks.
root@gpfs01:~/GPFS-Files# mmcrnsd -F /root/GPFS-Files/NDSfile
mmcrnsd: Processing disk cciss/c0d1
mmcrnsd: Processing disk cciss/c0d2
mmcrnsd: Processing disk cciss/c0d3
mmcrnsd: Processing disk cciss/c0d4
mmcrnsd: Processing disk cciss/c0d5
mmcrnsd: Processing disk cciss/c0d6
mmcrnsd: Propagating the cluster configuration data to all
affected nodes. This is an asynchronous process.
root@gpfs01:~/GPFS-Files#
Ob das alles erfolgte prüfen wir mit mmlsnsd
root@gpfs01:~/GPFS-Files# mmlsnsd
File system Disk name NSD servers
—————————————————————————
(free disk) nsd1 (directly attached)
(free disk) nsd2 (directly attached)
(free disk) nsd3 (directly attached)
(free disk) nsd4 (directly attached)
(free disk) nsd5 (directly attached)
(free disk) nsd6 (directly attached)
root@gpfs01:~/GPFS-Files#
### Filesystem erstellen ###
Hier gibts jetzt einige Optionen, die aber super gut in der Manpage erklärt sind, daher nehm ich beispielhaft nur eine einfache Variante:
mmcrfs /GPFS fs1 -F /root/GPFS-Files/NSDfile -B 64k
Jetzt noch schnell mounten:
root@gpfs01:~# mmmount all -a
Mon Jul 1 10:23:55 CEST 2013: mmmount: Mounting file systems …
root@gpfs01:~#
Der Mount macht an sich keine großartigen Probleme, der df-h zeigt jetzt auf beiden Nodes ein Filesystem und im Endeffekt wars das dann schon =)