Operating System - HP-UX
1827286 Members
1647 Online
109717 Solutions
New Discussion

Re: Getting HW path & LUN paths from /dev/dsk/c*

 
SOLVED
Go to solution
ideep
Occasional Advisor

Getting HW path & LUN paths from /dev/dsk/c*

I need to delete the HW path and LUN paths
associated with a device after deleting it. Is there any command with gives the lun & HW paths if we give the device as input(/dev/dsk/c*t*d*)?
17 REPLIES 17
Vijaykumar_1
Valued Contributor

Re: Getting HW path & LUN paths from /dev/dsk/c*

If you have already removed the disk physically from the server and if the device file still exists, then you may need to run insf..

#insf -eC disk

This will recreate the device files and the device files for the removed disks will get removed.

In case of a an EMC symmetrix LUN, you will have to run powermt commands to remove the dead paths

The sequence will be as follows,

#powermt check
#powermt config
#powermt save
#powermt display
Robert-Jan Goossens
Honored Contributor

Re: Getting HW path & LUN paths from /dev/dsk/c*

# ioscan -fnCdisk
ideep
Occasional Advisor

Re: Getting HW path & LUN paths from /dev/dsk/c*

i did
1.rmsf -a /dev/dsk/c5t2d2
2.insf -eC disk

but i still see NO_HW HW & lun paths

# ioscan -fkNC disk | grep NO_HW
disk 36 64000/0xfa00/0x67b esdisk NO_HW DEVICE NETAPP LUN
# ioscan -fkNC lunpath | grep NO_HW
lunpath 32 64000/0x2/0x0.0x0.0x4012000000000000 eslpt NO_HW LUN_PATH LUN path for disk36
# uname -a
HP-UX hpux197- B.11.31 U ia64 1205803419 unlimited-user license

Am i missing anything?

SoorajCleris
Honored Contributor

Re: Getting HW path & LUN paths from /dev/dsk/c*

Hi,

Which is your OS ?

#ioscan is the command which will give you device files and hardware mapping.

But
"I need to delete the HW path and LUN paths
associated with a device after deleting it.
"

==> what you mean by delete HW path???

Regards,
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
ideep
Occasional Advisor

Re: Getting HW path & LUN paths from /dev/dsk/c*

an entry in ioscan o/p (eg 64000/0xfa00/0x67b ) which is listed under H/W path

# ioscan -fkNC disk
Class I H/W Path Driver S/W State H/W Type Description
===================================================================
disk 3 64000/0xfa00/0x0 esdisk CLAIMED DEVICE HP 73.4GMAX3073NC
disk 4 64000/0xfa00/0x1 esdisk CLAIMED DEVICE HP 73.4GMAX3073NC
Matti_Kurkela
Honored Contributor

Re: Getting HW path & LUN paths from /dev/dsk/c*

There is no need to list individual paths for deletion in 11.31.

Simply run "rmsf -x" to instantly delete all disk devices, HW paths and lunpaths whose disk is no longer available.

MK
MK
ideep
Occasional Advisor

Re: Getting HW path & LUN paths from /dev/dsk/c*

we are not able to get rid of NO_HW paths even after running the rmsf -x in HPUX 11iv3
# rmsf -x
rmsf: Removing stale entry at 255/0/1.0 for iscsial
rmsf: Removing stale entry at 255/0/2.0.0.0 for sdisk
rmsf: Removing stale entry at 255/0/2.0.0.3 for sdisk
rmsf: Removing stale entry at 255/0/2.0.0.6 for sdisk
rmsf: Removing stale entry at 64000/0x2/0x0.0x1 for estp
rmsf: Removing stale entry at 64000/0x2/0x0.0x2.0x4000000000000000 for eslpt
rmsf: Removing stale entry at 64000/0x2/0x0.0x2.0x4003000000000000 for eslpt
rmsf: Removing stale entry at 64000/0x2/0x0.0x2.0x4006000000000000 for eslpt
rmsf: Removing stale entry at 64000/0xfa00/0x672 for esdisk
rmsf: Removing stale entry at 64000/0xfa00/0x673 for esdisk
rmsf: Removing stale entry at 64000/0xfa00/0x676 for esdisk
Removing stale block DSF /dev/dsk/c6t0d0
Removing stale block DSF /dev/dsk/c6t0d2
Removing stale block DSF /dev/dsk/c6t0d3
Removing stale block DSF /dev/dsk/c6t0d4
Removing stale block DSF /dev/dsk/c6t0d5
Removing stale block DSF /dev/dsk/c6t0d6
Removing stale block DSF /dev/dsk/c6t0d7
Removing stale block DSF /dev/disk/disk27
Removing stale block DSF /dev/disk/disk22
Removing stale block DSF /dev/disk/disk28
Removing stale character DSF /dev/isw
Removing stale character DSF /dev/rdsk/c6t0d0
Removing stale character DSF /dev/rdsk/c6t0d2
Removing stale character DSF /dev/rdsk/c6t0d3
Removing stale character DSF /dev/rdsk/c6t0d4
Removing stale character DSF /dev/rdsk/c6t0d5
Removing stale character DSF /dev/rdsk/c6t0d6
Removing stale character DSF /dev/rdsk/c6t0d7
Removing stale character DSF /dev/rdisk/disk27
Removing stale character DSF /dev/rdisk/disk22
Removing stale character DSF /dev/rdisk/disk28
# ioscan -fkNC disk | grep NO_HW
disk 36 64000/0xfa00/0x67b esdisk NO_HW DEVICE NETAPP LUN
# ioscan -fkNC lunpath | grep NO_HW
lunpath 32 64000/0x2/0x0.0x0.0x4012000000000000 eslpt NO_HW LUN_PATH LUN path for disk36
#
Torsten.
Acclaimed Contributor

Re: Getting HW path & LUN paths from /dev/dsk/c*

Did you try this?

# rmsf -k -H ...


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Vijaykumar_1
Valued Contributor

Re: Getting HW path & LUN paths from /dev/dsk/c*

-k option with ioscan invokes the device tree from the kernel. Try running without -k option
ideep
Occasional Advisor

Re: Getting HW path & LUN paths from /dev/dsk/c*

rmsf -H is removing the HW and LUN paths. But the problem is i just want to remove the HW & lun paths for a specific device.
I am using a script to remove. That is why i need a way to find the HW & LUN paths for a specific device.
Torsten.
Acclaimed Contributor

Re: Getting HW path & LUN paths from /dev/dsk/c*

But did you use

rmsf -k -H

or not?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
ideep
Occasional Advisor

Re: Getting HW path & LUN paths from /dev/dsk/c*

I greped for NO_HW in the following commands
and removed the stale entries with
rmsf -H

# ioscan -fkNC disk | grep NO_HW
# ioscan -fkNC lunpath | grep NO_HW

The problem is I am deleting all the stale
entries which are not related to my disk.
I want to remove the stale entries specific to my device only.
SoorajCleris
Honored Contributor

Re: Getting HW path & LUN paths from /dev/dsk/c*

Hi,

Could you please run ioscan with out "k" option and check the output? what is the current status

Regards,
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Torsten.
Acclaimed Contributor

Re: Getting HW path & LUN paths from /dev/dsk/c*

Still not sure where the problem is ...

Does this work for you?

# rmsf -k -H 64000/0x2/0x0.0x0.0x4012000000000000

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Torsten.
Acclaimed Contributor
Solution

Re: Getting HW path & LUN paths from /dev/dsk/c*

And by the way, when asking for the legacy device files (/dev/dsk/c*t*d*) you need to have a look at the legacy paths too:

# ioscan -fn

# ioscan -m dsf

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
ideep
Occasional Advisor

Re: Getting HW path & LUN paths from /dev/dsk/c*

rmsf -H is removing the stale entries.

but my question is
"is there any command which will list the HW and lun path for a device?"
somthing like

#COMMAND device(/dev/dsk/c*t*d*)
#output : H/W path & lun path

So that i can only delete the stale entries associated with a particular device.

or some option with rmsf which cleans up HW and lun paths also while deleting the disk
ideep
Occasional Advisor

Re: Getting HW path & LUN paths from /dev/dsk/c*

found the way.

#ioscan -m dsf | grep /dev/rdsk/c*t*d*
/dev/rdisk/disk /dev/rdsk/c*t*d*

# rmsf -av /dev/rdisk/disk

solved my problems.
Thanks for everyone who helped me.