如何在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
为。目标将位于上 filer2:/vol/destination
。
- 先创建qtree和卷
、然后按如下所示创建目标目录:filer2> vol create destination
<hosing-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共享。
- 编辑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
...支持Widelink
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的角度来看、在工作时会看到一个名为"ylink"的文件夹。 此路径/my_cifs_link/
不必工作、因为Windows不了解符号链接/ Widelink。唯一的时间/my_cifs_link/
必须是vaild、前提是最终用户也要使用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、因此、有时可能会对symlink或symlink.translations文件进行更改、但这些更改似乎无法立即生效。默认情况下、DFS转介的超时值为10分钟。要手动清除缓存、请下载DFSUtil、它是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 troubleshoot Microsoft Client permission problems on a NetApp Filer。
如果在验证配置以及与远程位置的连接后遍历Widelink仍失败、请创建支持案例并提供以下数据:- 触发AutoSupport
Filer1*> options autosupport.doit now
- 收集CIFS共享输出
Filer1*> cifs shares
- 收集symlink.translations输出
Filer1*> rdfile /etc/symlink.translations
- 收集符号链接的ls -al输出
Unix> ls -al
- 触发AutoSupport
追加信息
附加信息 _text