How to remove NO_HW device on HP-UX

When a LUN removed from the storage side you need to scan for changes on your host. If you won't remove the dead lun path system shows them in NO_HW state. This means the operating system no longer probe for LUNs on  array controller so the LUNs behind the controller go to an unhealthy state or  NO_HW state. When you get a  LUN  from the storage side which  LUNID is the same as the old disk which removed before, your system is not able to check or detect this new  LUN. You have to remove the old NO_HW state path then scan again.

Step 1: List all  NO_HW   device.

#ioscan -fnC disk| grep -v grep | grep NO_HW | awk '{ print $3 }'

Check if there exists a  process that running on this device. If not then use  "rmsf " command to remove the NO_HW device.


Step 2: Remove NO_HW device

#fuser  /dev/rdisk/diskname
#rmsf -k -H <diskpathfromioscanfncdisk>

A simple script that removes NO_HW device. Be careful before running this script. It 'll delete all  NO_HW devices.

#for i in `ioscan -fnC disk| grep -v grep | grep NO_HW | awk ‘{ print $3 }’`
rmsf -k -H $i


I'm a IT Infrastructure and Operations Architect with extensive experience and administration skills and works for Turk Telekom. I provide hardware and software support for the IT Infrastructure and Operations tasks.

205 Total Posts
Follow Me