System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove all lunpaths associated with a tgtpath

SOLVED
Go to solution
0xGK
Occasional Visitor

How to remove all lunpaths associated with a tgtpath

I'm looking for a quick and easy way to remove all the lunpaths associated with a particular tgtpath.  Essentially we lost a port on one of our storage devices. The storage team "repaired" this by presenting a different port to the servers. That means we need to remove the failed path and all associated device files.   I am trying to avoid a reboot to do this. I have 12 impacted servers with hundreds of LUNs to contend with.

 

 

# ioscan -kfnNC tgtpath
Class     I  H/W Path  Driver S/W State   H/W Type     Description
=================================================================
tgtpath   4  32/0/2/0/0/0/0/4/0/0/0.0x500a098287a9aa96  estp   CLAIMED     TGT_PATH     fibre_channel target served by fclp driver, target port id 0x280600
tgtpath   6  32/0/2/0/0/0/0/4/0/0/0.0x500a098297a9aa96  estp   CLAIMED     TGT_PATH     fibre_channel target served by fclp driver, target port id 0x281f00
tgtpath   5  32/0/2/0/0/0/0/4/0/0/0.0x500a098787a9aa96  estp   CLAIMED     TGT_PATH     fibre_channel target served by fclp driver, target port id 0x980a00
tgtpath   7  32/0/2/0/0/0/0/4/0/0/0.0x500a098797a9aa96  estp   CLAIMED     TGT_PATH     fibre_channel target served by fclp driver, target port id 0x983800
tgtpath   3  34/0/2/0/0/0/0/4/0/0/0.0x500a098487a9aa96  estp   CLAIMED     TGT_PATH     fibre_channel target served by fclp driver, target port id 0x1e0600
tgtpath   2  34/0/2/0/0/0/0/4/0/0/0.0x500a098497a9aa96  estp   CLAIMED     TGT_PATH     fibre_channel target served by fclp driver, target port id 0x1e1f00
tgtpath   8  34/0/2/0/0/0/0/4/0/0/0.0x500a098587a9aa96  estp   CLAIMED     TGT_PATH     fibre_channel target served by fclp driver, target port id 0x344f00
tgtpath   1  34/0/2/0/0/0/0/4/0/0/0.0x500a098887a9aa96  estp   CLAIMED     TGT_PATH     fibre_channel target served by fclp driver, target port id 0x343100
tgtpath   0  34/0/2/0/0/0/0/4/0/0/0.0x500a098897a9aa96  estp   CLAIMED     TGT_PATH     fibre_channel target served by fclp driver, target port id 0x341700

 

The failed tgtpath is: 34/0/2/0/0/0/0/4/0/0/0.0x500a098887a9aa96

 

There are 62 associated lunpaths with this tgtpath.

 

# scsimgr get_info -H 34/0/2/0/0/0/0/4/0/0/0.0x500a098887a9aa96

        STATUS INFORMATION FOR TARGET PATH : 34/0/2/0/0/0/0/4/0/0/0.0x500a098887a9aa96

Generic Status Information

SCSI services internal state                  = IDLE
Port id                                       = 0x343100
Protocol                                      = fibre_channel
Protocol revision                             = 4.3
Port name                                     = 0x500a098887a9aa96
Node name                                     = 0x500a098087a9aa96
LUN paths registered (active/inactive)        = 62

 

I tried to use scsimgr since the man page seems to imply that -H can accept a target path, but that doesn't work.

 

[root@preodbu1a]# scsimgr disable -H 34/0/2/0/0/0/0/4/0/0/0.0x500a098887a9aa96
scsimgr: ERROR: Invalid object identifier.
Command disable expects a LUN or LUN path identifier

 

I've disabled the lunpaths which prevents the system from accessing the LUNs over these paths. So far I see:

 

tgtpath      1  34/0/2/0/0/0/0/4/0/0/0.0x500a098887a9aa96                     online
lunpath      2  34/0/2/0/0/0/0/4/0/0/0.0x500a098887a9aa96.0x0                 online
lunpath      5  34/0/2/0/0/0/0/4/0/0/0.0x500a098887a9aa96.0x4000000000000000  disabled
lunpath     16  34/0/2/0/0/0/0/4/0/0/0.0x500a098887a9aa96.0x4001000000000000  disabled
lunpath     20  34/0/2/0/0/0/0/4/0/0/0.0x500a098887a9aa96.0x4002000000000000  disabled
lunpath     26  34/0/2/0/0/0/0/4/0/0/0.0x500a098887a9aa96.0x4003000000000000  disabled
lunpath     30  34/0/2/0/0/0/0/4/0/0/0.0x500a098887a9aa96.0x4004000000000000  disabled
lunpath     32  34/0/2/0/0/0/0/4/0/0/0.0x500a098887a9aa96.0x4005000000000000  disabled
lunpath     38  34/0/2/0/0/0/0/4/0/0/0.0x500a098887a9aa96.0x4006000000000000  disabled

. . .

 

 

 

Any easy way to get rid of this tgtpath,  lunpaths, and associated device files without reboot?

 

 

 

 

 

1 REPLY
0xGK
Occasional Visitor
Solution

Re: How to remove all lunpaths associated with a tgtpath

 

Answering my own question...

 

# rmsf -H tgtpath

 

Too easy!