跳转到主内容

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

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

可不使用  

适用场景

  • ONTAP 9
  • NFS
  • CIFS
  • LS mirror

问题解答

  • 为什么NFS或CIFS客户端无法立即访问新创建的卷、即使这些卷稍后在下一个计划的LS镜像完成后可以访问?
  • LS镜像可能已关闭的一个标志是、在创建新共享后、通过文件资源管理 器检查共享的属性时、缺少安全性选项卡。
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

1001193_1.png

 

NFS

对于 NFS 、新创建的导出甚至不可见。

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 <~~~Source Path

              LS <~Type  cm2244a-cn://vs_cifs/vs2_root_ls <~~ Destination Path

                                Snapmirrored  Idle           -          true

cm2244a-cn://vs_nfs/vs_nfs_root

              LS   cm2244a-cn://vs_nfs/vs_nfs_root_ls

                                Snapmirrored  Idle           -          true

手动 LS 镜像更新或下一个计划的 LS 镜像更新后、 NFS 和 CIFS 访问都可以正常工作。

当客户机使用 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 )。不管 LS 镜像如何、 DSID 对于集群中的每个卷都是唯一的:

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

对于集群来说、卷是一个文件夹。在创建卷并将其装入 / 时、卷将显示为集群和客户端的文件夹。

读取或写入请求通过该路径进入节点的 N-Blade 、 N-Blade 首先确定是否有需要访问的卷的 LS 镜像。如果该卷没有 LS 镜像、读取请求将被路由到 R/W 卷。如果卷具有 LS 镜像、则会优先选择在发送请求的 N-Blade 所在的同一节点上的 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路径创建了共享、则使用该共享将导致客户端始终具有 R/W 访问权限

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

如果创建了另一个新卷“ CIFS 4 ”并且在该卷上创建了 CIFS 共享而不手动更新 LS 镜像:

cm2244a-cn::> volume show -vserver vs_cifs -fields junction-path

vserver volume junction-path

vs_cifs cifs4  /cifs4

仍无法访问。

1001193_2.png

但是,它可以从.admin路径中看到和访问。

1001193_3.png

为了防止由此引起的任何潜在混淆、将显示一条警告、提醒用户在创建卷后更新 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 创建新卷,则不会显示此警告

追加信息

不适用

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.
Scan to view the article on your device