跳转到主内容

添加新卷时、LS镜像是否会影响NAS访问?

Views:
42
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
nas
Last Updated:

执行

适用场景

  • ONTAP 9
  • NFS
  • CIFS
  • 负载共享镜像(LS镜像或LSM)

问题解答

是的、如果此后未手动或按计划更新新创建的CIFS共享和NFS导出、则可能会受到ls镜像的影响 、如 以下 内容所述:无法从NAS协议访问新创建的或已关闭的卷

CIFS
  • 从客户端访问新共享会导致显示以下错误消息:

Windows cannot access <share>. Check the spelling of the name. Otherwise, there might be a problem with your network. To try and identify and resolve network problems, click Diagnose.

  • "查看详细信息"显示:

Error code: 0x80070035
The network path was not found

  • 此时将显示数据包跟踪  Error: STATUS_BAD_NETWORK_NAME

添加新卷时、LS镜像如何影响NAS访问

NFS
  • 对于NFS、新创建的导出nfs1在客户端上不可见。

Cluster::> volume show -vserver vs_nfs -volume nfs1 -fields junction-path 
vserver volume junction-path
------- ------ -------------
vs_nfs  nfs1   /nfs1

  • 从客户端:

-bash-3.00# mount -F nfs -o vers=3 10.128.141.122:/nfs1 /mnt/nfs1
nfs mount: 10.128.141.122:/nfs1: No such file or directory
-bash-3.00# mount -F nfs -o vers=3 10.128.141.122:/ /mnt/vs_root
-bash-3.00# cd /mnt/vs_root
-bash-3.00# ls
automount  test.txt   vol_nfs

注:此处未列出nfs1。

说明

  • 在这两种情况下、根挂载点(/)均为LS镜像:

cm2244a-cn::> snapmirror show
Source              Destination  Mirror        Relationship  Total
Path          Type  Path         State         Status        Progress   Healthy
------------- ---- ------------ ------------- -------------- ---------- -------
cm2244a-cn://vs_cifs/vs2_root
              LS  cm2244a-cn://vs_cifs/vs2_root_ls
                                Snapmirrored  Idle           -          true
cm2244a-cn://vs_nfs/vs_nfs_root
              LS   cm2244a-cn://vs_nfs/vs_nfs_root_ls
                                Snapmirrored  Idle           -          true

注: 

  • cm2244a-cn://vs_cifs/vs2_root 是源路径
  • cm2244a-cn://vs_cifs/vs2_root_ls 是目标路径
  • 当客户端使用NAS访问卷时、它会利用文件句柄。ONTAP中的文件句柄是MSID。
    • 每个卷都有一个唯一的MSID、而LS镜像卷共享同一个MSID。

Cluster::> volume show -vserver vs_nfs -fields msid                    
vserver volume    msid      
------- --------- ----------
vs_nfs  automount 2147484731
vs_nfs  nfs1      2147484763
vs_nfs  nfs2      2147484764
vs_nfs  nfs3      2147484765
vs_nfs  nfs4      2147484766
vs_nfs  vol_nfs   2147484685
vs_nfs  vs_nfs_root 2147484684
vs_nfs  vs_nfs_root_ls 2147484684

  • 当文件访问LS镜像集中的卷时、它将使用MSID。
    • 此请求将进入集群、VLDB将检查该MSID。
    • 由于多个卷具有相同的MSID、因此MSID会通过VLDB调用解析为数据集ID (DSID)。
    • DSID对于集群中的每个卷都是唯一的、与LS镜像无关:

cm2244a-cn::> volume show -vserver vs_nfs -fields dsid
vserver volume    dsid
------- --------- ----
vs_nfs  automount 1082
vs_nfs  nfs1      1111
vs_nfs  nfs2      1112
vs_nfs  nfs3      1113
vs_nfs  nfs4      1114
vs_nfs  vol_nfs   1037
vs_nfs  vs_nfs_root 1036
vs_nfs  vs_nfs_root_ls 1108

注意

  • 所有卷都挂载为/volname
  • 因此、数据访问会导致:Data Requests -->/ --> volname
  • 对于ONTAP、卷是一个目录或文件夹。
    • 创建 卷并将其挂载到/时、该卷会显示为集群和客户端的目录。
  • 当 读取或写入请求通过该路径进入节点的N刀片时:
    • N刀片式服务器首先确定是否存在需要访问的卷的任何LS镜像。
      • 如果该卷没有LS镜像、则读取请求将路由到R/W卷。
      • 如果卷具有LS镜像、则会优先使用与发出请求的N刀片相同节点上的LS镜像。
      • 如果该节点上没有LS镜像、则会选择另一节点的最新LS镜像。

注意:这就是新创建的卷不可见的原因: 因为在LS镜像更新之前、所有请求都会转到LS镜像目标卷、该卷为只读卷。

示例:

-bash-3.00# mount -F nfs -o vers=3 10.128.141.122:/ /mnt/vs_root
-bash-3.00# cd /mnt/vs_root
-bash-3.00# ls
automount  test.txt   vol_nfs  

  • 更新LS镜像后:

Cluster::> snapmirror update-ls-set -S //vs_nfs/vs_nfs_root
8.3 command
Cluster::> snapmirror update-ls-set -source-path cm2244a-cn://vs_cifs/vs2_root

  • 现在可以看到并访问:

-bash-3.00# ls
automount  nfs1 test.txt vol_nfs

  • 或者、在尝试通过.admin访问时、VLDB会将请求发送到源卷的DSID、以允许写入访问。
    • 对于NFS、请指定.admin 路径

      -bash-3.00# mount -F nfs -o vers=3 10.128.141.122:/.admin /mnt/vs_root
      -bash-3.00# cd /mnt/vs_root
      -bash-3.00#ls
      automount  nfs1  test.txt   vol_nfs

    • 对于CIFS、区别不在于访问共享的方式、而在于访问共享共享。
      • 如果为.admin 路径创建了共享、则使用该共享将发生原因使客户端始终拥有读/写访问权限

Cluster::> vserver cifs share create -vserver vs_cifs -share-name vs2_root_rw -path /.admin

  • 如果创建了另一个新卷"cifs4"、但在该卷上创建了CIFS共享、而未手动更新LS镜像:

cluster::> volume show -vserver vs_cifs -fields junction-path

vserver volume junction-path
------- ------ -------------
vs_cifs cifs4  /cifs4

 

  • 仍然无法访问。

s镜像目标卷

  • 但是、它是可见的、可从.admin 路径访问。

添加新卷时、LS镜像会影响NAS访问

  • 为了防止由此引起的任何潜在混淆、系统将显示一条警告、提醒用户在创建卷后更新LS镜像。

示例:                                 

Cluster::> volume create -vserver vs_nfs -volume nfs2 -aggregate aggr0 -state online -junction-path /nfs2
    Warning: You are about to create a volume on a root aggregate.  This may cause severe performance or stability problems
    and therefore is not recommended. Do you want to proceed? {y|n}: y

    [Job 3074] Job succeeded: Successful 

    Notice: Volume nfs2 now has a mount point from volume vs_nfs_root.  The load sharing (LS) mirrors of volume vs_nfs_root
    are scheduled to be updated at 9/28/2013 07:05:00.  Volume nfs2 will not be visible in the global namespace until
    the LS mirrors of volume vs_nfs_root have been updated.

注意:如果新卷是从旧版本的System Manager创建的、则不会显示此警告

追加信息

LS镜像可能已关闭、这是因为 在创建 新共享后、通过文件资源管理器检查共享的属性时、安全选项卡缺失。

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.