cancel
Showing results for 
Search instead for 
Did you mean: 

Reset HBA in Red Hat?

Darren_Dunham
Level 6

My master (RH 4/NBU 6) is normally attached to four fiber-channel LTO-3 drives.  I was trying to do some troubleshooting of a tape drive that's not normally attached, and moved the cable over to that drive.  But I guess the OS "knows" that it's a different drive and doesn't display it for me.  In fact, moving the cable back to the original drive didn't show the original.

If I do 'mt -f /dev/nst1 status', I now just get Input/output error.

I'm sure a reboot will fix things, but I have a *long* running backup that I don't want to kill.  Right now none of the local drives are in use.  Is there any way of resetting the tape driver or something to bring this drive back without having to reboot the box?  It's a qlogic qla2xxx FC driver in use if that makes a difference.

Thanks!

--

Darren

4 REPLIES 4

schmaustech
Level 5

You can try the following:

RHEL4 native qla driver:
echo "1" > /sys/class/fc_host/host1/issue_lip
echo "1" > /sys/class/fc_host/host2/issue_lip
echo "- - -" > /sys/class/scsi_host/host1/scan
echo "- - -" > /sys/class/scsi_host/host2/scan

qlogic driver for 2.6 kernel (RHEL4):
echo "scsi-qlascan" > /proc/scsi/qla2xxx/1
echo "scsi-qlascan" > /proc/scsi/qla2xxx/2
echo "- - -" > /sys/class/scsi_host/host1/scan
echo "- - -" > /sys/class/scsi_host/host2/scan

-or-

Pull the fiber channel cable on the HBA and plug it back in.

-or-

Download the Q-Logic HBA utilities which should offer a way to reset the HBA.  I know Emulex supports this.

 

Regards,

Benjamin Schmaus

Darren_Dunham
Level 6

Thanks for the help.  cat /proc/scsi/scsi shows already shows all four drives connected.  Running the scans you mentioned didn't appear to change anything.  So I don't think the issue is on the qlogic side, but maybe with the 'st' driver?

I can see the drive through qlogic, it's jut not visible via /dev/nst*.  I tried unloading the 'st' module, but that command just hung.  This backup will probably finish over the weekend, so hopefully I'll be able to reboot next week and live without the drive until then...

--

Darren

 

schmaustech
Level 5

Anything in /var/log/messages or if you do a dmesg that indicates a SCSI error?

Regards,

Benjamin Schmaus

stu1
Level 4
Employee Accredited Certified

You shouldnt try to unload sg or sg modules while NBU is in use or you could jepordize the backups; because you just yanked the underlying tape driver NBU needs to do tape io commands.

 

But since none of the local drives are being used, it might be possible to termiante ltid, then attempt to unload sg, and st driver and reload time.  However, there are some risks, as I've heard from some users on rare occasional leading to kernel panics.  This would definitely kill that long runing backup.  If it's that important let that job finish before doing anything. 

 

If you have sg3_utils installed, and lsscsi installed, you can check and confirm device files.  Or check tpautoconf -t (under /usr/openv/volmgr/bin)