ESXi

 View Only
  • 1.  how to unmask LUN?

    Posted Mar 25, 2011 10:07 AM

    Gents,

    I was playing around with LUN masking using MASK_PATH plugin. Masking works perfectly, but I can't figure out how to unmask LUN.

    basically I created a rule to mask all paths to a LUN through one of the 2 HBAs. So now I see 4 paths active only instead of 8 before masking.

    So what I tried to do to unmask the LUN:

    1. I deleted the rule

    esxcli --server ESX01 corestorage claimrule delete --rule=191

    2. loaded updated rules file

    esxcli --server ESX01 corestorage claimrule load

    3. reclaimed paths to device

    esxcli --server ESX01 corestorage claiming reclaim -d naa.6001438005dedb350000500004be0000

    4. and still could see that half of the paths are still owned by MASK_PATH plugin

    vmhba0:C0:T1:L16 state:dead   vmhba0 0 1 16 MASK_PATH dead fc.50060b0000c35e31:50060b0000c35e30 fc.50001fe150244f40:50001fe150244f4e

    vmhba0:C0:T2:L16 state:dead   vmhba0 0 2 16 MASK_PATH dead fc.50060b0000c35e31:50060b0000c35e30 fc.50001fe150244f40:50001fe150244f48

    vmhba0:C0:T3:L16 state:dead   vmhba0 0 3 16 MASK_PATH dead fc.50060b0000c35e31:50060b0000c35e30 fc.50001fe150244f40:50001fe150244f4a

    vmhba0:C0:T0:L16 state:dead   vmhba0 0 0 16 MASK_PATH dead fc.50060b0000c35e31:50060b0000c35e30 fc.50001fe150244f40:50001fe150244f4c

    another half of the paths are active and owned by proper NMP plugin.

    vmhba1:C0:T2:L16 state:active naa.6001438005dedb350000500004be0000 vmhba1 0 2 16 NMP active fc.50060b0000c35e33:50060b0000c35e32

    fc.50001fe150244f40:50001fe150244f49

    vmhba1:C0:T3:L16 state:active naa.6001438005dedb350000500004be0000 vmhba1 0 3 16 NMP active fc.50060b0000c35e33:50060b0000c35e32 fc.50001fe150244f40:50001fe150244f4b

    vmhba1:C0:T0:L16 state:active naa.6001438005dedb350000500004be0000 vmhba1 0 0 16 NMP active fc.50060b0000c35e33:50060b0000c35e32 fc.50001fe150244f40:50001fe150244f4d

    vmhba1:C0:T1:L16 state:active naa.6001438005dedb350000500004be0000 vmhba1 0 1 16 NMP active fc.50060b0000c35e33:50060b0000c35e32 fc.50001fe150244f40:50001fe150244f4f

    I rebooted the host and seems like it fixed situation, however I would like to know if there is a way to UNMASK LUN without rebooting the host.

    Thanks in advance.



  • 2.  RE: how to unmask LUN?



  • 3.  RE: how to unmask LUN?

    Posted Mar 25, 2011 01:17 PM

    actually I used this KB article to mask a  LUN, but it doesn't really say how to unmask LUN.



  • 4.  RE: how to unmask LUN?
    Best Answer

    Posted Mar 25, 2011 05:25 PM

    I believe you need to unclaim those targets from MASK_PATH before you can reclaim to NMP. These two commands should do the trick.

    To rid all MASK_PATH plugin claims:

    esxcli corestorage claiming unclaim -t plugin -P MASK_PATH

    Or to specify the 4 targets to your LUN:

    esxcli corestorage claiming unclaim -t location -A vmhba0 -C 0 -L 16


  • 5.  RE: how to unmask LUN?

    Posted Mar 28, 2011 08:09 AM

    Great, thanks a lot. it worked.

    I am just wondering why reclaiming by device uuid didn't work? I thought reclaiming process include unclaiming from MASK_PATH and claiming back to NMP, according to claim rules.

    .

    Another strange thing. When I unclaimed using -t=location it was still showing MASK_PATH as an owner. and only after I ran esxcfg-rescan vmhba0 it showed all paths are active.

    anyway, thanks again. :smileyhappy: