TSM单驱动器磁带回收测试记录
测试环境:
1. win 2003 + TSM rver 5.3.2
2. centos 4.4 + TSM client 5.3.0
3. HP Dat 40 磁带机
4. HP DDS4 磁带
测试描述:
在win2003上安装tsm 的rver 端.在centos4.4
上安装client端.在rver端定义一个DISK存储池diskpool,一个磁带存储池testpool,然后在client端重复备份一个比
较大的文件,使一盘磁带的使用率达到100%.然后再定义一个disk存储池huishoupool,将testpool的回收池设置为
huishoupool,将huishoupool的nextpool设置为testpool.
设置完成后,使用q vol tapename f=d查看磁带详细情况. 有一项”Pct. Reclaimable
Space:”标识出,此盘磁带有多少可回收空间,在此之前,可以使用exp
in命令来启动过期进程,即让TSM来判断有那些备份版本已经过期,可以从磁带上删除,退出所占用的空间.
查看过可回收空间后,如果超过了60%,并且设置好了回收池.则TSM会自动开始回收,如果没有设置回收池,TSM不会启动回收进程.如果可回收空间不到
60%,但却有回收需求,可手动upd 存储池,通过查看q stg stgpoolname f=d的”Pct. Reclaimable
Space:”选项查看修改是否成功.
当某盘磁带的可回收空间比已经达到此磁带所属存储池的设置后,TSM开始回收进程,此进程无需人工干预,但需要注意控制台(dsmadmc –con)中的消息提示,适时按要求的插入磁带之类的东西.
回收进程结束后,可通过q vol命令查看回收结果.并需要通过upd stg huishoupool hig=00 low=00命令来将回收池中的数据迁移回testpool,完成后,可以删除掉回收池,避免浪费磁盘空间.
测试细节:
1. 存储池,卷,磁带的详细信息:
存储池大致信息
tsm:H001386-OEQ>q stg
Storage Device Estimated Pct Pct High Low Next Stora-
Pool Name Class Name Capacity Util Migr Mig Mig ge Pool
Pct Pct
----------- ---------- ---------- ----- ----- ---- --- -----------
ARCHIVEPOOL DISK 0.0 M 0.0 0.0 90 70 FILPOOL1
BACKUPPOOL DISK 0.0 M 0.0 0.0 90 70 FILPOOL1
DISKPOOL DISK 3 G 67.8 67.8 90 70 TESTPOOL
FILPOOL1 FILEDEV1 0.0 M 0.0 0.0 90 70
SPACEMGPOOL DISK 0.0 M 0.0 0.0 90 70
TESTPOOL TESTDEVCL- 41 G 64.6 100.0 90 70
ASS
磁带大致信息
tsm:H001386-OEQ>q vol
Volume Name Storage Device Estimated Pct Volume
Pool Name Class Name Capacity Util Status
------------------------ ----------- ---------- --------- ----- --------
D:\DISKPOOL DISKPOOL DISK 3,000.
0 67.8 On-Line
TSM1 TESTPOOL TESTDEVCL- 40,960.0 64.6 Filling
存储池testpool详细信息:
tsm:H001386-OEQ>q stg testpool f=d
Storage Pool Name: TESTPOOL
Storage Pool Type: Primary
Device Class Name: TESTDEVCLASS
Estimated Capacity: 41 G
Space Trigger Util:
Pct Util: 64.6
Pct Migr: 100.0
Pct Logical: 100.0
High Mig Pct: 90
Low Mig Pct: 70
Migration Delay: 0
Migration Continue: Yes
Migration Process: 1
Reclamation Process: 1
Next Storage Pool: (指定此存储池的下一个存储池)
Reclaim Storage Pool: (指定此存储池的对应回收池)
Maximum Size Threshold: No Limit
Access: Read/Write
Description:
Overflow Location:
Cache Migrated Files?:
Collocate?: Group
Reclamation Threshold: 60 (指定此存储池的回收设定值)
Offsite Reclamation Limit:
Maximum Scratch Volumes Allowed: 0
Number of Scratch Volumes Ud: 0
Delay Period for Volume Reu: 0 Day(s)
Migration in Progress?: No
Amount Migrated (MB): 0.00
Elapd Migration Time (conds): 0
Reclamation in Progress?: No
Last Update by (administrator): ADMIN
Last Update Date/Time: 2008-10-22 10:09:06
Storage Pool Data Format: Native
Copy Storage Pool(s):
Continue Copy on Error?:
CRC Data: No
Reclamation Type: Threshold
磁带tsm1的详细信息:
tsm:H001386-OEQ>q vol tsm1 f=d
Volume Name: TSM1
Storage Pool Name: TESTPOOL
Device Class Name: TESTDEVCLASS
Estimated Capacity: 40,960.0
Scaled Capacity Applied:
Pct Util: 69.6 (磁带当前使用率)
Volume Status: Filling
Access: Read/Write
Pct. Reclaimable Space: 0.0 (磁带可回收空间比) 刘寄奴
Scratch Volume?: No
In Error State?: No
Number of Writable Sides: 1
Number of Times Mounted: 17
Write Pass Number: 1
Approx. Date Last Written: 2008-10-22 14:22:07
Approx. Date Last Read: 2008-10-22 10:36:41
Date Became Pending:
Number of Write Errors: 0
Number of Read Errors: 0
Volume Location:
Volume is MVS Lanfree Capable : No
乱了流年
Last Update by (administrator): ADMIN
山东大学专业排名Last Update Date/Time: 2008-10-22 10:11:29
Begin Reclaim Period:
End Reclaim Period:
2. 回收过程
当TSM1磁带填满之后,q vol显示使用率达到100%,状态FULL,但这其中大部分都是已经过期的备份版本,这些过期的版本所占用的空间可以被释放出来,并回收,使用如下命令来手动过期:
Expi in
在tsm 5.3.2 中,TSM在默认情况下,每24分钟自动执行一次过期处理,所以在实际生产环境中,这一点不需要太多关注.
过期之后,查看磁带tsm1的详细情况如下:
tsm:H001386-OEQ>q vol tsm1 f=d
Volume Name: TSM1
Storage Pool Name: TESTPOOL
Device Class Name: TESTDEVC
LASS
Estimated Capacity: 34,906.0
Scaled Capacity Applied:
Pct Util: 23.6 (使用率只有23.6,但是状态却满了,这是TSM中经常
Volume Status: Full 看到的情况,说明有空间可以回收了)
Access: Read/Write
Pct. Reclaimable Space: 76.4 (可回收空间的百分比)
Scratch Volume?: No
In Error State?: No
Number of Writable Sides: 1
Number of Times Mounted: 22
Write Pass Number: 1
Approx. Date Last Written: 2008-10-22 15:04:52
Approx. Date Last Read: 2008-10-22 10:36:41
Date Became Pending:
Number of Write Errors: 0
Number of Read Errors: 0
Volume Location:
Volume is MVS Lanfree Capable : No
Last Update by (administrator): ADMIN
Last Update Date/Time: 2008-10-22 10:11:29
Begin Reclaim Period:
End Reclaim Period:
可以看到,这个磁带有76.4 的空间可以回收,超过了默认的60%的回收设置值,因此,下面可以开始定义回收池了
在定义回收池之前,先定义一个回收池专用设备类,主要是为了好看,条理清楚:
Def devclass huishoulei devtype=file dir=d:\temp
之后定义一个回收池,
Def stg huishoupool huishoulei maxscratch=10
这里的10是指在回收过程中,回收池可以使用多少个临时的文件类型的卷,也就是在磁盘上建立一个临时文件,每个文件的默认大小是2G.,这个设置是与上面定义的文件设备类相关,不是与存储池相关.定义了10个卷,也就是说,回收过程中,最大使用20G的空间.
开始设置testpool和huishoupool的层级关系:
upd stg testpool reclaimstgpool=huishoupool
upd stg huishoupool nextpool=testpool
至此,回收正式开始,在dsmadmc –con这个控制台中显示如下信息:
ANR0984I Process 11 for SPACE RECLAMATION started in the BACKGROUND at
15:21:14.
ANR4930I Reclamation process 11 started for primary storage pool TESTPOOL
automatically, threshold=60, duration=None.
ANR1040I Space reclamation started for volume TSM1, storage pool TESTPOOL
(process number 11).
ANR1044I Removable volume TSM1 is required for space reclamation.
ANR1176I Moving data for collocation t 1 of 2 on volume TSM1.
ANR8340I FILE volume D:\TEMP\00000006.BFS mounted.
ANR1340I Scratch volume D:\TEMP\00000006.BFS is now defined in storage pool 不会画眉毛怎么办
HUISHOUPOOL.
ANR0513I Process 11 opened output volume D:\TEMP\00000006.BFS.
ANR8336I Verifying label of 4MM volume TSM2 in drive TESTDRIVE (mt3.0.0.2).
ANR8468I 4MM volume TSM2 dismounted from drive TESTDRIVE (mt3.0.0.2) in library
TESTLIBR.
ANR8326I 005: Mount 4MM volume TSM1 R/O in drive TESTDRIVE (mt3.0.0.2) of
library TESTLIBR within 60 minutes.
此时,q pro会有如下显示:
tsm:H001386-OEQ>q pro
Process Process Description Status
Number
华为路由器管理
-------- -------------------- -------------------------------------------------
11 Space Reclamation Volume TSM1 (storage pool TESTPOOL), Moved Files:
0, Moved Bytes: 0, Unreadable Files: 0,
Unreadable Bytes: 0. Current Physical File
(bytes): 3,148,808,168 Current input volume:
TSM1. Current output volume:
D:\TEMP\00000006.BFS.
并且,在定义文件设备类的时候指定的d盘temp文件夹中多出来一个文件00000006.bfs,这就是TSM用来回收的临时卷文件.随着回收的继续,这些文件会不断加大,并且会增加N个这样的文件,直到达到设定的最大值.
迁移完成后,显示如下:
ANR1041I Space reclamation ended for volume TSM1.
ANR4932I Reclamation process 11 ended for storage pool TESTPOOL.
ANR0986I Process 11 for SPACE RECLAMATION running in the BACKGROUND procesd
16 items for a total of 8,654,369,819 bytes with a completion state of SUCCESS
at 15:51:36.
ANR4936I Reclamation of
storage pool TESTPOOL has ended. Files reclaimed: 16,
Bytes reclaimed: 8654369819, Files reconstructed: 0, Unreadable files: 0.
此时,q vol如下:
tsm:H001386-OEQ>q vol
Volume Name Storage Device Estimated Pct Volume
Pool Name Class Name Capacity Util Status
------------------------ ----------- ---------- --------- ----- -------- 舒服的近义词是什么
D:\DISKPOOL DISKPOOL DISK 3,000.0 0.0 On-Line
D:\TEMP\00000006.BFS HUISHOUPOOL HUISHOULEI 2,047.6 100.0 Full
D:\TEMP\00000007.BFS HUISHOUPOOL HUISHOULEI 2,048.0 55.6 Filling
欠款协议书
D:\TEMP\00000008.BFS HUISHOUPOOL HUISHOULEI 2,047.4 100.0 Full
D:\TEMP\00000009.BFS HUISHOUPOOL HUISHOULEI 2,047.5 100.0 Full
D:\TEMP\0000000A.BFS HUISHOUPOOL HUISHOULEI 2,048.0 47.4 Filling
TSM1 TESTPOOL TESTDEVCL- 0.0 0.0 Empty
ASS
TSM2 TESTPOOL TESTDEVCL- 0.0 0.0 Empty
ASS
可以看到,tsm1的使用率变成了0,状态为empty,这说明,这盘磁带可以重复使用了.同时,多出来一些临时卷,所有迁移的数据都在这些临时卷里,下一步的动作就是把这些数据迁移会testpool里面,如下:
Upd stg huishoupool hig=00 low=00
清炒荷兰豆
迁移完成后,这些临时卷都会自动消失,数据全部转移回到testpool存储池,在此次测试中,数据又重新回到tsm1这个磁带,但磁带还可以继续使用,不想回收之前,使用率才20多,状态却是full.到此,一次单驱动器的磁带回收圆满完成.
完成迁移之后,可以删除掉huishoupool这个回收池,以避免TSM自动开始回收,影响某些业务,需要回收时再定义一次即可,基本上,回收不是经常需要运行的,可以手动进行.