メインコンテンツまでスキップ

NFS クライアントの「 ls -al 」出力に .snapshot ディレクトリが表示されないのはなぜですか。

Views:
906
Visibility:
Public
Votes:
1
Category:
ontap-9
Specialty:
nas
Last Updated:

環境

  • ONTAP 9
  • NFS

回答

  • 「 ls-la 」の出力に表示されるには、 .snapshot が true である必要があります。
  • Filer は NFSv3 経由でマウントする必要があります
  • NFSv4 では、 .snapshot ディレクトリは表示されません
  • .snapshot ただし、ディレクトリには NFSv4 経由でアクセスできます
  • ls -alコマンドは、のベースから実行する必要があります マウントポイント
  • Snapshot ディレクトリがボリュームで有効になっている必要があります
  • これは、ボリュームの snapdir-access フラグを使用して制御されます

Cluster::> volume show -volume nfs_vol -fields snapdir-access
vserver volume snapdir-access
------- ------- --------------
vserver nfs_vol true

  • v3-hide-snapshot オプションは無効にする必要があります
     
ONTAP 9.5 で導入されました


    Cluster::> vserver nfs show -vserver sinanju -fields v3-hide-snapshot
    vserver v3-hide-snapshot
    ------- ----------------
    vserver disabled

追加情報

  • 例:
    • NFSv3

[root@centos ~]# mount -t nfs -o vers=3 10.216.29.104:/nfs_vol /mnt/nfs3
[root@centos ~]# ls -al /mnt/nfs3
total 12
drwxrwxrwx. 2 root root 4096 Apr 17 2019 .
drwxr-xr-x. 43 root root 4096 Oct 17 16:16 ..
drwxrwxrwx. 12 root root 4096 Oct 17 16:05 .snapshot
-rw-r--r--. 1 root root 0 Apr 17 2019 test.log
[root@centos ~]# ls -al /mnt/nfs3/.snapshot
total 48
drwxrwxrwx. 12 root root 4096 Oct 17 19:05 .
drwxrwxrwx. 2 root root 4096 Apr 17 2019 ..
drwxrwxrwx. 2 root root 4096 Apr 17 2019 daily.2019-10-16_0010
drwxrwxrwx. 2 root root 4096 Apr 17 2019 daily.2019-10-17_0010
drwxrwxrwx. 2 root root 4096 Apr 17 2019 hourly.2019-10-17_1305

  • NFSv4
  • .snapshot ディレクトリは表示されませんが、引き続きアクセスできます。
  • VMwareなどの仮想化プラットフォームでも、このディレクトリは表示されません。

[root@centos ~]# mount -t nfs -o vers=4 10.216.29.104:/nfs_vol /mnt/nfs4
[root@centos ~]# ls -al /mnt/nfs4
total 8
drwxrwxrwx. 2 nobody nobody 4096 Apr 17 2019 .
drwxr-xr-x. 43 root root 4096 Oct 17 16:16 ..
-rw-r--r--. 1 nobody nobody 0 Apr 17 2019 test.log
[root@centos ~]# ls -al /mnt/nfs4/.snapshot
total 48
drwxrwxrwx. 12 nobody nobody 4096 Oct 17 18:05 .
drwxrwxrwx. 2 nobody nobody 4096 Apr 17 2019 ..
drwxrwxrwx. 2 nobody nobody 4096 Apr 17 2019 daily.2019-10-16_0010
drwxrwxrwx. 2 nobody nobody 4096 Apr 17 2019 daily.2019-10-17_0010
drwxrwxrwx. 2 nobody nobody 4096 Apr 17 2019 hourly.2019-10-17_1205

 

 

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.