问题现象

用户环境有两台3par 其中7200 使用FC 方式连接到主机端,8400使用iscsi 方式连接到主机端。

在7200 上使用命令removevlun解除FC的一条主机路径提示失败。但是在8400上使用相同命令移除iscsi 一条主机路径成功。

告警信息

用户的removevlun 命令输出如下:

========================================================================================================

FC

SS7400 cli% showvlun -v osv-DzGysVBFTaav1pOCExg6IA
Active VLUNs
Lun VVName                     HostName         -Host_WWN/iSCSI_Name-  Port Type Status ID
  0 osv-DzGysVBFTaav1pOCExg6IA YN-ec-compute-39 51402EC0017A4112      2:1:1 host active  1
  0 osv-DzGysVBFTaav1pOCExg6IA YN-ec-compute-39 51402EC0017AE076      2:1:2 host active  1
  0 osv-DzGysVBFTaav1pOCExg6IA YN-ec-compute-39 51402EC0017A4112      3:1:1 host active  1
  0 osv-DzGysVBFTaav1pOCExg6IA YN-ec-compute-39 51402EC0017AE076      3:1:2 host active  1
------------------------------------------------------------------------------------------
  4 total                                                                                 

VLUN Templates
Lun VVName                     HostName         -Host_WWN/iSCSI_Name- Port Type
  0 osv-DzGysVBFTaav1pOCExg6IA YN-ec-compute-39 ----------------       --- host
-------------------------------------------------------------------------------
  1 total                                                                      
SS7400 cli% removevlun -f osv-DzGysVBFTaav1pOCExg6IA 0 YN-ec-compute-39 2:1:1
Issuing removevlun osv-DzGysVBFTaav1pOCExg6IA 0 YN-ec-compute-39 2:1:1
removevlun: Port 2:1:1 host YN-ec-compute-39 (vv=osv-DzGysVBFTaav1pOCExg6IA,lun=0) export not found
SS7400 cli% removevlun -f osv-DzGysVBFTaav1pOCExg6IA 0 2:1:1
Issuing removevlun osv-DzGysVBFTaav1pOCExg6IA 0 2:1:1
removevlun: Port 2:1:1 (vv=osv-DzGysVBFTaav1pOCExg6IA,lun=0) export not found
SS7400 cli% showvlun -v osv-DzGysVBFTaav1pOCExg6IA
Active VLUNs
Lun VVName                     HostName         -Host_WWN/iSCSI_Name-  Port Type Status ID
  0 osv-DzGysVBFTaav1pOCExg6IA YN-ec-compute-39 51402EC0017A4112      2:1:1 host active  1
  0 osv-DzGysVBFTaav1pOCExg6IA YN-ec-compute-39 51402EC0017AE076      2:1:2 host active  1
  0 osv-DzGysVBFTaav1pOCExg6IA YN-ec-compute-39 51402EC0017A4112      3:1:1 host active  1
  0 osv-DzGysVBFTaav1pOCExg6IA YN-ec-compute-39 51402EC0017AE076      3:1:2 host active  1
------------------------------------------------------------------------------------------
  4 total                                                                                 

VLUN Templates
Lun VVName                     HostName         -Host_WWN/iSCSI_Name- Port Type
  0 osv-DzGysVBFTaav1pOCExg6IA YN-ec-compute-39 ----------------       --- host
-------------------------------------------------------------------------------
  1 total                                                                      
SS7400 cli% 


 

 

========================================================================================================

iSCSI

 

 

s8200 cli% showvlun -v osv-FGg1JESeQQy07aB73xcHCw
Active VLUNs
Lun VVName                     HostName   --------Host_WWN/iSCSI_Name--------  Port        Type Status ID
  2 osv-FGg1JESeQQy07aB73xcHCw controller iqn.1994-05.com.redhat:d0971eb4cbaf 0:2:2 matched set active  1
  0 osv-FGg1JESeQQy07aB73xcHCw controller iqn.1994-05.com.redhat:d0971eb4cbaf 1:2:1 matched set active  1
  1 osv-FGg1JESeQQy07aB73xcHCw controller iqn.1994-05.com.redhat:d0971eb4cbaf 1:2:2 matched set active  1
---------------------------------------------------------------------------------------------------------
  3 total
VLUN Templates
Lun VVName                     HostName   -Host_WWN/iSCSI_Name-  Port        Type
  2 osv-FGg1JESeQQy07aB73xcHCw controller ----------------      0:2:2 matched set
  0 osv-FGg1JESeQQy07aB73xcHCw controller ----------------      1:2:1 matched set
  1 osv-FGg1JESeQQy07aB73xcHCw controller ----------------      1:2:2 matched set
---------------------------------------------------------------------------------
  3 total
s8200 cli% removevlun -f osv-FGg1JESeQQy07aB73xcHCw 2 controller 0:2:2
Issuing removevlun osv-FGg1JESeQQy07aB73xcHCw 2 controller 0:2:2
s8200 cli% removevlun -f osv-FGg1JESeQQy07aB73xcHCw 0 controller 1:2:1
Issuing removevlun osv-FGg1JESeQQy07aB73xcHCw 0 controller 1:2:1
s8200 cli% removevlun -f osv-FGg1JESeQQy07aB73xcHCw 1 controller 1:2:2
Issuing removevlun osv-FGg1JESeQQy07aB73xcHCw 1 controller 1:2:2
s8200 cli% showvlun -v osv-FGg1JESeQQy07aB73xcHCw
Active VLUNs
no vluns listed
VLUN Templates
no vluns listed
 
 
原因分析

一.FC 端口试验机的vlun

3PAR7200c cli% showvlun -v vvtest

Active VLUNs

Lun VVName HostName    -Host_WWN/iSCSI_Name-  Port Type Status ID

160 vvtest SE3830node2 10000090FAB5E2FE      0:1:1 host active  1

162 vvtest SE3830node2 10000090FAB5E2FE      0:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      0:1:1 host active  1

162 vvtest SE3830node2 10000090FAB5E2FF      0:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FE      0:1:2 host active  1

162 vvtest SE3830node2 10000090FAB5E2FE      0:1:2 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      0:1:2 host active  1

162 vvtest SE3830node2 10000090FAB5E2FF      0:1:2 host active  1

160 vvtest SE3830node2 10000090FAB5E2FE      1:1:1 host active  1

162 vvtest SE3830node2 10000090FAB5E2FE      1:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      1:1:1 host active  1

162 vvtest SE3830node2 10000090FAB5E2FF      1:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FE      1:1:2 host active  1

162 vvtest SE3830node2 10000090FAB5E2FE      1:1:2 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      1:1:2 host active  1

162 vvtest SE3830node2 10000090FAB5E2FF      1:1:2 host active  1

-----------------------------------------------------------------

16 total                                                       

 

 

VLUN Templates

Lun VVName HostName    -Host_WWN/iSCSI_Name- Port Type

160 vvtest SE3830node2 ----------------       --- host

162 vvtest SE3830node2 ----------------       --- host

------------------------------------------------------

  2 total 

 

 

1,尝试移除vvtest 0:1:1 端口主机关系,提示跟您那边测试的结果是一样的,

3PAR7200c cli% removevlun -f vvtest 160 SE3830node2 0:1:1

Issuing removevlun vvtest 160 SE3830node2 0:1:1

removevlun: Port 0:1:1 host SE3830node2 (vv=vvtest,lun=160) export not found

 

 

2去掉端口参数,N:S:P 之后能消export 关系

3PAR7200c cli% removevlun -f vvtest 162 SE3830node2

Issuing removevlun vvtest 162 SE3830node2

 

 

3PAR7200c cli% showvlun  -v vvtest

Active VLUNs

Lun VVName HostName    -Host_WWN/iSCSI_Name-  Port Type Status ID

160 vvtest SE3830node2 10000090FAB5E2FE      0:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      0:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FE      0:1:2 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      0:1:2 host active  1

160 vvtest SE3830node2 10000090FAB5E2FE      1:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      1:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FE      1:1:2 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      1:1:2 host active  1

-----------------------------------------------------------------

  8 total                                                       

 

 

VLUN Templates

Lun VVName HostName    -Host_WWN/iSCSI_Name- Port Type

160 vvtest SE3830node2 ----------------       --- host

------------------------------------------------------

  1 total                                            

 

 

3,我尝试重新映射一下vvtest 这个vlun 到主机SE3830node2 使用lun162 和端口1:1:1 可以执行。

3PAR7200c cli% createvlun vvtest 162 SE3830node2 1:1:1

Warning: Virtual volume vvtest is already exported.

Unless this volume is being exported to a clustered environment, creation of

multiple exports could lead to data corruption. To avoid accidental creation

of multiple exports, consider setting the virtual volume policy to restrict

export to a single host.

 

 

Do you still wish to continue with the export?

select q=quit y=yes n=no: y

 

 

4,再次使用showvlun 查看vvtest vlun 输出发现我刚才创建的vlun type 上跟原来的不同,变成了matched set

3PAR7200c cli% showvlun -v vvtest

Active VLUNs

Lun VVName HostName    -Host_WWN/iSCSI_Name-  Port        Type Status ID

160 vvtest SE3830node2 10000090FAB5E2FE      0:1:1        host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      0:1:1        host active  1

160 vvtest SE3830node2 10000090FAB5E2FE      0:1:2        host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      0:1:2        host active  1

160 vvtest SE3830node2 10000090FAB5E2FE      1:1:1        host active  1

162 vvtest SE3830node2 10000090FAB5E2FE      1:1:1 matched set active  1

160 vvtest SE3830node2 10000090FAB5E2FF      1:1:1        host active  1

162 vvtest SE3830node2 10000090FAB5E2FF      1:1:1 matched set active  1

160 vvtest SE3830node2 10000090FAB5E2FE      1:1:2        host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      1:1:2        host active  1

------------------------------------------------------------------------

10 total                                                              

 

 

VLUN Templates

Lun VVName HostName    -Host_WWN/iSCSI_Name-  Port        Type

160 vvtest SE3830node2 ----------------        ---        host

162 vvtest SE3830node2 ----------------      1:1:1 matched set

--------------------------------------------------------------

  2 total  

 

 

查询CLI 手册,发现temple 的类型有以下几种:

There are four types of VLUN templates:

? port presents - created when only the node:slot:port are specified. The VLUN is visible

to any initiator on the specified port.

NOTE: Port presents makes VLUNs available to any host that connects through that port

using the node, slot, and port information. See the HP 3PAR InForm OS Common Criteria

Administrator’s Reference for more information before using this command in Common Criteria

mode.

? host set - created when a host set is specified. The VLUN is visible to the initiators of any host

that is a member of the set.

? host sees - created when the hostname is specified. The VLUN is visible to the initiators with

any of the host’s World Wide Names (WWNs).

? matched set - created when both hostname and node:slot:port are specified. The VLUN

is visible to initiators with the host’s WWNs only on the specified port.

 

 

使用showvlun 命令看到的type 对应关系:

Type. The type of export rule that is applied when the virtual volume is exported. Possible

entries are port for port-presents, host for host-sees, hostset for host-set VLUNs,

matched-set for matched-set.                                                

 

 

在这种情况下使用removevlun 命令移除之前matched-set 指定端口命令,可以执行成功。

3PAR7200c cli% removevlun -f vvtest 162 SE3830node2 1:1:1

Issuing removevlun vvtest 162 SE3830node2 1:1:1

3PAR7200c cli% showvlun -v vvtest

Active VLUNs

Lun VVName HostName    -Host_WWN/iSCSI_Name-  Port Type Status ID

160 vvtest SE3830node2 10000090FAB5E2FE      0:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      0:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FE      0:1:2 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      0:1:2 host active  1

160 vvtest SE3830node2 10000090FAB5E2FE      1:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      1:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FE      1:1:2 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      1:1:2 host active  1

-----------------------------------------------------------------

  8 total          

 

 

根据以上操作验证,vlun 是怎么创建的,就要怎么删除。如果vlun 创建的时候是按hostname做的,删除就要按照hostname 删除。

 

 

为了验证您的环境测试,我再次验证,创建vlun 的时候不加端口参数,直接加host 参数,测试结果也是不加端口可以删除。

 

 

3PAR7200c cli% createvlun vvtest 163 SE3830node2

Warning: Virtual volume vvtest is already exported.

Unless this volume is being exported to a clustered environment, creation of

multiple exports could lead to data corruption. To avoid accidental creation

of multiple exports, consider setting the virtual volume policy to restrict

export to a single host.

 

 

Do you still wish to continue with the export?

select q=quit y=yes n=no: y

3PAR7200c cli% showvlun -v vvtest

Active VLUNs

Lun VVName HostName    -Host_WWN/iSCSI_Name-  Port Type Status ID

160 vvtest SE3830node2 10000090FAB5E2FE      0:1:1 host active  1

163 vvtest SE3830node2 10000090FAB5E2FE      0:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      0:1:1 host active  1

163 vvtest SE3830node2 10000090FAB5E2FF      0:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FE      0:1:2 host active  1

163 vvtest SE3830node2 10000090FAB5E2FE      0:1:2 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      0:1:2 host active  1

163 vvtest SE3830node2 10000090FAB5E2FF      0:1:2 host active  1

160 vvtest SE3830node2 10000090FAB5E2FE      1:1:1 host active  1

163 vvtest SE3830node2 10000090FAB5E2FE      1:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      1:1:1 host active  1

163 vvtest SE3830node2 10000090FAB5E2FF      1:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FE      1:1:2 host active  1

163 vvtest SE3830node2 10000090FAB5E2FE      1:1:2 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      1:1:2 host active  1

163 vvtest SE3830node2 10000090FAB5E2FF      1:1:2 host active  1

-----------------------------------------------------------------

16 total                                                       

 

 

VLUN Templates

Lun VVName HostName    -Host_WWN/iSCSI_Name- Port Type

160 vvtest SE3830node2 ----------------       --- host

163 vvtest SE3830node2 ----------------       --- host

------------------------------------------------------

  2 total                                            

3PAR7200c cli% removevlun -f vvtest 163 SE3830node2 1:1:1

Issuing removevlun vvtest 163 SE3830node2 1:1:1

removevlun: Port 1:1:1 host SE3830node2 (vv=vvtest,lun=163) export not found

3PAR7200c cli% removevlun -f vvtest 163 SE3830node2

Issuing removevlun vvtest 163 SE3830node2

3PAR7200c cli% showvlun -v vvtest

Active VLUNs

Lun VVName HostName    -Host_WWN/iSCSI_Name-  Port Type Status ID

160 vvtest SE3830node2 10000090FAB5E2FE      0:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      0:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FE      0:1:2 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      0:1:2 host active  1

160 vvtest SE3830node2 10000090FAB5E2FE      1:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      1:1:1 host active  1

160 vvtest SE3830node2 10000090FAB5E2FE      1:1:2 host active  1

160 vvtest SE3830node2 10000090FAB5E2FF      1:1:2 host active  1

-----------------------------------------------------------------

  8 total                                                       

 

 

VLUN Templates

Lun VVName HostName    -Host_WWN/iSCSI_Name- Port Type

160 vvtest SE3830node2 ----------------       --- host

------------------------------------------------------

  1 total                                            

3PAR7200c cli%

 

 

以上验证成功。

 

验证iscsi 相同的原理

 

 

 

解决办法

1,由于createvlun 的时候是按照host 类型创建。所以删除vlun 的时候只能按照host 类型删除

2,createvlun 的时候选择matchset 的方式。这样就可以单独删除一条路径测试。

案例信息

案例类型:经验案例
案例号:201801100044
创建时间:2018年1月10日
更新时间:2018年2月25日
发布时间:2018/2/25 23:31:55
文章密级:游客可见
有效期:长期有效
发布者:曹璐 [c61532]
点击次数:2211
评论平均得分:0
关键词:00333979 remove vlun 主机 路径
产品线:存储产品(新)
产品系列:3PAR
产品版本:All
故障类型:

常用操作
收藏