How To find HBA Link on Linux (RHEL) or Solaris

To find out the HBA Link staus on Unix (Solaris) or Linux 5RHEL), run the following command:

On Linux (RHEL) system

Make sure you have systool utility installed on your system first

which systool

example:

# which systool
/usr/bin/systool

If it return an error, please install the package sysfsutils

yum install -y sysfsutils

Run the following command to see the HBA Link status

for list in `ls -ld /sys/class/fc_host/host[0-9]*/ |cut -d ‘/’ -f5`; do systool -c fc_host -v $list | egrep -e ‘path|fabric_name|node_name|port_name|port_state|port_type|speed’ ; done

example:

# for list in `ls -ld /sys/class/fc_host/host[0-9]*/ |cut -d ‘/’ -f5`; do systool -c fc_host -v $list | egrep -e ‘path|fabric_name|node_name|port_name|port_state|port_type|speed’ ; done
  Class Device path = “/sys/devices/pci0000:80/0000:80:01.0/0000:86:00.0/host3/fc_host/host3”
    fabric_name         = “0x0”
    node_name           = “0x20000090fa47a382”
    port_name           = “0x10000090fa47a382”
    port_state          = “Linkdown”
    port_type           = “Unknown”
    speed               = “unknown”
    supported_speeds    = “2 Gbit, 4 Gbit, 8 Gbit”
    Device path = “/sys/devices/pci0000:80/0000:80:01.0/0000:86:00.0/host3”
  Class Device path = “/sys/devices/pci0000:80/0000:80:03.0/0000:8b:00.0/host4/fc_host/host4”
    fabric_name         = “0x0”
    node_name           = “0x20000090fa47a6a5”
    port_name           = “0x10000090fa47a6a5”
    port_state          = “Linkdown”
    port_type           = “Unknown”
    speed               = “unknown”
    supported_speeds    = “2 Gbit, 4 Gbit, 8 Gbit”
    Device path = “/sys/devices/pci0000:80/0000:80:03.0/0000:8b:00.0/host4”
  Class Device path = “/sys/devices/pci0000:80/0000:80:07.0/0000:90:00.0/host5/fc_host/host5”
    fabric_name         = “0x1000000533beec13”
    node_name           = “0x20000090fa5284f4”
    port_name           = “0x10000090fa5284f4”
    port_state          = “Online”
    port_type           = “NPort (fabric via point-to-point)”
    speed               = “8 Gbit”
    supported_speeds    = “2 Gbit, 4 Gbit, 8 Gbit”
    Device path = “/sys/devices/pci0000:80/0000:80:07.0/0000:90:00.0/host5”
  Class Device path = “/sys/devices/pci0000:80/0000:80:07.0/0000:90:00.1/host6/fc_host/host6”
    fabric_name         = “0x1000000533bef762”
    node_name           = “0x20000090fa5284f5”
    port_name           = “0x10000090fa5284f5”
    port_state          = “Online”
    port_type           = “NPort (fabric via point-to-point)”
    speed               = “8 Gbit”
    supported_speeds    = “2 Gbit, 4 Gbit, 8 Gbit”
    Device path = “/sys/devices/pci0000:80/0000:80:07.0/0000:90:00.1/host6”

On Unix (Solaris) System

run the following command to see HBA Link status

fcinfo hba-port | egrep -e ‘OS|Type|State|Speed|WWN’

example:

# fcinfo hba-port | egrep -e ‘OS|Type|State|Speed|WWN’
HBA Port WWN: 2100001b329c54b5
        OS Device Name: /dev/cfg/c2
        FCode/BIOS Version:  BIOS: 2.02; fcode: 2.01; EFI: 2.00;
        Type: N-port
        State: online
        Supported Speeds: 1Gb 2Gb 4Gb
        Current Speed: 4Gb
        Node WWN: 2000001b329c54b5
HBA Port WWN: 2100001b329c92b4
        OS Device Name: /dev/cfg/c3
        FCode/BIOS Version:  BIOS: 2.02; fcode: 2.01; EFI: 2.00;
        Type: N-port
        State: online
        Supported Speeds: 1Gb 2Gb 4Gb
        Current Speed: 4Gb
        Node WWN: 2000001b329c92b4

You are Done!

How to merge compressed files under Linux/Unix/Windows

If you want to merge several compressed files into one file, do as follow:

Under Linux/Unix

cat “<filename1>” “<filename2>” “<filenamen>” > “<filename>”

example

# cat “NetBackup_7.1_CLIENTS_tar-gz.1of2” “NetBackup_7.1_CLIENTS_tar-gz.2of2” > “NetBackup_7.1_CLIENTS.tar.gz”
# ls -lrt
total 7867428
-rw-r–r–. 1 root root 1430244430 Dec  8 17:39 NetBackup_7.1_LinuxR_x86_64.tar.gz
-rw-r–r–. 1 root root 1866465280 Dec  8 17:43 NetBackup_7.1_CLIENTS_tar-gz.1of2
-rw-r–r–. 1 root root 1446523985 Dec  8 17:43 NetBackup_7.1_CLIENTS_tar-gz.2of2
-rw-r–r–. 1 root root 3312989265 Feb 22 12:26 NetBackup_7.1_CLIENTS.tar.gz
# file NetBackup_7.1_CLIENTS.tar.gz
NetBackup_7.1_CLIENTS.tar.gz: gzip compressed data, was “NetBackup_7.1_CLIENTS.tar”, from Unix, last modified: Mon Feb 14 19:44:10 2011

Under Windows

copy /B  “<filename1>” +  “<filename2>” + “<filenamen>” “<filename>”

or

copy /B  “<filename1>” +  “<filename2>” + “<filenamen>” PATH:\”<filename>”

example

F:\Symantec\NetBackup\7.1\Pkgs>copy /B “NetBackup_7.1_Win_zip.1of2” + “NetBackup_7.1_Win_zip.2of2” “Netbackup_7.1.zip”
NetBackup_7.1_Win_zip.1of2
NetBackup_7.1_Win_zip.2of2
        1 file(s) copied.

or

F:\Symantec\NetBackup\7.1\Pkgs>copy /B “NetBackup_7.1_Win_zip.1of2” + “NetBackup_7.1_Win_zip.2of2″ d:\”NetBackup_7_1.zip”
NetBackup_7.1_Win_zip.1of2
NetBackup_7.1_Win_zip.2of2
        1 file(s) copied.

 

You’re done!

Comments Off on How to merge compressed files under Linux/Unix/Windows Posted in ALL, System