- 论坛徽章:
- 0
|
一、tsm安装规划
h50a: 生产机1
h50b:生产机2
磁带机与h50b连接
h50b:
◆ 创建卷组-à建立逻辑卷-à建立文件系统
◆ 安装tsm server,tsm client,tdp for oracle
◆ tsm server用到的db,log,data数据文件存放于/usr/tivoli/tsm/tsmdata中。
db: db01.dsm 513 m
log: log01.dsm 513 m
data: bkvol.dsm 2047m
arcvol.dsm 512m
dbbak:513m(用于备份db)**
(磁盘存储池卷应该足够大,至少能容纳客户机一天的备份)
二、安装tivoli storage manager server/client
1. 创建卷组tsmvg(b机整个hdisk1本地硬盘作为tsmvg)
2. 激活卷组tsmvg :varyon tsmvg
3. 在tsmvg上建立逻辑卷tsmlv,大小为320lp(320*16m=5g),然后在tsmlv上建立文件系统/usr/tivoli/tsm;
# smitty mklv
logical volume name [tsmlv]
* volume group name [tsmvg]
* number of logical partitions [320]
……
# smitty crjfslvbf
* logical volume name tsmlv
* mount point [/usr/tivoli/tsm]
mount automatically at system restart? yes
……
allocation group size (mbytes) 8
# mount /dev/tsmlv
注:因为tsm server默认将tsm安装到/usr/tivoli/tsm下,所以用该路径做安装点。
4. 确认/usr文件系统至少有300m剩余空间,否则使用# smitty chfs增加空间。
5. tsm server安装:(要安装7个文件集)
将tsm server for aix放入光驱以root用户身份执行命令:
# smitty installp
install and update from latest available software ->
*input device / directory for software -> /dev/cd0(用f4进行选择)
*software to install [-all_latest] (用f4进行选择)
(安装除64位和aix5例如:tivoli.tsm.server.aix5.rte64外的所有文件集。)
commit software updates? [no]
save replaced files? [yes]
6. 执行以下命令,就可以启用web管理界面了。
# cd /usr/tivoli/tsm/server/bin
# dsmserv runfile /usr/tivoli/tsm/server/webimages/dsmserv.idl
7. 重新启动:shutdown -fr
8. 重启以后,就可以使用tsm了。
9. client安装:(客户端要安装9个文件集)
将tsm unixbackup/archive clients v2.2放入光驱,执行上述相同的操作。
安装完成后,运行下述命令确保以下文件集安装:
# lslpp -l | grep tsm
10. 安装tsm后,/etc/inittab文件被修改,确认包含如下文本行,否则请自行添加:
autosrvr:2:once:/use/tivoli/tsm/server/bin/rc.adsmserv>
/dev/console 2>
&1 #start the tivoli storage manager server
查看tsm的进程:# ps -ef | grep dsm
root 7028 1 0 09:42:31
- 0:00 ksh /usr/tivoli/tsm/server/bin/rc.adsmserv
root 9546 1 0 09:42:29
- 0:00 /usr/tivoli/tsm/client/hsm/bin/dsmrecalld
root 9804 1 0 09:42:29
- 0:00 /usr/tivoli/tsm/client/hsm/bin/dsmmonitord
root 10584 7028 0 09:42:31
- 0:00 dsmserv quiet
root 11378 7740 1 09:47:15
0 0:00 grep dsm
如果tsm没有运行,请运行:/usr/tivoli/tsm/server/bin/rc.adsmserv &(以后台方式运行)
tsm server 缺省路径:/usr/tivoli/tsm/server/bin/
tsm backup/archive client 缺省路径:/usr/tivoli/tsm/client/ba/bin/
三、配置tsm server/client
◆ 配置tsm客户端
1. 建立tivoli storage manager 选项文件:复制样本客户机系统选项文件(dsm.sys.smp)和样本客户机用户选项文件(dsm.opt.smp):
# cd /usr/tivoli/tsm/client/ba/bin
# cp dsm.opt.smp dsm.opt
# cp dsm.sys.smp dsm.sys
2. 编辑该文件使之包含下面列出的选项:
# vi /usr/tivoli/tsm/client/ba/bin/dsm.opt
servername tsmserver
tapeprompt yes
# vi /usr/tivoli/tsm/client/ba/bin/dsm.sys
在dsm.sys中添加: servername tsmserver
commmethod tcpip
tcpport 1500
tcpserveraddress 172.16.18.2
nodename client
passwordaccess generate
3. 现在可以使用管理客户端dsmadmc了。
◆ 配置tsm服务器
1、 配置tsm server:
2、创建tsm数据库文件:
# mkdir /usr/tivoli/tsm/tsmdata
# cd /usr/tivoli/tsm/tsmdata
# dsmfmt -db db01.dsm 513
# dsmfmt -log log01.dsm 513
# dsmfmt -data bkvol.dsm 2047
# dsmfmt -data arcvol.dsm 513
3. 进入/usr/tivoli/tsm/client/ba/bin执行下列命令(用户/密码:admin/admin)进入管理界面并注册许可文件(以tsm>开头的命令均为在管理界面中执行的命令):
# dsmadmc
tsm> register license file=*.lic
注册node(注册节点tdp_h50b、tdp_h50a,ora817):
tsm>register node tdp_h50b tdp_h50b backdelete=yes(node名为tdp_h50b,密码这tdp_h50b)
tsm>register node tdp_h50a tdp_h50a backdelete=yes
tsm>register node ora817 ora817 backdelete=yes
tsm> quit
4. 在pc计算机的浏览器中输入:http://172.16.18.2:1580/,输入管理员的用户名和密码后,从web界面来配置tsm服务器。在使用web管理界面时确保服务器选项文件/usr/tivoli/tsm/server/bin/dsmserv.opt中包含如下行:
commethod http
httpport 1580
5. 安装、配置3570磁带库
在rs 6000上安装3570驱动程序有两种方法:
2 运行:# installp -acxd /pathname/atape.5.4.4.0.bin atape.driver。如果已经安装了相同版本的驱动程序,可使用"-f"执行强制安装。安装完成后使用下列命令列出当前安装的atape.driver的版本:
# lslpp -l atape.driver
◆ 将3570的驱动程序atape.5.4.4.0.bin复制到任意目录,这里复制到/tmp下。执行:
# smit installp
install and update from latest available software ->
input device / directory for software -> /dev/cd0
* input device / directory for software /tmp
* software to install [atape ]
preview only? (install operation will not occur) no
commit software updates? yes
save replaced files? yes
process multiple volumes? yes
……
使用下列命令列出当前安装的atape.driver的版本:
# lslpp -l atape.driver
确认magstar mp连接到适配器并安装了上述驱动程序,配置并激活magstar mp 3570。没有配置、激活的magstar mp是不能使用的。
为了连接3570库中的驱动器请运行命令:
# smit dev
tape drive ->
add a tape drive ->(如何没有安装3570驱动程序,就没有3570的选项)
"3570 scsi ibm magstar mp tape subsystem"-->
"scsi1 available 10-70 wide scsi i/o controller"-->
tape drive type 3570
tape drive interface scsi
description ibm magstar mp tape subsystem
parent adapter scsi1
* connection address [1,0]
……
注:connection address:第1 scsi标识:scsi id
第2 scsi逻辑单元号:(lun)
如果看到"rmt1 available"消息就表示配置完成了。rmt1表示tsm使用的特殊文件名。
使用下面的命令来配置并激活magstar mp 3570磁带子系统:
# cfgmgr
输入不带参数的命令:cfgmgr。该命令配置所有已知的设备包伙新添加的magstar mp设备。输入下列命令来校验配置是否成功:
# lsdev -cc tape
# ls -l /dev/rmt1.smc
注:设备文件/dev/rmt1.smc非常重要,它是由3570库使用scsi介质换片器的特殊文件。如果该文件不存在,则无法进行下面的配置。
6. 按下列步骤配置3570库:
◆ operation view ->
manager security ->
set web authentication time out ->
change 10 to 60 -> 60
◆ object view ->
server storage ->
libraries and drives ->
automated libraries ->
operations: -> define automated library
library name 3570lib
device /dev/rmt1.smc
share library no
◆ object view ->
server storage ->
libraries and drives ->
automated drives ->
operations: -> define automated drive
library name 3570lib
drive name 3570drv
device /dev/rmt1
element 16
device on-line yes
◆ object view ->
server storage ->
device classes ->
3570 device classes ->
operations: -> define device class
device class name 3570c11
recording format 3570c
library name 3570lib
mount limit drives
mount retention 60
tape volume prefix adsm
mount wait 60
◆ object view ->
server storage ->
storage pools ->
sequential access storage pools ->
operations: -> define sequential access storage pool
storage pool name 3570pool
device class 3570c11
description backup oracle database
……
collocate? no
maximum scratch volumes 20
allowed
……
migration continue yes
◆ object view ->
server storage ->
storage pools ->
disk storage pools ->
archivepool -> volumes ->
operations: -> define a disk storage pool volume
storage pool name archivepool
volume name /usr/tivoli/tsm/tsmdata/arcvol.dsm
media access status readwrite
format size
wait yes
◆ object vview ->
server storage ->
storage pools ->
disk storage pools ->
backuppool -> volumes ->
operations: -> define a disk storage pool volume
storage pool name backuppool
volume name /usr/tivoli/tsm/tsmdata/bkvol.dsm
media access status readwrite
format size
wait yes
◆ object view ->
server storage ->
storage pools ->
disk storage pools ->
archivepool ->
operations: -> update a disk storage pool
next storage pool 3570pool
◆ object view ->
server storage ->
storage pools ->
disk storage pools ->
backuppool ->
operations: -> update a disk storage pool
next storage pool 3570pool
◆ object view ->
database ->
database volumes ->
operations: -> define database volume
volume name /usr/tivoli/tsm/tsmdata/db01.dsm
format size
wait yes
object view ->
database ->
database volumes ->
operations: -> define database copy
database volume name /usr/tivoli/tsm/tsmdata/db01.dsm
copy volume name /usr/tivoli/tsm/tsmdata/db02.dsm
◆ object view ->
recovery log ->
recovery log volumes ->
operations: -> define recovery log volume
volume name /usr/tivoli/tsm/tsmdata/log01.dsm
format size
wait yes
◆ select object view ->
recovery log ->
recovery log volumes ->
operations: -> define recovery log copy
database volume name /usr/tivoli/tsm/tsmdata/log01.dsm
copy volume name /usr/tivoli/tsm/tsmdata/log02.dsm
四、标记磁带卷并检入库
所有的磁带卷在tsm使用前都必须标记,只有标记过的磁带卷才能由库进行管理。为确保下列命令顺利执行,在操作面板上选择"set libr mode"->"random"->"cancel"。
1. 执行以下命令标记磁带卷:
# cd /usr/tivoli/tsm/server/bin
# ./dsmlabel -drive=/dev/rmt1,16 -library=/dev/rmt1.smc -search -keep [-overwrite]
注意:picker(拣选器)将装入可用的磁带卷,然后提示管理员一个一个的输入卷标名。卷标名在1-6个字符之间,可自行定义。这里定义为tape01-tape10。
2. 当磁带卷全部标记完后,再将磁带卷检入库:
# dsmadmc
# tsm> checkin libvolume 3570lib search=yes status=scratch devtype=3570
注意:该命令将磁带卷定义为临时卷。
3. 将磁带卷tape01定义为3570lib的专用卷:
tsm> define volume 3570pool tape01
注意:磁带卷tape01成为专用卷,就是说tape01属于存储池。如果要定义专用卷,参数"maximum scratch volumes allowed"必需大于0。至此,tsm的安装全部完成。
4. 可以检入一个指定磁带进库
前台运行 # cd /usr/tivoli/tsm/server/bin
#dsmserv
首先,checkin之前,3570上必须有空槽,若没有,先checkout一磁带。
tsm> checkin libv 3570lib tapexx status=scratch(数据带时为private)
把磁带放入31槽中,根据提示,执行reply pp命令,系统自动把此磁带移入3570的空槽中,并记录在案。
5. checkout一个指定磁带
tsm>checkout libv 3570lib tapexx
系统会自动取出指定磁带,移到3570的31槽,应及时取走,并根据提示执行reply pp命令,向系统确认已经取走磁带。
checkout多个磁带
直接取出整个磁带架,把磁带取出,插入空磁带架,发出命令:
tsm>audit library 3570lib
6. 将新磁带添加到storage pool中:
tsm>defi volume 3570pool tape02
五、测试
从备份客户机进行
从命令行执行下列命令:
# cd /usr/tivoli/tsm/server/bin
# dsmc
tivoli storage manager
command line backup client interface - version 3, release 7, level 0.0
(c) copyright ibm corporation, 1990, 1999, all rights reserved.
tsm> incr /tmp
node name: client
please enter your user id :
please enter password for user id "client": client
incremental backup of volume ''/tmp''
directory -> 512 /tmp/ibm [sent]
normal file -> 59,101 /tmp/.oslevel.mlinfo.cache [sent]
normal file -> 155 /tmp/.toc [sent]
normal file -> 1,143,969 /tmp/55324085.dbb [sent]
……
successful incremental backup of ''/tmp''
total number of objects inspected: 531
total number of objects backed up: 34
total number of objects updated: 0
total number of objects rebound: 0
total number of objects deleted: 4
total number of objects failed: 0
total number of bytes transferred: 2.17 mb
data transfer time: 0.48 sec
network data transfer rate: 4,636.25 kb/sec
aggregate data transfer rate: 717.28 kb/sec
objects compressed by: 0%
elapsed processing time: 00:00:03
tsm>
看到输出的信息类似于上述文本,就表示备份成功。
六、tdp for oracle on aix 32-bit安装及配置
安装配置要点
◆ smit安装软件包:
◆ 编辑tdpo.opt文件
◆ 编辑api client的dsm.opt文件
◆ 编辑api client的dsm.sys文件
◆ 在tsm server注册api client(tdp_h50b)
注意:该客户机节点的属性必须是:backdelete=yes
◆ 初始化password:
◆ 确认安装:显示tdp的环境变量:
tdpoconf showenv
◆ 重新连接oracle备份的库文件
步骤实施
1、 h50b机器上,安装点与tsm相同(/usr/tivoli/tsm)
2、 将tdp for oracle光盘放入光驱以root用户身份执行命令:
# smitty installp
tivoli.tsm.client.oracle.32bit
tivoli.tsm.client.oracle.tools.32bit
tivoli.tsm.client.api.32bit
只安装tdp for oracle on aix 32-bit的文件集。
3、 #su - oracle
shutdown oracle
$cd $oracle_home/lib
$mv libobk.a libobk.a.03_24(移去此文件)
$ cd $oracle_home/rdbms/lib
$ make -f ins_rdbms.mk llibmm=/usr/lib/libobk.a ioracle
- linking oracle ld -l/user/oracle/app/oracle/product/8.0.5/lib/
-l/user/oracle/app/oracle/product/8.0.5/rdbms/lib
-o /user/oracle/app/oracle/product/8.0.5/rdbms/lib/oracle
-bi:/user/oracle/app/oracle/product/8.0.5/lib/pw-syscall.exp
-bi:/user/oracle/app/oracle/product/8.0.5/lib/ksms.imp
/user/oracle/app/oracle/product/8.0.5/rdbms/lib/opimai.o
/user/oracle/app/oracle/product/8.0.5/rdbms/lib/ssoraed.o
/user/oracle/app/oracle/product/8.0.5/rdbms/lib/ttcsoi.o
/user/oracle/app/oracle/product/8.0.5/rdbms/lib/config.o
-lserver -lclient -lvsn -lcommon -lgeneric
/user/oracle/app/oracle/product/8.0.5/rdbms/lib/defopt.o
/user/oracle/app/oracle/product/8.0.5/lib/ncrstab.o
-lknlopt -lslax -lplsf -lplsb -lextp -lserver -lclient -lvsn
-lcommon -lgeneric -lknlopt -lslax -lplsf -lplsb -lextp -ldbicx
/user/oracle/app/oracle/product/8.0.5/lib/nautab.o
/user/oracle/app/oracle/product/8.0.5/lib/naeet.o
/user/oracle/app/oracle/product/8.0.5/lib/naect.o
/user/oracle/app/oracle/product/8.0.5/lib/naedhs.o
-lnetv2 -lnttcp -lnetwork -lncr -lnetv2
-lnttcp -lnetwork -lclient -lvsn -lcommon -lgeneric
/usr/lib/libobk.a -lnlsrtl3 -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3
-lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork
-lclient -lvsn -lcommon -lgeneric -lepc -lnlsrtl3 -lcore4 -lnlsrtl3
-lcore4 -lnlsrtl3 -lclient -lvsn -lcommon -lgeneric -lnlsrtl3
-lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 -lld -lm
/lib/crt0_r.o -lc_r -lpthreads -lodm -lm -lm
/user/oracle/app/oracle/product/8.0.5/rdbms/lib/skgxns.o
-lkidt -lnlsrtl3 -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 -lld -lm
/lib/crt0_r.o -lc_r -lpthreads -lodm -lm -lm
mv -f /user/oracle/app/oracle/product/8.0.5/bin/oracle
/user/oracle/app/oracle/product/8.0.5/bin/oracleo
mv oracle /user/oracle/app/oracle/product/8.0.5/bin/oracle
chmod 6751 /user/oracle/app/oracle/product/8.0.5/bin/oracle
$startup oracle
$exit
4、 #cd /usr/tivoli/tsm/client/api/bin
5、 cp dsm.opt.smp dsm.opt
#vi dsm.opt
servername tsmserver
tapeprompt yes
# cp dsm.sys.smp dsm.sys
#vi dsm.sys
servername tsmserver
commmethod tcpip
tcpport 1500
tcpserveraddress 172.16.18.2
nodename tdp_h50b
passwordaccess prompt
6、 #cd /usr/tivoli/tsm/client/oracle/bin
#cp tdpo.opt.smp tdpo.opt
#vi tdpo.opt
dsmi_log /tmp
dsmi_orc_config /usr/tivoli/tsm/client/oracle/bin/dsm.opt
tdpo_fs adsmorc
tdpo_node tdp_h50b
tdpo_owner oracle
tdpo_pswdpath /usr/tivoli/tsm/client/oracle/bin
tdpo_avg_size 1500
tdpo_num_buffers 2
# vi dsm.opt
tapeprompt yes
7、 # ./tdpoconf password
***************************************************************
* tivoli data protection for oracle utility *
* password file initialization/update program *
* root privilege needed to update value *
***************************************************************
please enter current password: tdp_h50b
please enter new password:*******
please reenter new password for verification:
anu0260i password successfully changed.
#
# ls -la tdpo.*
-rw-r--r-- 1 root sys 48 mar 25 14:06 tdpo.tdp_h50b
# ./tdpoconf showenv
tdp for oracle information
version: 2
release: 2
level: 0
sublevel: 0
platform: tdp oracle aix
tsm server information
server name: tdp_h50b
server address: 172.16.18.2
server type: aix-rs/6000
server port: 1500
communication method: tcp/ip
session information
owner name: oracle
node name: tdp_h50b
node type: tdp oracle aix
dsmi_dir: /usr/tivoli/tsm/client/api/bin
dsmi_orc_config: /usr/tivoli/tsm/client/oracle/bin/dsm.opt
tdpo_optfile: /usr/tivoli/tsm/client/oracle/bin/tdpo.opt
password directory: /usr/tivoli/tsm/client/oracle/bin
compression: false
policy data
domain name: standard
management class: standard
active policy set: standard
backup retention: 30
#
h50a机器:安装tdp for oracle和tsm client。
1、 创建卷组tsmvg(a机整个hdisk1本地硬盘作为tsmvg)-à激活卷组tsmvg :varyon tsmvg-à在tsmvg上建立逻辑卷tsmlv,大小为320lp(320*16m=5g),然后在tsmlv上建立文件系统/usr/tivoli/tsm;
2、 与b机安装相似,将tdp for oracle光盘放入光驱以root用户身份安装在此安装点上(/usr/tivoli/tsm)。
3、 在h50a对节点tdp_h50a
七、tdp for oracle 在win2k安装配置
1、 将tdp for oracle光盘放入光驱以administrator用户身份执行安装。安装目录:
c:\tivoli\tsm。(测试机器 xxb_chh,os为win2k,oracle为817)。安装完毕重启计算机。
2、 进入c:\tivoli\tsm\agentoba>目录,配置编辑tdpo.opt及dsm.opt文件:
dsm.opt内容:
commmethod tcpip
tcpport 1500
tcpserveraddress 172.16.18.2
nodename ora817
passwordaccess generate
tdpo.opt内容:
************************************************************
* sample options file for tivoli data protection for oracle
************************************************************
dsmi_orc_config c:\tivoli\tsm\agentoba\dsm.opt
dsmi_log c:\tivoli\tsm\agentoba
tdpo_avg_size 2000
tdpo_fs \adsmorc
tdpo_num_buffers 2
3、 initializing the password:
c:\tivoli\tsm\agentoba>tdpoconf password
***************************************************************
* tivoli data protection for oracle utility *
* password file initialization/update program *
***************************************************************
please enter current password:******
please enter new password:******
please reenter new password for verification:******
anu0260i password successfully changed.
c:\tivoli\tsm\agentoba>
4、 显示环境配置:
c:\tivoli\tsm\agentoba>tdpoconf showenv
tdp for oracle information
version: 2
release: 2
level: 0
sublevel: 0
platform: tdp oracle nt
tsm server information
server name: dsmserv
server address: 172.16.18.2
server type: aix-rs/6000
server port: 1500
communication method: tcp/ip
session information
owner name:
node name: ora817
node type: tdp oracle nt
dsmi_dir: c:\tivoli\tsm\api
dsmi_orc_config: c:\tivoli\tsm\agentoba\dsm.opt
tdpo_optfile: c:\tivoli\tsm\agentoba\tdpo.opt
password directory:
compression: false
policy data
domain name: standard
management class: standard
active policy set: standard
backup retention: 30
c:\tivoli\tsm\agentoba>
至此,安装配置全部完毕。
对需要作冷备份的(shutdown 数据库,即直接备份文件系统的)和利用client的schedule进行定时在线备份的,请再安装tsm的client端。client有平台之分,tdp for oracle没有平台之分。
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/13719/showart_74097.html |
|