1753795 Members
6806 Online
108799 Solutions
New Discussion юеВ

NO_HW devices

 
SOLVED
Go to solution
Prashant Zanwar_4
Respected Contributor

NO_HW devices

I have got many of NO_HW devices in rp8420, these are around 2500..All disk devices...and are EMC one...
I wanna remove all of these, so as to make ioscan o/p look better...
How do I plan...

insf -e
and rmsf -a

would this be correct to do..suggestions..?
Thanks and regards
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
12 REPLIES 12
A. Clay Stephenson
Acclaimed Contributor

Re: NO_HW devices

I would write a script that captures your current ioscan output and for each of those that indicate NO_HW issue a rmsh -H hw-path.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor
Solution

Re: NO_HW devices

I would not use insf -e first. Cleanup to old devices and their mapping with rmsf -aH 12/34.5.6.7 (whatever the hardware path is). Make sure that the -H hardware path refers to the H/W Type = DEVICE. You may need to parse ioscan's output into a file and create all the rmsf -aH commands there. Then run ioscan without the -k option to update the lernel's view of the current hardware, followed by insf -e to create any missing device files.


Bill Hassell, sysadmin
Steven E. Protter
Exalted Contributor

Re: NO_HW devices

If you have done a lot of changes/removals and such on this server, you may need to run rmsf on them individually.

I've run into situations that actually forced me to renumber my instance numbers, which clears the numbers and device files and lets me start over.

HP has some very appropriate warnings concerning backups and this procedure. Proceed with caution IF you need to use it.

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&admit=-1335382922+1098717421883+28353475&docId=200000067424466

Usually a script that reads the ioscan output for NO_HW and issues rmsf commands will do the trick.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jeff Schussele
Honored Contributor

Re: NO_HW devices

Hi Prashant,

Usually these are created by moving FC HBAs, switch ports or array FAs around.
Generally that means the controller # is all that's changing so you might be able to just issue
rmsf /dev/dsk/cX* /dev/rdsk/cX
(where X=appropriate controller number)
commands and remove bunches at a time.
Although I would agree that a script is better suited to this task.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Prashant Zanwar_4
Respected Contributor

Re: NO_HW devices

I believe if I grep for tgt devices, after which follow the mapped devices to those paths, I can do those rmsf -ah on tgt paths which have NO_HW status...is that good enough, your thought?
CLASS = tgt and HW_TYPE=NO_HW... removing these shall take care of stuff I want to..

Thanks and regards
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Geoff Wild
Honored Contributor

Re: NO_HW devices

Just removing the files will not clean up the NO_HW - you must also do one of the following:

reboot or ioscan -fnC disk

as the running kernel still will think that it used to have a disk at that path...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Marvin Strong
Honored Contributor

Re: NO_HW devices

I have ran the following many times on my systems to cleanup the NO_HW. Occassionally there is one device that will not go away until reboot.


ioscan -fnkC disk | awk '/NO_HW/{print $3}' | xargs -i rmsf -H {}
Florian Heigl (new acc)
Honored Contributor

Re: NO_HW devices

Just out of couriosity why doesn't anyone of You go the easy way?

for devn in `ls /dev/*dsk/*`; do if `lssf $devn | grep "at address ??" 2>/dev/null 1>/dev
/null`; then rmsf $devn ; fi done

lssf asks the kernel without rescanning, so unless some of Your devices suddenly returned, this will be faster.
yesterday I stood at the edge. Today I'm one step ahead.
Prashant Zanwar_4
Respected Contributor

Re: NO_HW devices

Is it safe to run ioscan -fnC disk after this, can it cause any problem?
I am just referring to last response...I have that step...Kernel didnt flush the list yet..

Thanks and regards
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."