RTFM

[Read This Fine Material] from Joshua Hoblitt

How to change the GPFS 3.5 “minimum release level”

| 0 comments

[root@foonsd3 ~]# mmlsconfig minReleaseLevel
minReleaseLevel 3.5.0.3  
[root@foonsd3 ~]# mmchconfig release=LATEST
Verifying that all nodes in the cluster are up-to-date ...
mmchconfig: Command successfully completed
mmchconfig: Propagating the cluster configuration data to all
  affected nodes.  This is an asynchronous process.
[root@foonsd3 ~]# mmlsconfig minReleaseLevel
minReleaseLevel 3.5.0.11  

How to demote a GPFS 3.5 server to a regular client

| 0 comments

Here is an example of demoting two GPFS servers named foonsd1 and foonsd2 into being regular GPFS clients. This means removing them from being part of cluster “quorum”, declaring that it is to be a client node (ie, can not be a token manager), designating new configuration servers, and changing the licensing terms for those nodes. Three new GPFS servers have already been added to the cluster so that at no point is quorum lost.

In order to change the quorum status of a node, GPFS must not be running.

# mmshutdown -N foonsd1,foonsd2
Sun Mar 23 14:20:38 MST 2014: mmshutdown: Starting force unmount of GPFS file systems
Sun Mar 23 14:20:43 MST 2014: mmshutdown: Shutting down GPFS daemons
foonsd2.example.org:  Shutting down!
foonsd1.example.org:  Shutting down!
foonsd2.example.org:  'shutdown' command about to kill process 3256
foonsd2.example.org:  Unloading modules from /lib/modules/2.6.32-431.5.1.el6.x86_64/extra
foonsd2.example.org:  Unloading module mmfs26
foonsd1.example.org:  'shutdown' command about to kill process 3242
foonsd1.example.org:  Unloading modules from /lib/modules/2.6.32-431.5.1.el6.x86_64/extra
foonsd1.example.org:  Unloading module mmfs26
foonsd2.example.org:  Unloading module mmfslinux
foonsd2.example.org:  Unloading module tracedev
foonsd1.example.org:  Unloading module mmfslinux
foonsd1.example.org:  Unloading module tracedev
Sun Mar 23 14:20:53 MST 2014: mmshutdown: Finished
# mmchnode --client --noquorum -N foonsd1,foonsd2
Sun Mar 23 14:21:04 MST 2014: mmchnode: Processing node foonsd1.example.org
Sun Mar 23 14:21:04 MST 2014: mmchnode: Processing node foonsd2.example.org
Verifying GPFS is stopped on all affected nodes ...
mmchnode: Propagating the cluster configuration data to all
  affected nodes.  This is an asynchronous process.
# mmlscluster 

GPFS cluster information
========================
  GPFS cluster name:         fooamcp.example.org
  GPFS cluster id:           10159024612008204251
  GPFS UID domain:           fooamcp.example.org
  Remote shell command:      /usr/bin/ssh
  Remote file copy command:  /usr/bin/scp

GPFS cluster configuration servers:
-----------------------------------
  Primary server:    foonsd1.example.org
  Secondary server:  foonsd2.example.org

 Node  Daemon node name      IP address     Admin node name       Designation
------------------------------------------------------------------------------
   1   foo01.example.org    140.252.27.21  foo01.example.org    
   2   foo02.example.org    140.252.27.22  foo02.example.org    
   3   foo03.example.org    140.252.27.23  foo03.example.org    
   4   foo04.example.org    140.252.27.24  foo04.example.org    
   5   foo05.example.org    140.252.27.25  foo05.example.org    
   7   foo07.example.org    140.252.27.27  foo07.example.org    
   8   foo08.example.org    140.252.27.28  foo08.example.org    
   9   foo09.example.org    140.252.27.29  foo09.example.org    
  10   foo10.example.org    140.252.27.30  foo10.example.org    
  11   foo11.example.org    140.252.27.31  foo11.example.org    
  12   foo12.example.org    140.252.27.32  foo12.example.org    
  13   foo13.example.org    140.252.27.33  foo13.example.org    
  14   foo14.example.org    140.252.27.17  foo14.example.org    
  15   foo15.example.org    140.252.27.18  foo15.example.org    
  16   foonsd1.example.org  140.252.27.15  foonsd1.example.org  
  17   foonsd2.example.org  140.252.27.16  foonsd2.example.org  
  18   foo06.example.org    140.252.27.26  foo06.example.org    
  19   foodb1.example.org   140.252.27.14  foodb1.example.org   
  20   foonsd5.example.org  140.252.27.36  foonsd5.example.org  quorum-manager
  21   foonsd3.example.org  140.252.27.34  foonsd3.example.org  quorum-manager
  22   foonsd4.example.org  140.252.27.35  foonsd4.example.org  quorum-manager

Continue Reading →

How to export/import a GPFS 3.5 filesystem

| 2 Comments

It is possible to move a complete GPFS filesystem between clusters with the mmexportfs and mmimportfs commands. I’ve found this useful for preparing a complete filesystem and populating it with data before shipping it to a remote site.

Preparing the mss3 filesystem to be exported/relocated to the another GPFS cluster attaching to the GPFS NSD server named bar1.example.com:

# mmlsdisk mss3
disk         driver   sector failure holds    holds                            storage
name         type       size   group metadata data  status        availability pool
------------ -------- ------ ------- -------- ----- ------------- ------------ ------------
bar1_nsd1   nsd         512       1 Yes      Yes   ready         up           system       
bar1_nsd2   nsd         512       1 Yes      Yes   ready         up           system       
bar1_nsd3   nsd         512       1 Yes      Yes   ready         up           system       
bar1_nsd4   nsd         512       1 Yes      Yes   ready         up           system       
# mmumount mss3 -a
Wed May 29 12:49:56 MST 2013: mmumount: Unmounting file systems ...
# mmexportfs mss3 -o mss3.gpfs

mmexportfs: Processing file system mss3 ...
mmexportfs: Propagating the cluster configuration data to all
  affected nodes.  This is an asynchronous process.
# scp mss3.gpfs bar1.example.com:.
mss3.gpfs                                     100% 3379     3.3KB/s   00:00  

Continue Reading →

Taking some of the pain out of the `cut` util

| 0 comments

cut is an incredibly use command but it can be frustrating to use on columar data with a variable number of spaces between columns. awk is often a better alternative in that case but, IMHO, it often feels more nature to use cut in a shell pipeline rather than a quoted onliner awk expression.

I recently stumbled across this trick (which I suspect I’ve discovered and forgotten more than once) of using tr to compress multi-space field seperators into a since character.

Consider this simple example of finding the ammount of free memory on the system:

$ free
             total       used       free     shared    buffers     cached
Mem:       7731688    5692336    2039352     396756     740020    2239136
-/+ buffers/cache:    2713180    5018508
Swap:      7733244          0    7733244
$ free | grep Mem: | cut -d ' ' -f4

$ free | grep Mem: | tr -s ' ' | cut -d ' ' -f4
2037816

Heartbleed bug/vulnerability checker site

| 0 comments

(If you haven’t heard about the heartbleed vulnerability yet you should consider to coming out of your pocket universe more often…)

In an amazingly short turn around time since the issue was publicly disclosed, Filippo Valsorda has put up a site called http://filippo.io/Heartbleed/ that will check URLs for the heartbleed bug/vulnerability. This has turned out to be handy this morning for catching several sites that had patched openssl package installed last night but the services hadn’t yet been restarted. Kudos to Filippo!

The scanner service in action:

Screenshot-Test your server for Heartbleed (CVE-2014-0160) - Mozilla Firefox

UPDATE:

The code for the site is on github https://github.com/FiloSottile/Heartbleed and is definitely worthy of being starred.