跳转到主内容

NFS 客户端无法查看目录中的文件

Views:
63
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
nfs
Last Updated:

适用于

  • ONTAP 9
  • NFSv3
  • NFSv4
  • FlexGroup 卷

问题

  • 使用非 Solaris 操作系统模式的 NFS 客户端无法查看目录中的文件。
  • Solaris 将文件索引节点显示为 0
  • 由于包含不可见文件而无法删除的空目录(客户端不显示该文件,即使使用 "ls -la" 也是如此)

示例

1) CentOS Linux release 7.6.1810 (Core) doesn't show the file link_file.sv
user1@centos:~ % ls /tmp/vol9/aa/bb/cc/dd/ee/fff/gg/folder
user1@centos:~ % df /tmp/vol9/aa/bb/cc/dd/ee/fff/gg/folder
Filesystem                1K-blocks     Used   Available Use% Mounted on
fs2:/vol9/aaa 41943040064 22924518144 19018521920  55% /tmp/vol9
user1@centos:~ % uname -a
Linux us01ites08 3.10.0-862.3.3.el7.x86_64 #1 SMP Fri Jun 15 04:15:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
user1@centos:~ % cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)

2) Red Hat Enterprise Linux Workstation release 6.7 (Santiago) doesn't show the file link_file.sv
user1@rhel:~ %  ls /vol9/aa/bb/cc/dd/ee/fff/gg/folder
user1@rhel:~ % ls -la /vol9/aa/bb/cc/dd/ee/fff/gg/folder
total 8
drwxr-xr-x. 2 sam nas 4096 Jul  9 00:19 .
drwxr-xr-x. 3 sam nas 4096 Jul  9 00:19 ..
user1@rhel:~ % uname -a
Linux us01nasadmin3 2.6.32-696.20.1.el6.x86_64 #1 SMP Fri Jan 12 15:07:59 EST 2018 x86_64 x86_64 x86_64 GNU/Linux
user1@rhel:~ % cat /etc/redhat-release
Red Hat Enterprise Linux Workstation release 6.7 (Santiago)

3) From Solaris it shows fileid as 0 for file link_file.sv and it is visible
bash-2.03# ls -li /vol9/aa/bb/cc/dd/ee/fff/gg/folder
total 8
0 lrwxrwxrwx   1 sam   nas    101 Jul  8 23:18 link_file.sv -> /tmp/vol5/xxx/yyy/zzz/sss/rrr/ddd/folder/link_file.sv

  • file-directory show 命令失败:

::*> vserver security file-directory show -vserver vs1 -path  /vol9/aa/bb/cc/dd/ee/fff/gg/folder/link_file.sv
Error: show failed: The specified path "/vol9/aa/bb/cc/dd/ee/fff/gg/folder/link_file.sv" cannot be used. 
Reason: No such file or directory.

 

  • 节点 Shell 显示的文件索引节点正确:

::*> node run -node node1 -command ls -li  /vol/vol9/aa/bb/cc/dd/ee/fff/gg/folder
d-rwxr-xr-x     1858   10690121    2        4096     Wed Aug  5 04:34:54 PDT 2020    .
d-rwxr-xr-x     1840      96    8        4096     Wed Aug  5 23:30:04 PDT 2020    ..
 -rwxrwxrwx     1858   9042433   1        101     Wed Jul  8 23:18:02 PDT 2020   link_file.sv

 

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

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.