Neko

Fixing missing devices (NO_HW) on HPUX

This last weekend, after some SAN changes, some of our HPUX systems experienced problems where either one of the hardware path’s to disk devices changed or the only path on some tape devices changed.  Of course, this wasn’t found out about until Monday morning…

A reboot would have fixed this — but I don’t like rebooting UNIX/Linux unless it’s absolutely necessary (and it rarely is).

The first thing I noticed is that doing an ioscan -fnC tape showed “NO_HW” on one of our IBM tape drives.   NO_HW indicates the devices has dissapeared, and was there before.

Next, I forced HPUX to rescan for new devices with the insf command:

# insf -e -C tape

The “-e” option tells insf to reinstall the special files for pseudo-drivers and existing devices.   The “-C tape” told insf to only match devices that belonged to the tape class.   Since I like to narrow down any impact, I prefer to work with one class at a time.

Once this command was completed, I now saw the tape drive that was “NO_HW” earlier, appear in the ioscan output.

However, the one that went missing was still there at the old patch.   Now, again, a reboot would fix this…. But do we want to do that?  NO. You don’t.

The rmsf command comes to the rescue here.  Let’s say the one missing (NO_HW) was at the following hardware path:  0/2/0/0.197.12.255.1.8.0, the following command would remove it.

# rmsf -H 0/2/0/0.197.12.255.1.8.0

No reboot necessary.  There also ways to accomplish the same tasks under other OSes, and I will cover those in future posts.

2 Comments

  1. Posted October 7, 2009 at 8:18 am | Permalink

    Thank You! We don’t reboot boxes here either :)

  2. Jeff
    Posted August 11, 2010 at 2:22 pm | Permalink

    Or you can run:
    `ioscan -fnC disk | grep NO_HW | awk ‘{print “rmsf -H ” $3}’`

Post a Comment

Your email is never shared. Required fields are marked *

*
*