Showing posts with label ibm. Show all posts
Showing posts with label ibm. Show all posts

Tuesday, 12 November 2013

Handy TSM queries

#query act log for media errors
q act begind=-1 search="media error"

#note the vol with error and query it to get its status
q libv cir-g-lib f=d

#check the volume out
checkout libv checkl=no rem=bulk

#query configured schedules
query sched f=d

#Removing a node from backup
q node f=d
q filespace
del filespace  *           (this removes all backup data for node1)
del filespace   nametype=fsid            (fsid is an integer for filesystem id)
remove node

#Renaming a node
rename node node2 node3 (this renames the node, but it keeps all the data)
(you'll need to logon to node2/3 and edit the dsm.opt/dsm.sys file etc and restart the scheduler to rename it on that side too).

#List filespaces that have not been backed up in the last 10 days for node
SELECT node_name,filespace_name, filespace_type,DATE(backup_end) as DATE FROM filespaces WHERE -node_name='' and DAYS(current_date)-DAYS(backup_end)>10

#show backups for the last 7 days
q event * * begind=-7 begint=12:00 endd=today node=

#show last backup completion date/time
q file  f=d

#show last successful backup end times for node
select END_TIME from summary where activity='BACKUP' and SUCCESSFUL='YES' and ENTITY=''

Thursday, 5 July 2012

GPFS Highly Available (HA) SNMP monitoring configuration

The available/documented GPFS SNMP implementation (By IBM) is not designed to be highly available.
There is only one SNMP collector node at a time. If that node fails the SNMP monitoring does not fail over to any other node and thus complete loss of cluster monitoring/reporting.

This blog post offers a simple implementation of gpfs snmp monitoring failover. The failover scheme uses a callback mechanism triggered by a quorumNodeLeave event and the eventNode is its only parameter.

First create a folder to contain your callbacks (if you already have a location for your callbacks, use that instead)
Download/copy the following script into the callbacks location and make it executable.


Modify the script to indicate your available collector nodes by substituting "quorum" and "quorum_node_2" with the hostnames of your gpfs quorum nodes.

Note that in this case the callbacks location is /callback so you may have to modify the script accordingly.

Copy the modified script to all quorum nodes

Add the callback (run once from any quorum node);
mmaddcallback NodeDownCallback --command  /callback/snmp_collector_failover.sh --event quorumNodeLeave --parms %eventNode

if you want monitoring to be reverted back to the default prefered collector node after it comes back online, you may consider adding a node join callback;
mmaddcallback NodeJoinCallback --command  /callback/snmp_collector_failover.sh --event quorumNodeJoin --parms %eventNode