重建 spool 实现 tsm file 备份 (一个node 只能有一个domain)

来源:互联网 发布:集线器端口电涌解决 编辑:程序博客网 时间:2024/05/15 04:01

在家重建 spool 学习:
还是有一个 file restore 失败引起的:
发现磁带放的spool 不对,下面打算重建spool:

step1:
先建一个spool:
tsm: TSM_SVR1>define stgp ba_back lto3 maxscr=4  desc=" test for tape back "
ANR2200I Storage pool BA_BACK defined (device class LTO3).

再把 tape 放进去:

tsm: TSM_SVR1>q stgp

Storage         Device          Estimated       Pct       Pct     High     Low     Next Stora-
Pool Name       Class Name       Capacity      Util      Migr      Mig     Mig     ge Pool   
                                                                   Pct     Pct    
-----------     ----------     ----------     -----     -----     ----     ---     -----------
ARCHIVEPOOL     DISK                5.0 M       0.0       0.0       90      70               
AR_TAPE_PO-     LTO3                 13 G       0.0       7.7       90      70               
 OL                                                                                          
BACKUPPOOL      DISK               10.0 M       0.0       0.0       90      70               
BA_BACK         LTO3                0.0 M       0.0       0.0       90      70               
BA_TAPE_PO-     LTO2                0.0 M       0.0       0.0       90      70               
 OL                                                                                          
SPACEMGPOOL     DISK                0.0 M       0.0       0.0       90      70               

tsm: TSM_SVR1>define volume ba_back xx0010
ANR2206I Volume XX0010 defined in storage pool BA_BACK (device class LTO3).

tsm: TSM_SVR1>

好,先进行备份:
[root@sheng bin]# ./dsmc selective /root/test -subdir=yes
IBM Tivoli Storage Manager
Command Line Backup/Archive Client Interface
  Client Version 5, Release 5, Level 1.0 
  Client date/time: 06/16/2011 19:28:49
(c) Copyright by IBM Corporation and other(s) 1990, 2008. All Rights Reserved.

Node Name: TSM_SVR1
Please enter your user id <TSM_SVR1>: admin

Please enter password for user id "ADMIN":

Session established with server TSM_SVR1: Linux/i386
  Server Version 5, Release 5, Level 1.0
  Server date/time: 06/16/2011 19:28:49  Last access: 06/16/2011 18:57:53

Selective Backup function invoked.

ANS1263E The active policy set does not contain any backup copy groups. The backup operation can not continue.
[root@sheng bin]#

报错,active policy 没有设给backupcopygroup.

好,下面重设一下。
发现 spool 建好以后,要建的东西多呢:
define : domain -- policy -- manageclass
     copygroup
     
tsm: TSM_SVR1>define domain do_vtl02 desc=" domain for vtl02"
ANR1500I Policy domain DO_VTL02 defined.

tsm: TSM_SVR1>define policy do_vtl02 ps_vtl02 desc=" Policy set for do_vtl02 domain"
ANR1510I Policy set PS_VTL02 defined in policy domain DO_VTL02.

tsm: TSM_SVR1>define mgmtclass do_vtl02 ps_vtl02 mc_vtl02 desc="magagement class for do-vtl02 "         
ANR1520I Management class MC_VTL02 defined in policy domain DO_VTL02, set PS_VTL02.

tsm: TSM_SVR1>define copygroup do_vtl02 ps_vtl02 mc_vtl02 standard type=backup dest=ba_back verexists=3 retextra=30
ANR1530I Backup copy group STANDARD defined in policy domain DO_VTL02, set PS_VTL02, management class MC_VTL02.

tsm: TSM_SVR1>q copygroup

Policy        Policy        Mgmt          Copy          Versions     Versions       Retain      Retain
Domain        Set Name      Class         Group             Data         Data        Extra        Only
Name                        Name          Name            Exists      Deleted     Versions     Version
---------     ---------     ---------     ---------     --------     --------     --------     -------
DO_VTL        ACTIVE        MC_VTL        STANDARD             3            1          120          60
DO_VTL02      PS_VTL02      MC_VTL02      STANDARD             3            1           30          60
STANDARD      ACTIVE        STANDARD      STANDARD             2            1           30          60
STANDARD      STANDARD      STANDARD      STANDARD             2            1           30          60

tsm: TSM_SVR1>

好现在看到的copygroup 因为默认的是才backup 的group ,如果要看 archive 的group :q copy t=a;

好现在我们看到 刚才建好的backup group 了,下面进行备份:

发现还是报刚才的错:
ANS1263E The active policy set does not contain any backup copy groups. The backup operation can not continue.

继续:
验证,激活管理策略:
tsm: TSM_SVR1>validate policyset do_vtl02 ps_vtl02
ANR1598E VALIDATE POLICYSET: No default management class has been assigned for policy set PS_VTL02 in domain
DO_VTL02.
ANS8001I Return code 11.

哦原来刚才没有定义default mgmt :

tsm: TSM_SVR1>assign defmgmtclass do_vtl02 ps_vtl02 mc_vtl02
ANR1538I Default management class set to MC_VTL02 for policy domain DO_VTL02, set PS_VTL02.

tsm: TSM_SVR1>validate policyset do_vtl02 ps_vtl02          
ANR1554W DEFAULT Management class MC_VTL02 in policy set DO_VTL02 PS_VTL02 does not have an ARCHIVE copygroup:
files will not be archived by default if this set is activated.
ANR1515I Policy set PS_VTL02 validated in domain DO_VTL02 (ready for activation).

tsm: TSM_SVR1>activate policyset do_vtl02 ps_vtl02
ANR1554W DEFAULT Management class MC_VTL02 in policy set DO_VTL02 PS_VTL02 does not have an ARCHIVE copygroup:
files will not be archived by default if this set is activated.

Do you wish to proceed? (Yes (Y)/No (N)) yes
ANR1554W DEFAULT Management class MC_VTL02 in policy set DO_VTL02 PS_VTL02 does not have an ARCHIVE copygroup:
files will not be archived by default if this set is activated.
ANR1514I Policy set PS_VTL02 activated in policy domain DO_VTL02.

tsm: TSM_SVR1>

好,下面进行备份:

还是报原来的错:
ANS1263E The active policy set does not contain any backup copy groups. The backup operation can not continue.

原来是没哟在server 端注册node:
tsm: TSM_SVR1>register node tsm_svr1 panode1 domain=do_vtl02 archdelete=yes backdelete=yes 
ANR2147E REGISTER NODE: Node TSM_SVR1 is already registered.
ANS8001I Return code 10.

我就想了:一个节点只能有一个domain 吗?

我把node 的domain 更新一下:

tsm: TSM_SVR1>register node tsm_svr1 panode2 domain=do_vtl02 archdelete=yes backdelete=yes
ANR2147E REGISTER NODE: Node TSM_SVR1 is already registered.
ANS8001I Return code 10.

tsm: TSM_SVR1>update node tsm_svr1 panode2 domain=do_vtl02
ANR2063I Node TSM_SVR1 updated.

tsm: TSM_SVR1>q node 

Node Name                     Platform     Policy Domain      Days Since     Days Since     Locked?
                                           Name               Last Acce-       Password    
                                                                      ss            Set    
-------------------------     --------     --------------     ----------     ----------     -------
CLIENT                        (?)          STANDARD                   26             26       No  
TSM_SVR1                      Linux86      DO_VTL02                   <1             <1       No  

tsm: TSM_SVR1>

发现一个node 只能有一个domain, 好,继续备份:

[root@sheng bin]# ./dsmc selective /root/test -subdir=yes
IBM Tivoli Storage Manager
Command Line Backup/Archive Client Interface
  Client Version 5, Release 5, Level 1.0 
  Client date/time: 06/16/2011 20:03:10
(c) Copyright by IBM Corporation and other(s) 1990, 2008. All Rights Reserved.

Node Name: TSM_SVR1
Please enter your user id <TSM_SVR1>: admin

Please enter password for user id "ADMIN":

Session established with server TSM_SVR1: Linux/i386
  Server Version 5, Release 5, Level 1.0
  Server date/time: 06/16/2011 20:03:10  Last access: 06/16/2011 19:58:14

Selective Backup function invoked.

Directory-->               4,096 /root [Sent]     
Directory-->               4,096 /root/test [Sent]     
ANS1114I Waiting for mount of offline media.
Retry # 1  Directory-->               4,096 /root [Sent]     
Retry # 1  Directory-->               4,096 /root/test [Sent]     
Selective Backup processing of '/root/test' finished without failure.

                                 
Total number of objects inspected:      165
Total number of objects backed up:        2
Total number of objects updated:          0
Total number of objects rebound:          0
Total number of objects deleted:          0
Total number of objects expired:          0
Total number of objects failed:           0
Total number of bytes transferred:     352  B
Data transfer time:                    0.00 sec
Network data transfer rate:        13,221.15 KB/sec
Aggregate data transfer rate:          0.11 KB/sec
Objects compressed by:                    0%
Elapsed processing time:           00:00:03

备份成功:

看一下磁带的状态:

tsm: TSM_SVR1>q libv

Library Name     Volume Name     Status               Owner          Last Use      Home        Device
                                                                                   Element     Type 
------------     -----------     ----------------     ----------     ---------     -------     ------
VTL02            XX0001          Scratch                                           1                
VTL02            XX0002          Scratch                                           2                
VTL02            XX0003          Scratch                                           3                
VTL02            XX0004          Scratch                                           4                
VTL02            XX0005          Scratch                                           5                
VTL02            XX0006          Scratch                                           6                
VTL02            XX0007          Scratch                                           7                
VTL02            XX0008          Scratch                                           8                
VTL02            XX0009          Private                             Data          9                
VTL02            XX0010          Private                             Data          10               

tsm: TSM_SVR1>q v

Volume Name                  Storage         Device         Estimated       Pct      Volume
                             Pool Name       Class Name      Capacity      Util      Status
------------------------     -----------     ----------     ---------     -----     --------
/opt/tivoli/tsm/server/-     ARCHIVEPOOL     DISK               5.0 M       0.0     On-Line
 bin/archive.dsm                                                                           
/opt/tivoli/tsm/server/-     BACKUPPOOL      DISK              10.0 M       0.0     On-Line
 bin/backup.dsm                                                                            
CC00003                      BA_TAPE_PO-     LTO2               0.0 M       0.0      Empty 
                              OL                                                           
TT0001                       BA_TAPE_PO-     LTO2               0.0 M       0.0      Empty 
                              OL                                                           
TT0002                       BA_TAPE_PO-     LTO2               0.0 M       0.0      Empty 
                              OL                                                           
XX0009                       AR_TAPE_PO-     LTO3               1.0 G       0.0     Filling
                              OL                                                           
XX0010                       BA_BACK         LTO3               1.0 G       0.0     Filling

tsm: TSM_SVR1>

就是留下一个问题:
 一个node 只能注册一个domain吗?

网上查了资料才知道:

一个node必须属于一个domain,而且只能属于一个domain;

一个domain可以有多个policyset,但是一个domain中只能有一个policyset是激活状态;

一个policyset可以有多个mgmtclass,但是一个policyset中只能有一个mgmtclass是default mgmtclass;

原创粉丝点击