Tuesday, May 26, 2020

Finally - A Universal Backup Agent!


I was contacted by a representative of Spictera about their SPFS tool for Spectrum Protect. This product allows you to use a local mount on your Linux server as a place to save your backup or application dump that is a direct connection to the IBM Spectrum Protect backend storage. It uses Spectrum Protect API calls and allows you to implement versioning and retention policies just as you would normal file system backups or archives. This product can solve your issues with proprietary applications that IBM does not, and probably never will, support. Now you can backup your MongoDB or SAP HANA a lot easier by using the native backup process built into your application. Currently it only supports the following OS's.


Supported operating systems are:
  • CentOS 6 for x86_64
  • CentOS 7 for x86_64
  • CentOS 8 for x86_64
  • Debian 8 for x86_64
  • Debian 9 for x86_64
  • Red Hat 6 for x86_64, ppc64 be, s390x (zLinux)
  • Red Hat 7 for x86_64, ppc64 le, s390x (zLinux)
  • Red Hat 8 for x86_64, ppc64 le, s390x (zLinux)
  • SuSE 11 for x86_64, ppc64 be, s390x (zLinux)
  • SuSE 12 for x86_64, ppc64 le, s390x (zLinux)
  • SuSE 15 for x86_64, ppc64 le, s390x (zLinux)
  • Ubuntu 14.04 for x86_64, ppc64 le, s390x (zLinux)
  • Ubuntu 18.04 for x86_64, ppc64 le, s390x (zLinux)
I would assume if it support CentOS x86_64 you should have no trouble with it on Red Hat. I'll let Spictera confirm that though. I've provided a presentation on the product for your review.


Wednesday, May 13, 2020

HBA Info Script

I thought I would pass this script along for anyone needing a way to out HBA info on Linux in a nicely formatted table.

#!/bin/bash
echo "FC_HOST     |   PortID   |    WWN             | State      | Speed    "
echo "------------+------------+--------------------+------------+----------"
for hba in `ls -d /sys/class/fc_host/host*`;do
  FC_HOST=`basename $hba`
  PortID=`cat $hba/port_id`
  wwpn=`cat $hba/port_name`
  state=`cat $hba/port_state`
  speed=`cat $hba/speed`
  hba=`cat $hba/symbolic_name`
  echo "$FC_HOST| $PortID | $wwpn | $state| $speed" | awk 'BEGIN{OFS=FS="|"}{for(i=1;i<=NF;i++){$i=sprintf("%-12s",$i)};print}'
done #|sort -k3n,6
echo "------------+------------+--------------------+------------+----------"


The output looks like this


FC_HOST     |   PortID   |    WWN             | State      | Speed    
------------+------------+--------------------+------------+----------
host0       | 0xffffffff | 0x20003890a540876c | Linkdown   | unknown  
host11      | 0xffffffff | 0x20003890a540876d | Linkdown   | unknown  
host12      | 0x640000   | 0x100000109b1bbe00 | Online     | 32 Gbit  
host13      | 0xffffffff | 0x20003890a5803461 | Linkdown   | 40 Gbit  
host14      | 0xffffffff | 0x20003890a5803462 | Linkdown   | 40 Gbit  
host15      | 0x640000   | 0x100000109b1bbe01 | Online     | 32 Gbit  
host16      | 0x03eac0   | 0x100000109b1b9a77 | Online     | 16 Gbit  
host17      | 0x04eac0   | 0x100000109b1b9a78 | Online     | 16 Gbit  
------------+------------+--------------------+------------+----------

If you would like more detail I added a couple more columns to show make, model, firmware, and driver version. This is a fixed width column layout and the minimum column width can be adjusted for your needs.

#!/bin/bash
echo "FC_HOST         |   PortID       |    WWN             | State          | Speed          | Make           | Model          | Firmware       | Driver"
echo "----------------+----------------+--------------------+----------------+----------------+----------------+----------------+----------------+---------------"
for hba in `ls -d /sys/class/fc_host/host*`;do
  FC_HOST=`basename $hba`
  PortID=`cat $hba/port_id`
  wwpn=`cat $hba/port_name`
  state=`cat $hba/port_state`
  speed=`cat $hba/speed`
  hba=`cat $hba/symbolic_name`
  hba_make=`echo $hba | cut -f1 -d ' ' `
  hba_model=`echo $hba | cut -f2 -d ' ' `
  hba_fw=`echo $hba | cut -f3 -d ' ' `
  hba_driver=`echo $hba | cut -f4 -d ' ' `
  echo "$FC_HOST| $PortID | $wwpn | $state| $speed | $hba_make | $hba_model | $hba_fw | $hba_driver " | awk 'BEGIN{OFS=FS="|"}{for(i=1;i<=NF;i++){$i=sprintf("%-16s",$i)};print}'
done #|sort -k3n,6

echo "----------------+----------------+--------------------+----------------+----------------+----------------+----------------+----------------+---------------"

The output looks similar to this: