如何在NetApp 7-模式存储控制器上设置Widelink并对其进行故障排除
适用场景
- 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)和要包含目标文件的qtree (/vol/widelink/temp/restore)。
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、在将包含符号链接的共享中启用对widelink的支持:
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
- 现在、将一些数据放在目标(temP_restore 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
- 首先挂载目录
- 编辑symlink.Translations。
/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
。目标位置将为on filer2:/vol/destination
。
首先创建qtrees和卷、然后创建目标目录、如下所示:qtree[k|m|g|t]filer2> vol create destination
<hosting-aggr-name> <size>- 创建共享和导出
- 为其创建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共享。
- 编辑symlink.Translations。
编辑/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共享输出、然后验证共享路径是否已启用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
everyone / Full Control
如果共享未显示"widelink 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
... 支持widelinkeveryone / 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无法理解符号链接/Widelink。唯一/my_cifs_link/
需要证明的情况是、最终用户也将使用UNIX通过符号链接访问数据。因此、该/my_cifs_link/
值可以是您希望在100% Windows环境中实现的任何值。 - 从源文件管理器收集/etc/symlink.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、因此有时对符号链接或符号链接.Translations文件进行的更改可能无法立即生效。默认情况下、DFS转介的超时值为10分钟。要手动清除缓存、请下载DDSutil、它是Microsoft支持工具的一部分。下载后,通过运行
pktflush
和刷新DFS缓存purgemupcache
:
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解决NetApp文件管理器上的Microsoft客户端权限问题一文。
如果在验证配置以及与远程位置的连接后遍历widelink仍失败、请创建支持案例并提供以下数据:- 触发AutoSupport
Filer1*> options autosupport.doit now
- 收集CIFS共享输出
Filer1*> cifs shares
- 收集symlink.Translations输出
Filer1*> rdfile /etc/symlink.translations
- 收集符号链接的ls -al输出
Unix> ls -al
- 触发AutoSupport
追加信息
其他信息文本