如何在 NetApp 存储控制器上设置和排除 Widelinks 故障
适用于
- Data ONTAP 8.2 7-模式
- Data ONTAP 8.1 7-模式
- Data ONTAP 8 7-模式
- Data ONTAP 7 及更早版本
解答
- 在同一个文件管理器上创建从卷到 qtree 的符号链接。
- 在不同的文件管理器上创建从卷到卷的符号链接。
- 设置 WideLink 时出现问题。
符号链接是由 NFS 客户端创建的一个指向另一个文件或目录的特殊文件。Widelink 条目是重定向文件管理器上的绝对符号链接的方法。它们允许符号链接目标是同一文件管理器或另一文件管理器上的共享。以下示例说明了如何在同一个文件管理器上创建从卷到 qtree 的符号链接、以及在不同文件管理器上从卷到卷的符号链接。
在同一个文件管理器上创建从卷到 qtree 的符号链接
- 创建包含符号链接( /vol/source )和包含目标文件( /vol/widelink/temp_restore )的 qtree 的卷。
filer1> vol create source <hosting-aggr-name><size>[k|m|g|t]
filer1> qtree create /vol/widelink/temp_restore
filer1> qtree status
Volume Tree Style Oplocks Status
-------- -------- ----- -------- ---------
vol0 unix enabled normal
widelink unix enabled normal
widelink temp_restore unix enabled normal
source unix enabled normal
- 共享 CIFS 客户端的 qtree 、在包含符号链接的共享中启用对 Widelinks 的支持:
filer1> cifs shares -add temp_restore /vol/widelink/temp_restore
The share name 'temp_restore' will not be accessible by some MS-DOS workstations
Are you sure you want to use this share name? [n]:y
filer1> cifs shares -add source /vol/source -widelink
filer1> cifs shares
Name Mount Point Description
---- ----------- -----------
HOME /vol/vol0/home
everyone / Full Control
ETC$ /vol/vol0/etc Remote Administration
everyone / Full Control
C$ /vol/vol0 Remote Administration
everyone / Full Control
temp_restore /vol/widelink/temp_restore
everyone / Full Control
source /vol/source
... widelinks supported
everyone / Full Control
Note: Enable widelink support on the CIFS share hosting the symlink.
- 创建符号链接。使用 UNIX 客户端创建目标文件并创建将用于指向该文件的符号链接。
- 从挂载目录开始
Unix> mount filer1:/vol/widelink /filer1/widelink
Unix> mount filer1:/vol/source /filer1/source
- 现在,将一些数据放在目标上(临时恢复 qtree ) ...
Unix> cp /etc/init.d/apache /filer1/widelink/temp_restore/
- 验证数据是否在目标中可用:
Unix> ls -l /filer1/widelink/temp_restore/
total 8
-rwxr-xr-x 1 root other 687 Oct 21 22:15 apache
- 创建指向
/filer1/source
目录的符号链接/filer1/widelink/temp_restore...
Note: The syntax is: ln -s <TARGET><LINK_NAME>
Unix> ln -s /filer1/widelink/temp_restore/ /filer1/source/symlink
- 验证符号链接是否存在:
Unix> pwd
/filer1/source
Unix> ls -l
total 0
lrwxrwxrwx 1 root other 29 Oct 21 22:18 symlink -> /filer1/widelink/temp_restore
- 如果存在符号链接、请确保其工作正常:
Unix> pwd
/filer1/source
Unix> cd symlink/
Unix> ls -la
total 24
drwxrwxrwx 2 root root 4096 Oct 21 22:17 .
drwxr-xr-x 6 root root 4096 Oct 21 22:10 ..
-rwxr-xr-x 1 root other 687 Oct 21 22:15 apache
Unix>
以上输出显示/filer1/source
该目录中有一个指向该目录的链接(符号链接)/filer1/widelink/temp_restore
- 从挂载目录开始
- 编辑符号链接翻译。
- 使用
/vol/vol0/etc/
vi 或 wrfile 在文件管理器的文件夹中创建 symlink.translations 。
# vi /filer1/vol0/etc/symlink.translations
widelink /filer1/widelink/temp_restore/* \\<IP_ADDRESS_OR_HOST_NAME>\temp_restore\*
在上面的示例中, ""<IP_ADDRESS_OR_HOST_NAME> 将是承载目标共享的 CIFS 服务器的 IP 地址或主机名。
使用星号( "*" )很重要。 如果您将其关闭、您将收到如下消息:
filer1> Thu Oct 21 22:36:13 PDT [cifs.symlinkTrans.badEntry:error]: CIFS: invalid entry in symbolic link mapping file /etc/symlink.translations at line 1: Switching to unoptimized lookup.
- 在 Windows 中将源映射到驱动器。
注意:这可以在卷之间实现。如果/vol/source
是 qtree ,/vol/widelinks
它将会发挥同样的作用。
- 使用
在不同的文件管理器上创建从卷到卷的符号链接
本示例中的源目录仍然存在/filer1/source
。目标将打开filer2:/vol/destination
。
- 首先创建 qtree 和卷
、创建目标目录,如下所示:
filer2> vol create destination
<hosting-aggr-name><size>[k|m|g|t] - 创建份额和导出
- 为其创建 CIFS 共享。
filer2> cifs shares -add destination /vol/destination
The share name 'destination' will not be accesible by some MS-DOS workstations
Are you sure you want to use this share name? [n]:y
filer2> - 验证目标目录是否存在,如下所示:
filer2> cifs shares
Name Mount Point Description
---- ----------- -----------
ETC$ /etc Remote Administration
BUILTINAdministrators / Full Control
HOME /vol/vol0/home Default Share
everyone / Full Control
C$ / Remote Administration
BUILTINAdministrators / Full Control
test /vol/vol0/test
everyone / Full Control
destination /vol/destination
everyone / Full Control
filer2> - 将其添加到导出文件中以便可以创建符号链接:
filer2> exportfs -io root=10.41.16.181 /vol/destination
filer2> exportfs
/vol/destination -root=puerco.hq.netapp.com
/vol/vol0
/vol/vol0/home
filer2> - 挂载目标目录。
Unix> mount
:/vol/destination /t/114
复制其中的文件以便您知道它在那里:
Unix> cp /etc/init.d/network /t/114/
Unix> ls -l /t/114
total 48
-rwxr--r-- 1 root other 20593 Oct 22 14:58 network
Unix> - 创建一个指向
/t/114
目录的新符号链接
Unix> ln -s /t/114 /filer1/source/symlink2
Unix>
- 验证它是否工作正常:
Unix> cd /filer1/source
Unix> ls -l
total 0
lrwxrwxrwx 1 root other 29 Oct 21 22:33 symlink -> /filer1/widelink/temp_restore
lrwxrwxrwx 1 root other 6 Oct 22 15:00 symlink2 -> /t/114
Unix> cd symlink2
Unix> ls -l
total 48
-rwxr--r-- 1 root other 20593 Oct 22 14:58 network
Unix>
- 为其创建 CIFS 共享。
- 编辑符号链接翻译。
编辑/etc/symlink.translations
此新 Widelink 的。
注:您不必删除以前为该符号链接创建的卷到同一文件管理器上的 qtree 。
widelink /filer1/widelink/temp_restore/* \\<filer1_IP_address>\temp_restore*
widelink /t/114/* \\<filer2_IP_address>\destination*
WideLink 故障排除:
Widelink 故障分为两类:
- 配置不正确
- 无法访问 Widelink 目标位置
配置不正确
应执行以下步骤以确认 WideLink 的配置。
- 从源文件管理器收集 CIFS 共享输出并验证共享路径是否启用了 Widelinks :
filer1> cifs shares
Name Mount Point Description
---- ----------- -----------
HOME /vol/vol0/home
everyone / Full Control
ETC$ /vol/vol0/etc Remote Administration
everyone / Full Control
C$ /vol/vol0 Remote Administration
everyone / Full Control
temp_restore /vol/vol1/temp_restore
everyone / Full Control
source /vol/source
everyone / Full Control
如果共享未显示 "Widelinks supported " 、 使用以下命令添加它:filer1> cifs shares -change source /vol/source -widelink
输出现在应如下所示:
filer1> cifs shares
Name Mount Point Description
---- ----------- -----------
HOME /vol/vol0/home
everyone / Full Control
ETC$ /vol/vol0/etc Remote Administration
everyone / Full Control
C$ /vol/vol0 Remote Administration
everyone / Full Control
temp_restore /vol/vol1/temp_restore
everyone / Full Control
source /vol/source
... widelinks supported
everyone / Full Control
- 收集
ls -al
一个 Widelink 路径:Unix> ls -al
total 1
drwxr-x--- 14 root root 4096 Aug 12 19:04 .
drwxrwxrwx 33 root root 4096 Mar 30 13:08 ..
lrwxrwxrwx 1 root root 9 Aug 12 19:04 mylink -> /my_cifs_link/
请务必注意,根据此配置、从 Windows 角度看、在工作时、它将看到一个名为“ mylink ”的文件夹。 由于/my_cifs_link/
Windows 不了解符号链接 /Widelinks ,因此该路径不必工作。只有/my_cifs_link/
当最终用户也将使用 UNIX 通过符号链接访问数据时,才需要设置可用的时间。因此/my_cifs_link/
,该值可以是您希望在 100% Windows 环境中实现的任何值。 - 从源文件管理器收集 /etc/symmlink.translations 输出:
Filer1*> rdfile /etc/symlink.translations
widelink /filer1/my_cifs_link/* \\10.61.84.180\vol1*
以上示例中的 Widelink 路径无效,应更改为以下内容:
widelink /my_cifs_link/* \\10.61.84.180\vol1*
- 由于 Widelink 实现使用 DFS 、因此有时可能会对 SymLink 或 SymLink.Translations 文件进行更改、但这些更改似乎不会立即生效。默认情况下, DFS 引用的超时值为 10 分钟。要手动清除缓存、请下载 DFSUTIL (它是 Microsoft 支持工具的一部分)。下载后、通过运行
pktflush
和purgemupcache
刷新 DFS 缓存:
C:\Windows\system32> dfsutil /pktflush
DfsUtil command completed successfully.
C:\Windows\system32> dfsutil /purgemupcache
DfsUtil command completed successfully.
验证配置后无法访问 Widelink 目标位置、排除 Widelink 故障的下一步是执行以下步骤验证 Widelink 目标访问:
- 收集
symlink.translations
文件:Filer1*> rdfile /etc/symlink.translations
widelink /my_cifs_link/* \\10.61.84.180\vol1*
此输出的一个重要字段是 \\10.61.84.180\VOL1*' - 从无法遍历 WideLink 的客户端中、让他们执行以下操作:
开始 > 运行 > \\10.61.84.180
这将验证他们是否可以实际访问存储控制器并成功进行身份验证。 - 如果第 2 步成功,请让用户导航到共享。如果此步骤失败,请参见文章 How to troubleshoot Microsoft Client permission problems on a NetApp Filer 。
如果在验证远程位置的配置和连接后遍历 WidelLink 仍然失败,请打开支持案例并提供以下数据:- 触发 AutoSupport
Filer1*> options autosupport.doit now
- 收集 CIFS 共享输出
Filer1*> cifs shares
- 收集 symlink.translations 输出
Filer1*> rdfile /etc/symlink.translations
- 收集符号链接的 ls -al 输出
Unix> ls -al
- 触发 AutoSupport
其他信息
附加信息 _text