Advertisements

Tag Archives: systool

Linux Fibre HBA in status Linkdown

root@linux:~ # systool -c fc_host -v
Class = “fc_host”

Class Device = “host1”
Class Device path = “/sys/class/fc_host/host1”
fabric_name = “0x100000051e36219e”
issue_lip =
node_name = “0x50060b0000c29e39”
port_id = “0x1ebe01”
port_name = “0x50060b0000c29e38”
port_state = “Online”
port_type = “NPort (fabric via point-to-point)”
speed = “4 Gbit”
supported_classes = “Class 3”
supported_speeds = “1 Gbit, 2 Gbit, 4 Gbit”
symbolic_name = “QMH2462 FW:v5.06.03 DVR:v8.03.07.15.05.09-k”
system_hostname = “”
tgtid_bind_type = “wwpn (World Wide Port Name)”
uevent =

Device = “host1”
Device path = “/sys/devices/pci0000:00/0000:00:09.0/0000:09:00.0/host1”
fw_dump =
nvram = “ISP ”
optrom_ctl =
optrom =
reset =
uevent =
vpd = “▒8”

Class Device = “host2”
Class Device path = “/sys/class/fc_host/host2”
fabric_name = “0x50060b0000c29e3b”
issue_lip =
node_name = “0x50060b0000c29e3b”
port_id = “0x000000”
port_name = “0x50060b0000c29e3a”
port_state = “Linkdown
port_type = “Unknown
speed = “unknown
supported_classes = “Class 3”
supported_speeds = “1 Gbit, 2 Gbit, 4 Gbit”
symbolic_name = “QMH2462 FW:v5.06.03 DVR:v8.03.07.15.05.09-k”
system_hostname = “”
tgtid_bind_type = “wwpn (World Wide Port Name)”
uevent =

Device = “host2”
Device path = “/sys/devices/pci0000:00/0000:00:09.0/0000:09:00.1/host2”
fw_dump =
nvram = “ISP ”
optrom_ctl =
optrom =
reset =
uevent =
vpd = “▒8”

Perform diagnostic steps below to isolate initialization issue. Engaged hardware vendor to check the card

Advertisements

Adding new disks to Oracle ASM (Automatic Storage Management)

I have a two node Oracle RAC and I need to add disks to it

Storage team presented 3 new LUNs

rac1 & rac2
RAC1RAC2_PROJECT335066_Data1 (Tier1, RAID5, Size: 50GB)
World Wide LUN ID# 6001-4380-05de-d87b-0000-5000-10ef-0000
RAC1RAC2_PROJECT335066_Logs1 (Tier1, RAID1, Size: 20GB)
World Wide LUN ID# 6001-4380-05de-d87b-0000-5000-10f3-0000
RAC1RAC2_PROJECT335066_Quo (Tier1, RAID5, Size: 1GB)
World Wide LUN ID# 6001-4380-05de-d87b-0000-5000-10f7-0000

10ef
10f3
10f7

My server has a fibre-channel HBA card. Check HBA information. Install libsysfs and sysfsutils if you don’t have systool. Run yum install sysfsutils. I want to use an internal repository so I won’t use yum

root@rac1# systool -av -c fc_host
-bash: systool: command not found

root@rac1:~ # rpm -ivh http://172.22.19.185/rhel/redhat/rhel-x86_64-server-6/getPackage/libsysfs-2.1.0-7.el6.x86_64.rpm http://172.22.19.185/rhel/redhat/rhel-x86_64-server-6/getPackage/sysfsutils-2.1.0-7.el6.x86_64.rpm
Retrieving http://172.22.19.185/rhel/redhat/rhel-x86_64-server-6/getPackage/libsysfs-2.1.0-7.el6.x86_64.rpm
Retrieving http://172.22.19.185/rhel/redhat/rhel-x86_64-server-6/getPackage/sysfsutils-2.1.0-7.el6.x86_64.rpm
Preparing… ########################################### [100%]
1:libsysfs ########################################### [ 50%]
2:sysfsutils ########################################### [100%]

root@rac1:~ # systool -av -c fc_host | grep “Class Device =” | awk -F’=’ {‘print $2’} | awk -F'”‘ {‘print “echo \”- – -\” > /sys/class/scsi_host/”$2″/scan”‘}
echo “- – -” > /sys/class/scsi_host/host0/scan
echo “- – -” > /sys/class/scsi_host/host1/scan

root@rac1:~ # systool -av -c fc_host | grep “Class Device =” | awk -F’=’ {‘print $2’} | awk -F'”‘ {‘print “echo \”- – -\” > /sys/class/scsi_host/”$2″/scan”‘} | bash

Listing the disks under Oracle ASM

root@rac1:~ # /etc/init.d/oracleasm listdisks
OCR_VOTE_001
OCR_VOTE_002
OCR_VOTE_003
OCR_VOTE_004
OCR_VOTE_005
ORAARCH_001
ORADATA_001

Added the disk information to /etc/multipath.conf

multipath {
wwid 36001438005ded87b0000500010ef0000
alias asmdisk07
}
multipath {
wwid 36001438005ded87b0000500010f30000
alias asmdisk08
}
multipath {
wwid 36001438005ded87b0000500010f70000
alias votdisk04
}

Then run multipath -r to reload the new multipath aliases

Check if the aliases changed

root@rac1:~ # multipath -ll | grep 10ef
asmdisk07 (36001438005ded87b0000500010ef0000) dm-44 HP,HSV450
root@rac1:~ # multipath -ll | grep 10f3
asmdisk08 (36001438005ded87b0000500010f30000) dm-45 HP,HSV450
root@rac1:~ # multipath -ll | grep 10f7
votdisk04 (36001438005ded87b0000500010f70000) dm-46 HP,HSV450

DBA team asked to change owner and group for the disk devices

root@rac1:~ # chown oracle:dba /dev/mapper/asmdisk07
root@rac1:~ # chown oracle:dba /dev/mapper/asmdisk08
root@rac1:~ # chown oracle:dba /dev/mapper/votdisk04

Labeling disks

root@rac1:~ # /etc/init.d/oracleasm createdisk OCR_VOTE_006 votdisk04
Marking disk “OCR_VOTE_006” as an ASM disk: [ OK ]
root@rac1:~ # /etc/init.d/oracleasm createdisk ORADATA_002 asmdisk07
Marking disk “ORADATA_002” as an ASM disk: [ OK ]
root@rac1:~ # /etc/init.d/oracleasm createdisk ORADATA_003 asmdisk08
Marking disk “ORADATA_003” as an ASM disk: [ OK ]

Checking if the new disks

root@rac1:~ # /etc/init.d/oracleasm listdisks
OCR_VOTE_001
OCR_VOTE_002
OCR_VOTE_003
OCR_VOTE_004
OCR_VOTE_005
ORAARCH_001
ORADATA_001
ORADATA_002
ORADATA_003

In the other node, the disks are not updated automatically

root@rac2:~ # /etc/init.d/oracleasm listdisks
OCR_VOTE_001
OCR_VOTE_002
OCR_VOTE_003
OCR_VOTE_004
OCR_VOTE_005
ORAARCH_001
ORADATA_001

You need to perform the same steps and instead of running oracleasm disk, run oracleasm scandisks

root@rac2:~ # /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks: [ OK ]

root@rac2:~ # /etc/init.d/oracleasm listdisks
OCR_VOTE_001
OCR_VOTE_002
OCR_VOTE_003
OCR_VOTE_004
OCR_VOTE_005
ORAARCH_001
ORADATA_001
ORADATA_002
ORADATA_003

systool – Query information about Fibre Channel HBA card on a Linux server

To query information about Fibre Channel HBA cards, use systool

root@linux:~ # which systool
/usr/bin/systool

Install the package sysfsutils using yum install systool if you have a Red Hat based distribution

root@linux:~ # rpm -qf /usr/bin/systool
sysfsutils-2.1.0-7.el6.x86_64

root@linux:~ # rpm -qi sysfsutils
Name : sysfsutils Relocations: (not relocatable)
Version : 2.1.0 Vendor: Red Hat, Inc.
Release : 7.el6 Build Date: Thu 20 Sep 2012 10:11:43 AM BRT
Install Date: Fri 23 May 2014 12:17:31 PM BRT Build Host: x86-012.build.bos.redhat.com
Group : Development/Tools Source RPM: sysfsutils-2.1.0-7.el6.src.rpm
Size : 117100 License: GPLv2
Signature : RSA/8, Fri 09 Nov 2012 09:27:58 AM BRST, Key ID 199e2f91fd431d51
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla&gt;
URL : http://sourceforge.net/projects/linux-diag/
Summary : Utilities for interfacing with sysfs
Description :
This package’s purpose is to provide a set of utilities for interfacing
with sysfs.

root@linux:~ # cat /etc/*release
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Red Hat Enterprise Linux Server release 6.5 (Santiago)

Updating HP BLc Emulex LPe1105-HP FC Mezz Option Kit – Flash Engine exit code: 2 – All updates failed. – Flash complete [7]

I was receiving error Flash Engine exit code: 2

root@suse11:/usr/lib/x86_64-linux-gnu/hp-firmware-fc-emulex-2015.02.01-1.1 # ./.hpsetup
—————————————————
Loading references…done.
Performing discovery…
Preparing the Emulex Kit…done
Performing flash — DO NOT INTERRUPT!
Executing flash engine: ./elxflashStandalone*/lx/elxflash.sh /fc /update 1>> /var/cpq/Component.log 2>> /var/cpq/Component.log 3>> /var/cpq/Component.log
Flash Engine exit code: 2
All updates failed.
Flash complete [7]

I have a dual port Emulex LPe1105-HP

root@suse11:~ # systool -av -c fc_host | grep “Class Device =”
Class Device = “host0”
Class Device = “host1”

root@suse11:~ # systool -c scsi_host -v -d host0 | grep modeldesc
modeldesc = “HP BLc Emulex LPe1105-HP FC Mezz Option Kit”
root@suse11:~ # systool -c scsi_host -v -d host1 | grep modeldesc
modeldesc = “HP BLc Emulex LPe1105-HP FC Mezz Option Kit”

Reviewing the log file, it seems that this server already had the firmware flashed

root@suse11:~ # cat /var/cpq/Component.log
=================================================================

Installation started: Wed Oct 7 10:57:33 BRT 2015

Installing: CP022701.scexe
Version: 2014.04.01a
Description: HP Firmware Flash for Emulex Fibre Channel HBAs and CNAs

—————————————————
Loading references…done.
Performing discovery…
Preparing the Emulex Kit…done
Performing flash — DO NOT INTERRUPT!
Executing flash engine: ./elxflashStandalone*/lx/elxflash.sh /sysfs /update 1>> /var/cpq/Component.log 2>> /var/cpq/Component.log 3>> /var/cpq/Component.log

Wed Oct 7 10:58:12 2015
HBA=LPe1105, Port Type=FC, WWN=10:00:00:00:C9:9A:35:8E,
Update=Firmware, Image=ZF282X4.ALL, New=282X4, Old=280A4, Status=Success

Wed Oct 7 10:58:33 2015
HBA=LPe1105, Port Type=FC, WWN=10:00:00:00:C9:9A:35:8E,
Update=Boot Code, Image=ZU610A14.PRG, New=610A14, Old=603A7, Status=Success

Wed Oct 7 10:59:11 2015
HBA=LPe1105, Port Type=FC, WWN=10:00:00:00:C9:9A:35:8F,
Update=Firmware, Image=ZF282X4.ALL, New=282X4, Old=280A4, Status=Success

Wed Oct 7 10:59:32 2015
HBA=LPe1105, Port Type=FC, WWN=10:00:00:00:C9:9A:35:8F,
Update=Boot Code, Image=ZU610A14.PRG, New=610A14, Old=603A7, Status=Success

elxflash: All required updates succeeded – Return Code=0

Flash Engine exit code: 0
All updates were successful. Reboot needed.
Flash complete [1]

Return code: 1

Installation complete: Wed Oct 7 10:59:32 BRT 2015

=================================================================

—————————————————
Loading references…done.
Performing discovery…
Preparing the Emulex Kit…done
Performing flash — DO NOT INTERRUPT!
Executing flash engine: ./elxflashStandalone*/lx/elxflash.sh /fc /update 1>> /var/cpq/Component.log 2>> /var/cpq/Component.log 3>> /var/cpq/Component.log

elxflash: Error – all required updates failed – Return Code=2

Flash Engine exit code: 2
All updates failed.
Flash complete [7]
—————————————————
Loading references…done.
Performing discovery…
Preparing the Emulex Kit…done
Performing flash — DO NOT INTERRUPT!
Executing flash engine: ./elxflashStandalone*/lx/elxflash.sh /fc /update 1>> /var/cpq/Component.log 2>> /var/cpq/Component.log 3>> /var/cpq/Component.log

elxflash: Error – all required updates failed – Return Code=2

Flash Engine exit code: 2
All updates failed.
Flash complete [7]

%d bloggers like this: