跳过导航链接 | |
退出打印视图 | |
Sun Storage Archive Manager 5.3 配置和管理指南 Sun QFS and Sun Storage Archive Manager 5.3 Information Library (简体中文) |
如果要回收库中卡盒上的归档副本,请创建 recycler.cmd 文件。
如果要按归档集回收,请在 recycler.cmd 文件中配置每个库。这可以确保回收程序能够回收不属于归档集的 VSN(如有必要)。
创建一个 recycler.sh 文件完成该操作。
recycler.cmd 文件包含常规回收指令。它还可包含针对 SAM-QFS 环境中的每个库的指令。典型的 recycler.cmd 文件中包含以下指令行:
logfile= 指令用于指定回收程序日志文件。
针对每个含有待回收卷的库的一个或多个指令。该指令行必须包含要回收的库的系列集名(来自 mcf 文件)。系列集名使回收程序可以识别库。
测试期间,加入 ignore 关键字。以后再删除 ignore 关键字。
作为 root 用户,将一个或多个指令添加到 /etc/opt/SUNWsamfs/recycler.cmd 文件。
另外,可使用 SAM-QFS Manager 软件创建一个 recycler.cmd 文件。有关更多信息,请参见 SAM-QFS Manager 联机帮助。
示例 16-1 recycler.cmd 文件样例
logfile = /usr/tmp/recycler.log stk30 -hwm 51 -mingain 60 -ignore -mail root
recycler.cmd 文件可以接受以下各节介绍的指令:
logfile 指令用于创建回收程序日志文件。此指令的格式如下:
logfile = filename
其中的 filename,用于指定日志文件的路径。
以下是 logfile= 指令行的一个示例:
logfile=/var/adm/recycler.log
示例 16-2 可移除介质卡盒的回收程序日志文件样例
以下示例显示了回收可移除介质卡盒时的回收程序日志文件样例。
========== Recycler begins at Wed Dec 12 14:05:21 2001 =========== Initial 2 catalogs: 0 Family: m160 Path: /var/opt/SUNWsamfs/catalog/m160 Vendor: ADIC Product: Scalar 100 SLOT ty capacity space vsn 0 at 25.0G 25.0G CLN005 1 at 48.5G 6.1G 000003 2 at 48.5G 32.1G 000004 3 at 48.5G 35.1G 000005 4 at 48.5G 44.6G 000044 5 at 48.5G 45.1G 000002 6 at 48.5G 45.9G 000033 7 at 48.5G 48.5G 000001 Total Capacity: 364.8G bytes, Total Space Available: 282.3G bytes Volume utilization 22%, high 95% VSN_min 50% Recycling is ignored on this robot. 1 Family: hy Path: /var/opt/SUNWsamfs/catalog/historian Vendor: Sun SAM-FS Product: Historian SLOT ty capacity space vsn (no VSNs in this media changer) Total Capacity: 0 bytes, Total Space Available: 0 bytes Volume utilization 0%, high 95% VSN_min 50% Recycling is ignored on this robot. 8 VSNs: ---Archives--- -----Percent----- m160 ----Status----- Count Bytes Use Obsolete Free Library:Type:VSN no-data VSN 0 0 0 87 13 m160:at:000003 no-data VSN 0 0 0 33 67 m160:at:000004 no-data VSN 0 0 0 27 73 m160:at:000005 no-data VSN 0 0 0 8 92 m160:at:000044 no-data VSN 0 0 0 7 93 m160:at:000002 no-data VSN 0 0 0 5 95 m160:at:000033 empty VSN 0 0 0 0 100 m160:at:CLN005 empty VSN 0 0 0 0 100 m160:at:000001 Recycler finished. ========== Recycler ends at Wed Dec 12 14:05:32 2001 ===========
no_recycle 指令禁用卷回收。此指令的格式如下:
no_recycle media-type VSN-regexP [VSN-regexP...]
|
以下示例排除了 VSN 标识符以 DLT 开头的所有磁带卷:
no_recycle lt DLT.*
库指令可用于为那些与特定库关联的 VSN 指定各种不同的回收参数。此指令的格式如下:
library parameter [parameter...]
其中的 library 用于指定库名称,该名称与在 mcf 文件的系列集字段中指定的名称相同。
而其中的 parameter,用于指定一个或多个以空格分隔的 parameter 关键字(见下表)。
|
示例 16-3 library 指令
下面的示例为库 gr47 指定了以下内容:
当库中卷的占用率达到 85% 时,将对库执行回收操作。
最小增益百分比为 40%。
只能回收一个卷。这也是一个默认设置。
将回收消息发送至 root 用户。
要重新归档的数据不超过 1 GB。该值是默认值,因此未在 recycler.cmd 文件中指定。
gr47 -hwm 85 -ignore -mail root -mingain 40
以下几节将介绍这些参数。
通过指定上限,可设置介质使用率百分比,低于此百分比时便无法进行回收。此百分比是指库中已用空间与总容量的比率。例如,某个库含有 10 个 20 GB 的磁带,其中三个磁带的利用率为 100%,另外七个磁带的利用率均为 30%,则介质利用率为:
((3* 1.00 + 7 * 0.30) * 20G ) / ( 10 * 20G ) * 100%= 51%
该计算方法并不区分当前数据和过期数据,它只考虑使用的介质量。
在本示例中,如果空间利用率为 51% 或更小,回收程序不会自动选择自动化库的任何 VSN 进行回收。
通过使用以下命令设置回收标志可强制回收 VSN:
# chmed +c lt. VSN
设置 +c 标志后,归档程序不会再向卷中写入任何归档映像。可以通过 samu 实用程序来查看 +c 标志。有关更多信息,请参见《Sun QFS and Sun Storage Archive Manager 5.3 Reference Manual》中的"chmed(1M)"和《Sun QFS and Sun Storage Archive Manager 5.3 Reference Manual》中的"samu(1M)"。有关使用 samu(1M) 操作员实用程序的信息,请参见《Sun QFS 文件系统 5.3 配置和管理指南》。
最小 VSN 增益百分比用于设置通过回收卡盒所获得的空间增加量的下限。例如,如果自动化库某个卡盒中当前数据占用 95% 的空间,可用空间为 5%,则将最小增益设置为 6% 或更大可禁止回收程序自动选择此 VSN。
-ignore 参数可禁止回收程序回收某个特定库。在配置及测试回收程序时,请使用此参数。
-mail 参数指定回收程序在回收某个库时发送电子邮件。电子邮件的主题行如下所示:
Robot robot-name recycle
示例 16-4 回收消息样例
I will recycle VSN vsn. Cannot find any candidate VSN in this media changer. Previously selected VSN _vsn_ is not yet finished recycling. Previously selected VSN _vsn_ is now finished recycling. It will now be post-recycled.
如果要归档至可移除介质卡盒,请创建一个 recycler.sh 文件。
如果只将文件归档至磁盘,则请勿执行本步骤。
针对已回收卡盒确定站点策略。某些站点重新标记并重新使用卡盒;而某些站点从自动化库中取出卡盒以便将来用于访问历史文件。
在将 VSN 中的所有当前映像重新归档至另一个 VSN 后,回收程序将执行 recycler.sh 脚本。
回收程序使用以下参数调用 /opt/SUNWsamfs/scripts/recycler.sh 脚本:
Media type: $1 VSN: $2 Slot: $3 Eq: $4
有关脚本的示例,请参见《Sun QFS and Sun Storage Archive Manager 5.3 Reference Manual》中的"recycler.sh(1M)"或查看 /opt/SUNWsamfs/examples/recycler.sh 脚本,其中显示如何重新标记已回收 VSN 及如何向超级用户发送邮件。