目的:對TSM軟件,包括TSM SERVER,CLIENT,TDPO進行全新安裝,並對操做系統數據和ORcle數據庫進行備份和恢復測試。
TSM Update / Patch
TSM Device Drivers
TSM 原理和配置實現html
http://www.ixdba.net/article/c2/1483$6.htmljava
驅動下載地址和方法node
Device Driver: linux
-
- The IBM device driver is required for IBM Ultrium 5 drives. IBM device drivers are available atIBM Fix Central. Choose the following options from the drop-down menus.
- Product Group -> System Storage
- System Storage -> Tape systems
- Tape systems -> Tape drivers and software
- Tape drivers and software -> Tape device drivers
- Platform -> select the platform for the device driver that you are looking for.
-
- For Dell PowerVault LTO5-140 drives, the device driver can be downloaded from the Dell web site.
- http://www-933.ibm.com/support/fixcentral/
準備條件:一臺VM虛擬機安裝RedHat5.5,Oracle10GR2,TSM Server5.5.5; TSM Client5.5.4;TDPO5.4;vistor虛擬帶庫
安裝步驟:如今VM中安裝Oracle10GR2,再裝visrot虛擬帶庫,TSMserver,CLIENT,TDPO
參考:餘東東寫的tsm5.3安裝文檔和vistor虛擬帶庫安裝文檔。安裝過程當中也獲得了冬瓜老師的指點。
介質下載地址:
Vistor虛擬帶庫 http://www.cofio.com/AIMstorDownload/#FreeTrial 註冊後下載8M的VISTOR虛擬帶庫介質
默認下載可試用45天
TSM的server,client,tdpo下載地址:
ftp://ftp.software.ibm.com/storage/tivoli-storage-management/maintenance/
默認下載可試用30天,不能用於生產,卻LIC文件。
TSM 的安裝
TSM 安裝
安裝文檔參考冬瓜老師的:http://bbs.chinaunix.net/thread-1056862-1-2.html
一 Vistor安裝注意事項:
tar xzvf vistor.tgz,運行./Vs-dist進行安裝。在Vistor安裝中,選擇一個磁帶機的類型,要選擇了10,HP 的LTO2,選擇別的類型可能認不到,要重裝。
Vistor註冊步驟
1.獲取機器碼:
[root@oracle vistor]# pwd
/usr/cofio/vistor
[root@oracle vistor]# ./vs-license -i
FJ-PJKOOJ-SMN24G-EFJ33Y-DISS2X
2.去官網選擇Product Lisences得到試用碼
3.註冊之
[root@oracle vistor]# ./vs-license -s 'A9SQMABSQC8XKZ9LWDLA4S28CDYK2POU'
UnRegistered
4.註冊完成後,來驗證一下,看看註冊是否成功:
[root@oracle vistor]# ./vs-license -d
License type : Evaluation
Time remaining : 42 days
Storage capacity: 500GB
註冊成功,可使用42 天,最大容量不超過500GB。
5.啓動vistor:
[root@oracle vistor]# ./vistor
6.用WEB方式查看
http://your linux server ip:5050
7.在web控制界面裏面還要啓動虛擬帶庫。光啓動vistor是不行的、
驗證TSM和VISTOR是否正確識別並運行
1. 檢測是否在linux系統中能認到:
{root@oracle vistor]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
若是沒有顯示,說明沒有認到。須要到WEB界面下選擇RUN的啓動按鈕。
2. 安裝IBM 的驅動 (這個是冬瓜老師寫的,可是我在LINUX5.5中發現不用裝這個驅動包也能夠安裝成功的)
在安裝TSM server 的時候,有個TIVsm–tsmscsi–5.5.0-0-i386.rpm 的包,這個包必須安裝,裝
完後,在/opt/Tivoli/tsm/下面,會有devices 目錄。進去後,有下面這些東西。
[root@oracle bin]# ls
README.htm kill.acs_ssi local_device mttest rc.acs_ssi t_parent
autoconf lb.conf.smp mini_el op.conf.smp sg_device trace_decode
ddinfo lbtest mt.conf.smp optest ssi tsmscsi
[root@oracle bin]# pwd
3. /opt/tivoli/tsm/devices/bin運行./autoconf , 來配置磁帶庫以及磁帶機, 這裏會作一系列的動做, 生成
/dev/tsmscsi/mt* /dev/tsmscsi/lb* 這些連接之類的東西:
[root@oracle bin]# ls -l /dev/tsmscsi/
total 8
lrwxrwxrwx 1 root root 8 May 6 02:48 lb0 -> /dev/sg3
-rw-r--r-- 1 root root 181 May 6 02:48 lbinfo
lrwxrwxrwx 1 root root 8 May 6 02:48 mt0 -> /dev/sg4
lrwxrwxrwx 1 root root 8 May 6 02:48 mt1 -> /dev/sg5
lrwxrwxrwx 1 root root 8 May 6 02:48 mt2 -> /dev/sg6
lrwxrwxrwx 1 root root 8 May 6 02:48 mt3 -> /dev/sg7
-rw-r--r-- 1 root root 442 May 6 02:48 mtinfo
若是在這一步,發現沒有如上的這些東西,或者只有lb,那麼最好從新裝vistor,選擇其
他類型的磁帶臂或者驅動器。
若是這一步成功,那麼就說明TSM 能夠認獲得vistor 虛擬出來的機械臂及驅動器了。
ls /dev/tsmscsi
4. TSM 中配置vistor 磁帶庫中的設備 (其實主要是爲了查看虛擬帶庫的element值,正常帶庫是不用寫這個參數的)
進入/opt/tivoli/tsm/client/ba/bin,運行dsmadmc –con,開一個消息輸出控制檯。
再運行dsmadmc,開一個命令行控制檯,
使用以下命令,定義一個設備類,一個庫,四個驅動器,以及對應的路徑:
DEFINE LIBRARY LIBRARY1 LIBTYPE=SCSI
定義一個庫,庫類型SCSI,庫名稱library1.
DEFINE PATH DONGGUA-TSM LIBRARY1 SRCTYPE=SERVER DESTTYPE=LIBRARY DEVICE=/dev/tsmscsi/lb0 ONLINE=YES
定義這個庫的路徑,這裏的DEVICE,使用/dev/tsmscsi/下面的lb0.不要使用/dev/sg3。
DEFINE DRIVE LIBRARY1 DRIVE0 ELEMENT=2051
DEFINE DRIVE LIBRARY1 DRIVE1 ELEMENT=2052
DEFINE DRIVE LIBRARY1 DRIVE2 ELEMENT=2053
DEFINE DRIVE LIBRARY1 DRIVE3 ELEMENT=2054
定義四個驅動器,這裏面的element 參數很麻煩,這個參數,有的庫裏面能夠自動獲取到,定義的時候就不須要這個參數
了,但我選的這些虛擬設備,自動獲取不到,就須要我去尋找了,使用以下方法來獲取element 的值:
[root@oracle bin]# pwd
/opt/tivoli/tsm/client/ba/bin
[root@oracle bin]# dsmadmc
ANS0102W Unable to open the message repository /opt/tivoli/tsm/client/ba/bin/zh_EN/dsmclientV3.cat. The American English
repository will be used instead.
IBM Tivoli Storage Manager
Command Line Administrative Interface - Version 5, Release 5, Level 0.0
(c) Copyright by IBM Corporation and other(s) 1990, 2007. All Rights Reserved.
Enter your user id: admin
ANR0407I Session 61 started for administrator ADMIN (Linux86) (Tcp/Ip 192.168.72.130(57420)).
Enter your password:
Session established with server DONGGUA-TSM: Linux/i386
Server Version 5, Release 5, Level 4.0
Server date/time: 05/06/10 05:13:21 Last access: 05/06/10 04:24:17
tsm: DONGGUA-TSM>show slots library1
ANR2017I Administrator ADMIN issued command: show slots library1
PVR slot information for library LIBRARY1.
Library : LIBRARY1
Product Id : Scalar i500
Support module : 2
Mount count : 0
Drives : 4
Slots : 32
Changers : 1
Import/Exports : 0
Device : /dev/tsmscsi/lb0
Drive 0, element 2051
Drive 1, element 2052
Drive 2, element 2053
Drive 3, element 2054
Changer 0, element 0
Slot 0, status Allocated, element number 1, barcode present, barcode value <AD0001>, devT=ANY, mediaT=-1, elemT=ANY
Slot 1, status Allocated, element number 2, barcode present, barcode value <AD0002>, devT=ANY, mediaT=-1, elemT=ANY
Slot 2, status Allocated, element number 3, barcode present, barcode value <AD0003>, devT=ANY, mediaT=-1, elemT=ANY
Slot 3, status Allocated, element number 4, barcode present, barcode value <AD0004>, devT=ANY, mediaT=-1, elemT=ANY
slot element range 1 – 32
上面紅色標註的那一塊,很清楚的顯示了element 的值。
****這種方法,須要先定義好庫,也就是機械臂,而後才能查到庫
二 TSM Server安裝:
配置環境變量
.bash_profile
export DSMSERV_DIR=/opt/tivoli/tsm/server/bin
export DSMSERV_CONFIG=/opt/tivoli/tsm/server/bin/dsmserv.opt
自動啓動/etc/rc.local
vi /etc/rc.local
/opt/tivoli/tsm/server/bin/dsmserv &
三 TSM Client安裝:
1.壓縮包安裝順序
cd tsm-client/
tar -xvf 5.5.4.0-TIV-TSMBAC-LinuxX86.tar
rpm -ivh TIVsm-API.i386.rpm
rpm -ivh TIVsm-BA.i386.rpm
四 TSM TDBO安裝:
1.TSM安裝TDPO的時候,要配置JAVA的環境變量。不然會報一個
Caused by: java.lang.IncompatibleClassChangeError: ZeroGrh的錯誤。
vi /etc/profile加入如下內容就能夠了
export JAVA_HOME=/oracle/product/10.2.0/db_1/jdk
export JRE_HOME=/oracle/product/10.2.0/db_1/jdk/jre
export PATH=$PATH:/oracle/product/10.2.0/db_1/jdk/bin
export CLASSPATH=./:/oracle/product/10.2.0/db_1/jdk/lib:/oracle/product/10.2.0/db_1/jdk/jre/lib
2.安裝完成後要設置一個軟鏈接(不一樣的UNIX系統中的軟鏈接的文件不一樣,具體查看這個http://publib.boulder.ibm.com/tividd/td/ITSMFD/SC32-9064-01/zh_CN/HTML/ab5u000150.htm)
/usr/lib/libobk.so (這個是LINUX中的軟鏈接軟件)
ln -s /usr/lib/libobk.so $ORACLE_HOME/lib/libobk.so
五 Server中設備類定義:
1.定義機械手
def libr library1 libtype=scsi
def path server1 library1 srct=server destt=library device=/dev/tsmscsi/lb0
upd libr library1 autolabel=yes
2.定義驅動(我安裝虛擬帶庫的時候定義了4個驅動,通常兩個的比較多吧)
def drive library1 drive0 element=2051
def drive library1 drive0 element=2052
def drive library1 drive0 element=2053
def drive library1 drive0 element=2054
(ls /dev/tsmscsi/)
def path server1 drive0 srct=server destt=drive libr=library1 device=/dev/tsmscsi/mt0
def path server1 drive1 srct=server destt=drive libr=library1 device=/dev/tsmscsi/mt1
def path server1 drive2 srct=server destt=drive libr=library1 device=/dev/tsmscsi/mt2
def path server1 drive3 srct=server destt=drive libr=library1 device=/dev/tsmscsi/mt3
3.定義庫
def dev library1 devt=lto format=ultrium2c libr=library1
ANR2203I Device class LIBRARY1 defined
4.定義存儲池
def stgpool mapool library1 maxscratch=2
5.checkin & label磁帶
label libv library1 search=yes voll=ad0005,ad0006,ad0007 labels=barcode checkin=scr overwrite=yes waitt=0
ANR2017I Administrator ADMIN issued command: LABEL LIBVOLUME library1 search=yes voll=ad0005,ad0006,ad0007 labels=b
checkin=scr overwrite=yes waitt=0
ANR0984I Process 41 for LABEL LIBVOLUME started in the BACKGROUND at 05:48:25 AM.
ANR8799I LABEL LIBVOLUME: Operation for library LIBRARY1 started as process 41.ANS8003I Process number 41 started.
ANR8810I Volume AD0005 has been labeled in library LIBRARY1.
ANR8810I Volume AD0006 has been labeled in library LIBRARY1.
ANR8810I Volume AD0007 has been labeled in library LIBRARY1.
ANR8801I LABEL LIBVOLUME process 41 for library LIBRARY1 completed; 3 volume(s)labeled, 3 volume(s) checked-in.
ANR0985I Process 41 for LABEL LIBVOLUME running in the BACKGROUND completed with completion state SUCCESS at 05:48:25
AM.
這裏採用搜索的方法,以barcode 來搜索ad0005,ad0006,ad0007 三盤磁帶,並label 它們,而後檢入到磁帶庫,使之成爲
臨時卷,不等待管理員放入磁帶,直接開始。
這裏適合磁帶已經在磁帶庫裏面的狀況,就不須要發出reply 這個命令了,因此waittime 設置爲0.
這裏的search 設置爲yes,而不是bulk 是有緣由的,當設置爲yes 時,會在磁帶庫裏面查找磁帶,設置爲bulk 時,會在磁
帶庫的IO 倉裏面查找磁帶。我虛擬出來的磁帶庫沒有IO 倉,因此用YES 這個參數了。
使用checkin=scr 參數,能夠在label 以後,直接把磁帶檢入到磁帶庫,省一步動做
6.註冊一個客戶端
reg node masicong masicong
未完待續 ... 有問題能夠加我QQ 308403756 你們一塊兒討論下