Veritas Netbackup 命令行下的磁带添加步骤
a.在添加磁带前的准备
请先对NBU管理下的带库进行以下必要的信息统计:
1.运行以下的命令确认您需要添加磁带的带库是哪一个,有TLD(X)多个字样,代表有多个带库(一般一个带库配一个机械手)。
# tpconfig -d |grep robot
Currently defined robotics are:
TLD(0) robotic path = /dev/ovpass0,
2. 可用槽位数量的统计,并记下多个空白的槽位号(Slot Number),
一个号对应一个磁带(在没有活动的备份作业下进行统计,保证正确性):
# vmcheckxxx -rt tld -rn 0
Robot Contents Volume Configuration
Slot Tape Barcode Media ID Barcode Mismatch Detected
==== ==== ============= ======== ============= =================
1 No
2 Yes A00029L3 0029L3 A00029L3
3 Yes A00008L3 0008L3 A00008L3
4 Yes A00027L3 0027L3 A00027L3
5 Yes A00028L3 0028L3 A00028L3
6 Yes A00025L3 0025L3 A00025L3
7 Yes A00026L3 0026L3 A00026L3
8 Yes A00006L3 0006L3 A00006L3
9 Yes A00007L3 0007L3 A00007L3
10 Yes A00009L3 0009L3 A00009L3
11 Yes A00005L3 0005L3 A00005L3
12 Yes A00023L3 0023L3 A00023L3
13 Yes A00024L3 0024L3 A00024L3
14 Yes A00034L3 0034L3 A00034L3
15 Yes A00033L3 0033L3 A00033L3
16 Yes A00030L3 0030L3 A00030L3
17 Yes A00032L3 0032L3 A00032L3
18 Yes A00031L3 0031L3 A00031L3
19 Yes A00020L3 0020L3 A00020L3
20 Yes A00021L3 0021L3 A00021L3
21 Yes A00022L3 0022L3 A00022L3
22 No
23 No
24 No
25 No
26 No
27 No
28 No
29 No
30 No
3.确定所添加磁带的类型,注意查看media type 对应部分是磁带方式,所添加的磁带也要一致(对应一个带库中只有同种类型的驱动器):
# available_media
media media robot robot robot side/ ret size status
ID type type # slot face level KBytes
----------------------------------------------------------------------------
3387L2 HCART3 TLD 0 265 - 1 1172684704 ACTIVE
3420L2 HCART3 TLD 0 269 - 1 520476128 ACTIVE
3422L2 HCART3 TLD 0 259 - 1 22788992 ACTIVE
0019L3 HCART3 TLD 0 232 - 1 1317927456 FULL
# tpconfig -l 这个带库中只有同种类型的驱动器
Device Robot Drive Robot Drive Device
Type Num Index Type DrNum Status Comment Name Path
robot 0 - TLD - - - - /dev/ovpass0
drive - 1 hcart3 1 UP - IBM.ULT3580-TD3.000 /dev/rmt1.1
drive - 1 hcart3 1 UP - IBM.ULT3580-TD3.000 /dev/rmt4.1
drive - 2 hcart3 2 UP - IBM.ULT3580-TD3.001 /dev/rmt2.1
drive - 2 hcart3 2 UP - IBM.ULT3580-TD3.001 /dev/rmt5.1
drive - 3 hcart3 3 UP - IBM.ULT3580-TD3.002 /dev/rmt3.1
drive - 3 hcart3 3 UP - IBM.ULT3580-TD3.002 /dev/rmt6.1
drive - 0 pcd - DISABL - IBM.DDSGEN5.000 /dev/rmt0.1
b.在确认没有活动备份作业的情况下进行以下操作,必要时停nbu服务。如果确定备份空闲时间有一个小时,足够放磁带到带库中了。否则,需停nbu服务。
在机器现场把需要添加的磁带准备好,新磁带必须先正确地贴好标示(添加磁带的类型必须正确),按照带库厂商的要求放置添加到相应的cap 里面(进、出带窗口)。
1.进入robtest 模式,手工把 cap 里面(进、出带窗口)的磁带移动到之前记录下来的slot 里面(一个槽号对应一个磁带)。批量放置好磁带到cap 里面(进、出带窗口)后
进行以下操作:
假设你放了3盒磁带带在磁带cap窗口(从上到下放),准备要放到S29,S53,S123的槽位中。
# robtest (这里是在备份主机上输入此命令)
Configured robots with local control supporting test utilities:
TLD(0) robotic path = /dev/ovpass0
Robot Selection
---------------
1) TLD 0
2) none/quit
Enter choice: 1 输入相应的数字进入
Robot selected: TLD(0) robotic path = /dev/ovpass0
Invoking robotic test utility:
/usr/openv/volmgr/bin/tldtest -rn 0 -r /dev/ovpass0
Opening /dev/ovpass0
MODE_SENSE complete 等待初始化完毕
Enter tld commands (? returns help information)
m p1 s29 开始从第1号窗口移动磁带到29号槽位,
Initiating MOVE_MEDIUM from address 1053 to 778
MOVE_MEDIUM complete
m p2 s53 等待上一个操作提示完成;再开始从第2号窗口移动磁带到53号槽位
Initiating MOVE_MEDIUM from address 1077 to 779
MOVE_MEDIUM complete
m p3 s123 等待上一个操作提示完成;再开始从第2号窗口移动磁带到53号槽位
robtest下的参考命令:
s s (显示槽位里面的情况,是否有磁带.注意:每次输入命令时,需要等待上一个命令输出完成)
s p (显示磁带进出窗口里面的情况,是否有磁带)
s d (显示驱动器里面的情况,是否有磁带)
? (帮助)
m - Move medium
s [d|p|t|s [n]] [raw] - Read element status
specifies drive (d#), slot (s#), media access port (p#),
or transport (t#)
is drive #, slot #, media access port #, or transport #
[#] is number of elements for d, s, p, or t
NOTE - drive # is 1 - Number of drives
slot # is 1 - Number of slots
media access port # is 1 - Number of media access port elements
transport # is 1 - Number of transports
= (d)rive, (s)lot, media access (p)ort, or (t)ransport
unload - Issue SCSI unload
= d1 or 1, d2 or 2, d3 or 3 ... d648 or 648
2.不管是添加磁带还是从带库中取磁带,对于NBU来说需要进行磁带数据库的更新操作。
添加磁带的话,还需要更新到临时池scratch pool里面。
#vmupdate -rt tld -rn 0
Generating list of recommended changes ...
Proposed Change(s) to Update the Volume Configuration
=====================================================
Logically add new media 2357L3 (barcode I32357L3) to robot slot 4.
Logically add new media 2339L3 (barcode I32339L3) to robot slot 7.
Logically add new media 2350L3 (barcode I32350L3) to robot slot 10.
Logically add new media 2349L3 (barcode I32349L3) to robot slot 14.
Logically add new media 2324L3 (barcode I32324L3) to robot slot 17.
Logically add new media 2325L3 (barcode I32325L3) to robot slot 22.
Logically add new media 2323L3 (barcode I32323L3) to robot slot 24.
Logically add new media 2354L3 (barcode I32354L3) to robot slot 25.
Logically add new media 2330L3 (barcode I32330L3) to robot slot 28.
Logically add new media 2329L3 (barcode I32329L3) to robot slot 34.
Logically add new media 2342L3 (barcode I32342L3) to robot slot 35.
Logically add new media 2356L3 (barcode I32356L3) to robot slot 37.
Logically add new media 2332L3 (barcode I32332L3) to robot slot 41.
Logically add new media 2334L3 (barcode I32334L3) to robot slot 47.
Logically add new media 2335L3 (barcode I32335L3) to robot slot 60.
Logically add new media 2326L3 (barcode I32326L3) to robot slot 61.
Updating volume configuration ...
Processing new media added to the robotic library by logically
adding media with new media IDs as follows...
Media ID Slot
======== ====
2357L3 4
2339L3 7
2350L3 10
2349L3 14
2324L3 17
2325L3 22
2323L3 24
2354L3 25
2330L3 28
2329L3 34
2342L3 35
2356L3 37
2332L3 41
2334L3 47
2335L3 60
2326L3 61
Volume configuration successfully updated.
问题:
如果运行 vmupdate -rt tld -rn 0 时提示有磁带不能添加,且提示新加的磁带(有提示在哪个槽位)与带库中有相同的barcode,这样就不能添加。
需要弹出磁带。再重新运行 vmupdate -rt tld -rn 0,直到添加完毕 。
robtest 模式下弹出磁带:
Enter tld commands (? returns help information)
m s29 p10 把在29号槽中的磁带弹出到第10号出窗口
Initiating MOVE_MEDIUM from address 1053 to 778
MOVE_MEDIUM complete
c.更新磁带到scratch pool。更新之前请再次运行available_media,查看新加磁带状况,
包括在哪个pool中(如果添加的磁带是以前带库中的旧带,运行vmupdate可能会直接更新到scratch pool ,这样,加磁带完毕;新磁带的则不会。)
。
1.利用vmpool获取scratch pool Numbers,这里是 4,记下。
# vmpool -listall -bx
pool index host user group description
---------------------------------------------------------------------------------------------
None 0 ANYHOST ANY NONE the None pool
NetBackup 1 ANYHOST root (0) NONE the NetBackup pool
DataStore 2 ANYHOST root (0) NONE the DataStore pool
CatalogBackup 3 ANYHOST root (0) NONE NetBackup Catalog Backup pool
scratch 4 ANYHOST ANY NONE ----
2.利用vmchange 更新到scratch pool (如果添加的磁带是以前带库中的旧带,运行vmupdate可能会直接更新到scratch pool ;新的则不会。)
(Associate this volume with a different pool)
vmchange [-h
| ]
-p -m
# vmchagne -p 4 -m 2326L3 (把2326L3磁带更新到scratch 号为4的scratch pool,多个磁带用UltraEdit编辑批量运行);
完毕,最后请再次运行available_media确认新加磁带即可用available磁带数量是否比以前增加,是否在scratch pool 。
阅读(1568) | 评论(0) | 转发(0) |