Re: Getting HW path & LUN paths from /dev/dsk/c* (1913 Views)
Reply
Occasional Advisor
ideep
Posts: 11
Registered: ‎04-22-2010
Message 1 of 18 (1,913 Views)
Accepted Solution

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*)?
Please use plain text.
Valued Contributor
Vijaykumar_1
Posts: 118
Registered: ‎08-10-2009
Message 2 of 18 (1,913 Views)

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
Please use plain text.
Honored Contributor
Robert-Jan Goossens
Posts: 7,384
Registered: ‎04-04-2000
Message 3 of 18 (1,913 Views)

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

# ioscan -fnCdisk
Please use plain text.
Occasional Advisor
ideep
Posts: 11
Registered: ‎04-22-2010
Message 4 of 18 (1,913 Views)

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?

Please use plain text.
HP Pro
SoorajCleris
Posts: 886
Registered: ‎12-19-2008
Message 5 of 18 (1,913 Views)

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
Please use plain text.
Occasional Advisor
ideep
Posts: 11
Registered: ‎04-22-2010
Message 6 of 18 (1,913 Views)

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
Please use plain text.
Honored Contributor
Matti_Kurkela
Posts: 6,271
Registered: ‎12-02-2001
Message 7 of 18 (1,913 Views)

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
Please use plain text.
Occasional Advisor
ideep
Posts: 11
Registered: ‎04-22-2010
Message 8 of 18 (1,913 Views)

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
#
Please use plain text.
Acclaimed Contributor
Torsten.
Posts: 23,252
Registered: ‎10-02-2001
Message 9 of 18 (1,913 Views)

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! star in the left column!   
Please use plain text.
Valued Contributor
Vijaykumar_1
Posts: 118
Registered: ‎08-10-2009
Message 10 of 18 (1,913 Views)

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
Please use plain text.
Occasional Advisor
ideep
Posts: 11
Registered: ‎04-22-2010
Message 11 of 18 (1,912 Views)

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.
Please use plain text.
Acclaimed Contributor
Torsten.
Posts: 23,252
Registered: ‎10-02-2001
Message 12 of 18 (1,912 Views)

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! star in the left column!   
Please use plain text.
Occasional Advisor
ideep
Posts: 11
Registered: ‎04-22-2010
Message 13 of 18 (1,912 Views)

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.
Please use plain text.
HP Pro
SoorajCleris
Posts: 886
Registered: ‎12-19-2008
Message 14 of 18 (1,912 Views)

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
Please use plain text.
Acclaimed Contributor
Torsten.
Posts: 23,252
Registered: ‎10-02-2001
Message 15 of 18 (1,912 Views)

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! star in the left column!   
Please use plain text.
Acclaimed Contributor
Torsten.
Posts: 23,252
Registered: ‎10-02-2001
Message 16 of 18 (1,912 Views)

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! star in the left column!   
Please use plain text.
Occasional Advisor
ideep
Posts: 11
Registered: ‎04-22-2010
Message 17 of 18 (1,912 Views)

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
Please use plain text.
Occasional Advisor
ideep
Posts: 11
Registered: ‎04-22-2010
Message 18 of 18 (1,912 Views)

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.

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation