推荐给好友 上一篇 | 下一篇

Integrating the Tape Library with an existing Bacula installation

4M)Um@ n/@7G[In a recent article, I wrote about how to setup the various tools, such as mtx-changer, to allow your tape library to work with Bacula. In this article, I'll show how I integrated this tape library into my existing Bacula configuration.

a-`Uy!w&SCBSD爱好者乐园h9gy:^av3ar1g

Given the previous work, I will assume you have mtx-changer working will with your tape library.
4K#c[ V[ ] 
WI E^Q|&[!o 
z7nuK-?A#UThe configurationBSD爱好者乐园8y#_9|#[/p
Here are a few extracts from my bacula-dir.conf file which relate to the tape library:

&{r4] d'p [;\

~*o.vz{ ~/H*z# Definition of DLT tape storage deviceBSD爱好者乐园D;Q0o@;I8A9DW
Storage {BSD爱好者乐园~1|&] Gm+k
  Name       = DigitalTapeLibrary
8`Nm9mNH&H0K  Address    = bacula.example.org
k-o!U"`L7r-}  SDPort     = 9103BSD爱好者乐园[6Mf*ze&eah
  Password   = "VeryComplexPassword"BSD爱好者乐园w&Y*W$dk%@2U

prk H(H1KP  Device     = "DEC TL800"BSD爱好者乐园Y5P1k/Z~VP c
  Media Type = DLT
L0T,qC.G,G6Q}BSD爱好者乐园fX/k1Sq_}X

BSD爱好者乐园-n\ n_!W%S%S{zh

And from bacula-sd.conf:

8Y#J{)`8fq`BSD爱好者乐园 R_ c l-a6[l

Autochanger {BSD爱好者乐园NaL gjG
  Name            = "DEC TL800"
KX#f7GJ+E  Device          = "DEC TZ89"BSD爱好者乐园2Xwt6Vat4^@,]
  Description     = Digital DLT MiniLibrary - TL891BSD爱好者乐园/T4v$G&\ G]P
  Changer Device  = /dev/pass4BSD爱好者乐园u'LZ"?IB
  Changer Command = "/usr/local/sbin/mtx-changer %c %o %S %a %d"BSD爱好者乐园3_&NJ"V!BeD
}BSD爱好者乐园xKNW(SH#z k ?o

BSD爱好者乐园#fG3O5TjD(h

Device {
oA~%i}+qP  Name                    = "DEC TZ89"
6e%X4U(I*s.[,t{(C  Description             = Digital DLT MiniLibrary - TL891
?3@'VH^ K Oq  Media Type              = DLT
"NxgUD-G{-e.m  Archive Device          = /dev/nsa1

;Z$@/te(G9^t5J+r9SBSD爱好者乐园1A uiH2Cz3?Ho|-H

  Autochanger             = yes
x OYkf%\!k  Drive Index             = 0

Q(x!c!H/j2]7v

l7[`)J!Ot{  Offline On Unmount      = noBSD爱好者乐园6b8f&sa1F7XR7w
  Hardware End of Medium  = noBSD爱好者乐园a/{.h4T/K$o,D)O^
  BSF at EOM              = yesBSD爱好者乐园Gjq,^5}2pM
  Backward Space Record   = noBSD爱好者乐园t m:n&L1re8N](a y
  Fast Forward Space File = noBSD爱好者乐园)ls^ vcR8v
  TWO EOF                 = yes

8c(z(AK~APBSD爱好者乐园*XWCu,Nd$yQA

  Spool Directory         = /home/bacula/spooling-libBSD爱好者乐园u"O%?$?[J&`'AX
  Maximum Spool Size      = 11759496889
%Im/?l.D_)g-N  Maximum Job Spool Size  = 11759496889    # 10GB
Lv/D-x/B,~3d`O}

8g#B$C:B4[Dd?F

Jl#Qg$P8nis BSD爱好者乐园 l8{2s5FX N7}
 BSD爱好者乐园YR&o N'`B0z4M
Labelling the tapesBSD爱好者乐园*iz,F}Oy3F6V&|d-x
Here is the command to label my barcodesBSD爱好者乐园 I3o%L2S5~+z-z oe6|C V/C

M Uy8CM*z*label barcodes storage="DigitalTapeLibrary"BSD爱好者乐园 n:uHO'Ok
Automatically selected Catalog: MyCatalogBSD爱好者乐园,g2Vq6X @
Using Catalog "MyCatalog"BSD爱好者乐园 px!Q5k6el
Connecting to Storage daemon DigitalTapeLibrary at bacula.unixathome.org:9103 ...BSD爱好者乐园r-{ h p `q
3306 Issuing autochanger "slots" command.
Gt@,y ?9lq"WDevice "DEC TL800" has 0 slots.BSD爱好者乐园c\rm6Z
No slots in changer to scan.
-o*^9Mc:g%]kR:t*BSD爱好者乐园)n tGZ:K}x,qj)oq

!hqg5`} ?I:U'p^+|Eh? What's that?BSD爱好者乐园 n(?B A0O4O
 
)[ f)]"de f,e6f C x BSD爱好者乐园 eB UYA/|%LzP.J
Fixing permission issues
o3?.Km6{ }` NOh oh! My configuration was wrong. I was using the wrong devices. My configuration (correct as show above) was incorrctly using /dev/pass1, instead of the real device /dev/pass4. This can be seen here:

4D2c6R%v-Ho

kDo$x4X"X%Hm$ sudo camcontrol devlist
4bR:~f,V-KQ!xPassword:
#j#\+f*{} [.~hD<QUANTUM DLT7000 1E48>             at scbus0 target 5 lun 0 (sa0,pass0)
Z;z-R S#EQ<DEC TL800    (C) DEC 0326>        at scbus1 target 0 lun 0 (pass4,ch0)BSD爱好者乐园 pg.h7B(~W)_,p
<DEC TZ89     (C) DEC 1837>        at scbus1 target 5 lun 0 (pass3,sa1)BSD爱好者乐园mf&g]@E0A'Y
<HL-DT-ST DVDRAM GSA-H10A JL02>    at scbus2 target 0 lun 0 (cd0,pass1)
-r5yzu A'q&u)h<USB 2.0 Storage Device 0100>      at scbus5 target 0 lun 0 (da0,pass2)BSD爱好者乐园![Q#n4QJ8~ DZ

BSD爱好者乐园N gT)X2G-Y1b/Us

ch0 is the line in question.

W{)iP9E0~ QoN_5kBSD爱好者乐园M|?T*]1nS?i

After correcting the entry in bacula-sd.conf and restarting bacula-sd, I tried again. But, you should know, that this problem will come back to haunt me. I do know that if the external tape drive is conntected at boot time, the tape changer is /dev/pass1. If it connected after boot, it gets /dev/pass4. I want to fix that. They need to be specific devices for this to work.

5tg6r B| wK3FBSD爱好者乐园9m"x"v(q f_5j8]

$ sudo /usr/local/etc/rc.d/bacula-sd restart
^9w$A#_]3k+@!N#bStopping bacula_sd.
\X4` G,jvFWaiting for PIDS: 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621,
0s'{dW6rf4d/`7T:c 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621,
S `2r obN V 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621,BSD爱好者乐园]S$phGYY(K7xE2G
 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621,BSD爱好者乐园 _\3HN;HA C
 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621,BSD爱好者乐园a/A o.j|*\O%rb
 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621, 46621.BSD爱好者乐园 ~-[0I.S4V ]0d
Starting bacula_sd.

/lb.Ba:f4JBSD爱好者乐园z jmrDCf

All this waiting is for the tape to rewind and unmount. After making the change, I tried again:

H-Y wbdBSD爱好者乐园3e(|a9rJ

*label barcodes storage="DigitalTapeLibrary"BSD爱好者乐园Y#{%j ~(^#As q
Connecting to Storage daemon DigitalTapeLibrary at bacula.unixathome.org:9103 ...BSD爱好者乐园^l_.?^cIm2B
3306 Issuing autochanger "slots" command.BSD爱好者乐园j8?ry{ De8|5tX
Device "DEC TL800" has 0 slots.
U?E4k N\MMNo slots in changer to scan.BSD爱好者乐园'p0L.N0J9ch)tZ

BSD爱好者乐园m)s_*H/YKhWa

Still no good. OK, it must be something else. I rechecked the configuration and found it to be correct. The permissions on mtx-changer were correct:BSD爱好者乐园e I?&ay

g?'{hS"f"Q&~8x"x$ ls -l /usr/local/sbin/mtx-changer
*V\V R(qM+? L-rwxr-xr--  1 root  operator  5221 Oct 30 00:52 /usr/local/sbin/mtx-changerBSD爱好者乐园@+tYT!g#y

BSD爱好者乐园Z/~.Q.r2wvn.I?

Is Bacula in the operator group?BSD爱好者乐园u~#Hn2va5@%Fd

~[/Z&w Onv$a3SX$ id baculaBSD爱好者乐园/?Ov&x,Wd
uid=910(bacula) gid=910(bacula) groups=910(bacula),5(operator)

?yI%KO#t/UUBSD爱好者乐园+xe XB m5vr*gVC:O

Yes, so Bacula can run mtx-changer. OK, what about the tape changer?

pY*a+}1w E!]r

4jc&Q Sk |Eh$ ls -l /dev/pass4BSD爱好者乐园!EY;}&E)z|
crw-------  1 root  operator    0, 171 Jan 17 15:19 /dev/pass4BSD爱好者乐园B"n C8G l5Q]tTA

*R\.N#w$G1[ah! There's the issue. No operator permissions on that device. On FreeBSD, you can set these permissions via configuration. I added the following line to /etc/devfs.conf:BSD爱好者乐园8_9sjs%S \ | i

V1U qt@NX[perm    pass4   0660

;vm&I2` SW"n0E8Q`BSD爱好者乐园 C P#g0}f l$[/r

Then I restarted devfs, and rechecked the permissions:BSD爱好者乐园]'g yhV(agU([

BSD爱好者乐园 E~i C9NQC4y

$ /etc/rc.d/devfs restart
1kTK"Mrim$ ls -l /dev/pass4
4e&?z`*bUt/}crw-rw----  1 root  operator    0, 171 Jan 17 15:19 /dev/pass4BSD爱好者乐园)eN Je2?,MpGx

BSD爱好者乐园-?W8?4^E!z

Ahh good! Progress. Now, let us try the command correctly, using su to run the command as the bacula user:BSD爱好者乐园1W?%U@v[,y

D7gRcRc'h# su -m bacula -c '/usr/local/sbin/mtx-changer /dev/pass4 slots'
U ? f`e4ptouch: /var/db/bacula/mtx.log: Permission denied
oa6p8KX(v0G_/usr/local/sbin/mtx-changer: cannot create /var/db/bacula/mtx.log: Permission de                      niedBSD爱好者乐园#n"}%obDe*RG.eV!b
/usr/local/sbin/mtx-changer: cannot create /var/db/bacula/mtx.log: Permission de                      niedBSD爱好者乐园.x? _:N@!@u0G
10BSD爱好者乐园1Aj Qa a
# ls -l /var/db/bacula/mtx.log
BjCz$rdX-rw-r--r--  1 root  bacula  2480 Jan 17 17:53 /var/db/bacula/mtx.log

1c;_6lr!N3\ d Q

D z2G;{ Ik&bpNow we see the correct number of slots, and another permissions issue comes to light. This one is easily fixed with:BSD爱好者乐园]/m&Pn&b-a

^4cN f1G7hY# chmod g+w /var/db/bacula/mtx.log
ePGi@4I&oL0@5?L# ls -l /var/db/bacula/mtx.logBSD爱好者乐园 q+@8\ R C"LhE
-rw-rw-r--  1 root  bacula  2480 Jan 17 17:53 /var/db/bacula/mtx.logBSD爱好者乐园B'Rb*`WSD$g
# su -m bacula -c '/usr/local/sbin/mtx-changer /dev/pass4 slots'BSD爱好者乐园-N@ w5M }
10

8N+N]"ez/c8uIFvBSD爱好者乐园k9w[a B r#Q!A

Now, let's try bconsole again:

$gKQ;V6x$CVq0v

T6M;D4N5er3e'yi*label barcodes storage="DigitalTapeLibrary"
I7g @Y l f3?}9ygConnecting to Storage daemon DigitalTapeLibrary at bacula.unixathome.org:9103 ...
?!Uk3\W.N;O` j?3306 Issuing autochanger "slots" command.BSD爱好者乐园T"H[#jy-Yl-M |
Device "DEC TL800" has 10 slots.
x8w#`n-R { P5R ]4ZConnecting to Storage daemon DigitalTapeLibrary at bacula.unixathome.org:9103 ...
E/v\t ]uKH3306 Issuing autochanger "list" command.
,KLW9J }_G)f4w hG:jThe following Volumes will be labeled:
.T%N0\F$}Slot  VolumeBSD爱好者乐园y*M}Y{ k u"^o\9_
==============
A1h/O%OS   1  DGG472
.d9f+EO'[,o   2  DGG440BSD爱好者乐园 S`3zJ~ E9?#MAf
   3  DGG443
P/T3umSjC   4  DGG467
1X? R Lf+K4e/SJ(G   5  DGG469
/h ddp,r t)^   6  DGG442
7czk2[Q:Es4i#g   7  DGG457
6DJ n(m6]   8  DGG441
^ v2B~3];P   9  DGG471BSD爱好者乐园6} A `Q F
  10  DGG465BSD爱好者乐园&\$K&@ Gf6n`A
Do you want to label these Volumes? (yes|no):

;u9}H0_-yd!qBSD爱好者乐园f"J[Iq3^.f'd(D#M

Good. Very good. Let us proceed. My replies are in boldBSD爱好者乐园4H(O,n5H!F

x.D,W-e)gDo you want to label these Volumes? (yes|no): yesBSD爱好者乐园(JMkk(?
Defined Pools:
qo3DP BF&n     1: DefaultBSD爱好者乐园2Xo^D5o4h&V
     2: FilePoolBSD爱好者乐园G8tgX1CjZU
Select the Pool (1-2): 1BSD爱好者乐园OO7[ o(P;_9Jc
Media record for Slot 1 Volume "DGG472" already exists.BSD爱好者乐园E~%[R0s9Q&k
Connecting to Storage daemon DigitalTapeLibrary at bacula.unixathome.org:9103 ...BSD爱好者乐园k|5[?8x
Sending label command for Volume "DGG440" Slot 2 ...BSD爱好者乐园C.KoW-j#G2V
3301 Issuing autochanger "loaded? drive 0" command.
z:Ai _)JFy4p3302 Autochanger "loaded? drive 0", result: nothing loaded.BSD爱好者乐园 N,|? MF*B,{d
3304 Issuing autochanger "load slot 2, drive 0" command.
X C"A%\qie`3305 Autochanger "load slot 2, drive 0", status is OK.BSD爱好者乐园)Y V!X8M{'d
3000 OK label. VolBytes=64512 DVD=0 Volume="DGG440" Device="DEC TZ89" (/dev/nsa1)
,ql`F"YCatalog record for Volume "DGG440", Slot 2  successfully created.
K8X0T5A.PuQMedia record for Slot 3 Volume "DGG443" already exists.BSD爱好者乐园C3@^5gw#c4U s
Sending label command for Volume "DGG467" Slot 4 ...BSD爱好者乐园 tM3z_0Y-Q/]
3307 Issuing autochanger "unload slot 2, drive 0" command.
;c(~.o!~S3304 Issuing autochanger "load slot 4, drive 0" command.
/nh b[O3305 Autochanger "load slot 4, drive 0", status is OK.
(h9A B~'aaMn3000 OK label. VolBytes=64512 DVD=0 Volume="DGG467" Device="DEC TZ89" (/dev/nsa1)
^a0h&{?ex*A,fCatalog record for Volume "DGG467", Slot 4  successfully created.
+z0b2zxh_Sending label command for Volume "DGG469" Slot 5 ...BSD爱好者乐园F0L%]1U+aeFp M
3307 Issuing autochanger "unload slot 4, drive 0" command.BSD爱好者乐园1ctXu"[5H1P*B
3304 Issuing autochanger "load slot 5, drive 0" command.BSD爱好者乐园5Q#w'b?YVJ
3305 Autochanger "load slot 5, drive 0", status is OK.BSD爱好者乐园8}8T+?)nW#l ^}
3000 OK label. VolBytes=64512 DVD=0 Volume="DGG469" Device="DEC TZ89" (/dev/nsa1)
niy1voCatalog record for Volume "DGG469", Slot 5  successfully created.BSD爱好者乐园a1fjqK5o T3B%lsAV
Sending label command for Volume "DGG442" Slot 6 ...
2J'DV.s0A gY`'TK3307 Issuing autochanger "unload slot 5, drive 0" command.
$d,k0w0_6RF0d+z*o3304 Issuing autochanger "load slot 6, drive 0" command.
I&oG@$y.dsT3305 Autochanger "load slot 6, drive 0", status is OK.
;p*iD;xv7L$Kt3000 OK label. VolBytes=64512 DVD=0 Volume="DGG442" Device="DEC TZ89" (/dev/nsa1)
M\{ Hh0w%PSCatalog record for Volume "DGG442", Slot 6  successfully created.BSD爱好者乐园R!isSd
Sending label command for Volume "DGG457" Slot 7 ...BSD爱好者乐园,nW!SAU
3307 Issuing autochanger "unload slot 6, drive 0" command.
(Q:S({e O.y1g9Tqi3304 Issuing autochanger "load slot 7, drive 0" command.BSD爱好者乐园3o-w,^D5jW|.i
3305 Autochanger "load slot 7, drive 0", status is OK.
5}sU hl3000 OK label. VolBytes=64512 DVD=0 Volume="DGG457" Device="DEC TZ89" (/dev/nsa1)
!}4Q'EQ&i A$e-\Qa)^Catalog record for Volume "DGG457", Slot 7  successfully created.
R n/EcKC7e/[N NSending label command for Volume "DGG441" Slot 8 ...
Eoh k"Y)s3307 Issuing autochanger "unload slot 7, drive 0" command.
4s e7T3u"^S1F3304 Issuing autochanger "load slot 8, drive 0" command.BSD爱好者乐园 I[LO cVA0r
3305 Autochanger "load slot 8, drive 0", status is OK.BSD爱好者乐园+yb-D-w:GI
3000 OK label. VolBytes=64512 DVD=0 Volume="DGG441" Device="DEC TZ89" (/dev/nsa1)BSD爱好者乐园 T`:D blO
Catalog record for Volume "DGG441", Slot 8  successfully created.
'q"e7lF ]2FYSending label command for Volume "DGG471" Slot 9 ...
)b%j4~pN p3307 Issuing autochanger "unload slot 8, drive 0" command.
_nP rW3304 Issuing autochanger "load slot 9, drive 0" command.BSD爱好者乐园~&x&g6wk[5` sN
3305 Autochanger "load slot 9, drive 0", status is OK.BSD爱好者乐园Dt;]z,L6} hC9T z/`8N#f
3000 OK label. VolBytes=64512 DVD=0 Volume="DGG471" Device="DEC TZ89" (/dev/nsa1)BSD爱好者乐园 Gi U+O&q*[QX*o%z2u
Catalog record for Volume "DGG471", Slot 9  successfully created.BSD爱好者乐园 nW2t}:`
Media record for Slot 10 Volume "DGG465" already exists.
5~;Uc6kM,dX*

xj"W$Xz u I'XBSD爱好者乐园1bKn'}!q7m5B)G {

Oh. Well. That's a problem. All the volumes already have media records for them. That is, the Catalog already contains a record with that label. OK, easily fixed. Delete them. 
)b4Q9kx&jj*s)j)R8I-F B BSD爱好者乐园wk$Rb e:s7|
Deleting Volumes
)BTi:B?_bmPI have ten Volumes to delete from my Catalog.BSD爱好者乐园2h-uIZVL,y

LK%t(NlY+---------+------------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+BSD爱好者乐园:f7to TeXl
| mediaid | volumename       | volstatus | enabled | volbytes       | volfiles | volretention | recycle | slot | inchanger | mediatype | lastwritten         |
)A'[0F rj){ k!@o+---------+------------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+BSD爱好者乐园(E9T']"Tc3k5|
|     248 | DGG472           | Used      |       1 |         64,512 |        0 |   31,536,000 |       1 |    1 |         1 | DLT       |                     |BSD爱好者乐园-[ d{G$DZ8V0jn
|     249 | DGG443           | Used      |       1 |         64,512 |        0 |   31,536,000 |       1 |    3 |         1 | DLT       |                     |
A/Qsp(uc!{-B|     250 | DGG465           | Used      |       1 |         64,512 |        0 |   31,536,000 |       1 |   10 |         1 | DLT       |                     |
Y~ J0?aU O6L|     251 | DGG440           | Append    |       1 |         64,512 |        0 |   31,536,000 |       1 |    2 |         1 | DLT       |                     |BSD爱好者乐园 N!G y^x
|     252 | DGG467           | Append    |       1 |         64,512 |        0 |   31,536,000 |       1 |    4 |         1 | DLT       |                     |
#M7`3`-Jfb{5z;x|     253 | DGG469           | Append    |       1 |         64,512 |        0 |   31,536,000 |       1 |    5 |         1 | DLT       |                     |
3y[5S6S"y`-^|     254 | DGG442           | Append    |       1 |         64,512 |        0 |   31,536,000 |       1 |    6 |         1 | DLT       |                     |BSD爱好者乐园)X7p8| T2NpF
|     255 | DGG457           | Append    |       1 |         64,512 |        0 |   31,536,000 |       1 |    7 |         1 | DLT       |                     |
0Ha(s-U+P%P"{-o|     256 | DGG441           | Append    |       1 |         64,512 |        0 |   31,536,000 |       1 |    8 |         1 | DLT       |                     |BSD爱好者乐园 G P#o |d9JL%G Z;v
|     257 | DGG471           | Append    |       1 |         64,512 |        0 |   31,536,000 |       1 |    9 |         1 | DLT       |                     |BSD爱好者乐园.}.I` WS-h b:h
+---------+------------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+

t\z b:`L-`@6`

b3[5h"A0@tI can do one delete, manually, like this:

3Z{#L"_p.L1O/|

b^jE4Wx2_*delete volume="DGG472"
w _ka^L8bAutomatically selected Catalog: MyCatalog
-_2vt2qXw+U zUsing Catalog "MyCatalog"

#ODW!Wp {3S.S$y^#e4`is

C1[5Z;i U7BThis command will delete volume DGG472BSD爱好者乐园ve C-H$r~o3s
and all Jobs saved on that volume from the CatalogBSD爱好者乐园*O _W2PCN
Are you sure you want to delete Volume "DGG472"? (yes/no): yesBSD爱好者乐园t&Cy5|C d/@
*BSD爱好者乐园6fX$t.D3TE-F"cx H

$^mY,jP_But you can reduce typing by altering the original command, by putting yes into the line.BSD爱好者乐园Z-Pj%t:x v4j

;q&O;@O ^7?_m H*label barcodesBSD爱好者乐园q-zB%_ r3B
The defined Storage resources are:
Hmg w!~3x~-hQ-pM     1: File
fnf NBvt}(Yq     2: FileRemoteBSD爱好者乐园2W S _M]1l
     3: FileRemoteTLSBSD爱好者乐园br {| v8t$x,H
     4: DLT
Vf a/b7i$oI \5X     5: DigitalTapeLibraryBSD爱好者乐园 YND1H l
     6: DLTRemoteBSD爱好者乐园.AR/b/T2V B;}6K5S
     7: DLTRemoteTLSBSD爱好者乐园!np6xt2UFl
Select Storage resource (1-7): 5BSD爱好者乐园-H:K5pr0dfPUB
Connecting to Storage daemon DigitalTapeLibrary at bacula.unixathome.org:9103 ..                            .BSD爱好者乐园G u+js Jy)X#pQ8w
3306 Issuing autochanger "slots" command.BSD爱好者乐园9Os&L;]'v?H+R}
Device "DEC TL800" has 10 slots.
%P'Fy7n5eConnecting to Storage daemon DigitalTapeLibrary at bacula.unixathome.org:9103 ..                            .
U7BSq!Q$xwo3306 Issuing autochanger "list" command.
I1L-Z r'TQ\The following Volumes will be labeled:BSD爱好者乐园.x9]Q4uCC U*P)W9MY
Slot  Volume
1e7_Z/}M\Q o==============
p)w;M+]P3AsW   1  DGG472
[KX D"l%f   2  DGG440BSD爱好者乐园MW{,z:wt&|G a J
   3  DGG443
Vx3B I _,@$K y6P   4  DGG467
MZQ.k9}6HE [*~h X?   5  DGG469
'n BE){0TkQ"UH   6  DGG442
kw5?+}'a   7  DGG457
n3s'X/NY4P q   8  DGG441BSD爱好者乐园 ] F ~6[RNgt,Bl8t'{
   9  DGG471BSD爱好者乐园+{ia RW Io
  10  DGG465BSD爱好者乐园k$? RF2B(_.r
Do you want to label these Volumes? (yes|no): yesBSD爱好者乐园 {^ lLB'E3G+@U
Defined Pools:BSD爱好者乐园T k)N#UUH)WW,`%o+j
     1: DefaultBSD爱好者乐园"k,JBeQU9B
     2: FilePoolBSD爱好者乐园HbK[8s-t3\*gL s
Select the Pool (1-2): 1
[:jR!M/v(]3DConnecting to Storage daemon DigitalTapeLibrary at bacula.unixathome.org:9103 ..                            .BSD爱好者乐园oQ&Q^w?S
Sending label command for Volume "DGG472" Slot 1 ...
u;K5z#N'H ~ Z3301 Issuing autochanger "loaded? drive 0" command.BSD爱好者乐园 h]1VE0XHn
3302 Autochanger "loaded? drive 0", result: nothing loaded.BSD爱好者乐园1s.B8|8lN FT
3304 Issuing autochanger "load slot 1, drive 0" command.
U1] RF3~ I7}3305 Autochanger "load slot 1, drive 0", status is OK.BSD爱好者乐园$mQ8eb j!]B
3000 OK label. VolBytes=64512 DVD=0 Volume="DGG472" Device="DEC TZ89" (/dev/nsa1                            )
d#S)Df)aK/IMCatalog record for Volume "DGG472", Slot 1  successfully created.BSD爱好者乐园Un(zXK!q
Sending label command for Volume "DGG440" Slot 2 ...BSD爱好者乐园h$fF m:onuo
3307 Issuing autochanger "unload slot 1, drive 0" command.BSD爱好者乐园L_d:q?(r
3304 Issuing autochanger "load slot 2, drive 0" command.BSD爱好者乐园Td/}u3k"j Pr:f
3305 Autochanger "load slot 2, drive 0", status is OK.BSD爱好者乐园y ze&KB6E*GO
3920 Cannot label Volume because it is already labeled: "DGG440"
v.QT9o"b*U:ULabel command failed for Volume DGG440.BSD爱好者乐园 [0j Vh%fta
Sending label command for Volume "DGG443" Slot 3 ...
g@Z(a A~h|3307 Issuing autochanger "unload slot 2, drive 0" command.
TP#XsEQ:`0k8S:TD3304 Issuing autochanger "load slot 3, drive 0" command.BSD爱好者乐园9\0|d x2}h7RH#|
3305 Autochanger "load slot 3, drive 0", status is OK.
^M;M I4z Z+cPi#Q3000 OK label. VolBytes=64512 DVD=0 Volume="DGG443" Device="DEC TZ89" (/dev/nsa1)BSD爱好者乐园/XuZ%{.y-JT UF n
Catalog record for Volume "DGG443", Slot 3  successfully created.
t.ki#F MoSending label command for Volume "DGG467" Slot 4 ...
(i(l d#q0l5Pn:Rh3307 Issuing autochanger "unload slot 3, drive 0" command.BSD爱好者乐园$_LE~j2H}v#r
3304 Issuing autochanger "load slot 4, drive 0" command.BSD爱好者乐园2^4p'J F k&XM
3305 Autochanger "load slot 4, drive 0", status is OK.BSD爱好者乐园*}2d~+@2|j`9w/@~"C!p
3000 OK label. VolBytes=64512 DVD=0 Volume="DGG467" Device="DEC TZ89" (/dev/nsa1)
0gxG;OR X o8^`nCatalog record for Volume "DGG467", Slot 4  successfully created.
H#NQ8?#HX8}Sending label command for Volume "DGG469" Slot 5 ...BSD爱好者乐园p"[E6~un
3307 Issuing autochanger "unload slot 4, drive 0" command.BSD爱好者乐园a/j'Su`J|L
3304 Issuing autochanger "load slot 5, drive 0" command.
#oc3m.Xf-@ X R { un3305 Autochanger "load slot 5, drive 0", status is OK.BSD爱好者乐园6cP;Rq5EX
3000 OK label. VolBytes=64512 DVD=0 Volume="DGG469" Device="DEC TZ89" (/dev/nsa1)
iA'\4wB4]iCatalog record for Volume "DGG469", Slot 5  successfully created.
:jE-AZ[wESending label command for Volume "DGG442" Slot 6 ...BSD爱好者乐园G[LNvp
3307 Issuing autochanger "unload slot 5, drive 0" command.BSD爱好者乐园#@:l$A ||E;E
3304 Issuing autochanger "load slot 6, drive 0" command.
^Nf4c)M0mE N0~3305 Autochanger "load slot 6, drive 0", status is OK.
^%D5c,z2d9}S3000 OK label. VolBytes=64512 DVD=0 Volume="DGG442" Device="DEC TZ89" (/dev/nsa1)BSD爱好者乐园/J(M0L:_}8x9_j
Catalog record for Volume "DGG442", Slot 6  successfully created.BSD爱好者乐园#x7Ipw0W2q5w
Sending label command for Volume "DGG457" Slot 7 ...BSD爱好者乐园)b H%t n;S1SU
3307 Issuing autochanger "unload slot 6, drive 0" command.BSD爱好者乐园 nT;jCFnM
3304 Issuing autochanger "load slot 7, drive 0" command.
[K[$YC6[/u7g3305 Autochanger "load slot 7, drive 0", status is OK.
@F@"j_3000 OK label. VolBytes=64512 DVD=0 Volume="DGG457" Device="DEC TZ89" (/dev/nsa1)BSD爱好者乐园-|Xu&z}M3Tc
Catalog record for Volume "DGG457", Slot 7  successfully created.BSD爱好者乐园#A ~ ^g#iE
Sending label command for Volume "DGG441" Slot 8 ...
`eR"B9j#?_:Q,S3307 Issuing autochanger "unload slot 7, drive 0" command.
^*mY Ke)V2K-T*~3304 Issuing autochanger "load slot 8, drive 0" command.BSD爱好者乐园QZNK*MPdP
3305 Autochanger "load slot 8, drive 0", status is OK.
0C3P1S+Y6z ]m3000 OK label. VolBytes=64512 DVD=0 Volume="DGG441" Device="DEC TZ89" (/dev/nsa1)
?H)R&I~9xCatalog record for Volume "DGG441", Slot 8  successfully created.
5uITxd mSending label command for Volume "DGG471" Slot 9 ...
IU2dU5^1Y3307 Issuing autochanger "unload slot 8, drive 0" command.BSD爱好者乐园;Z} y v`/S|JEP
3304 Issuing autochanger "load slot 9, drive 0" command.
oI7K!_|3305 Autochanger "load slot 9, drive 0", status is OK.
6\ilwS [3000 OK label. VolBytes=64512 DVD=0 Volume="DGG471" Device="DEC TZ89" (/dev/nsa1)BSD爱好者乐园ihvj'gkJ;rCn
Catalog record for Volume "DGG471", Slot 9  successfully created.BSD爱好者乐园P5yuQ}M$m
Sending label command for Volume "DGG465" Slot 10 ...BSD爱好者乐园%V$mqc.U?
3307 Issuing autochanger "unload slot 9, drive 0" command.BSD爱好者乐园 ]y1G:O6OH1I)`
3304 Issuing autochanger "load slot 10, drive 0" command.BSD爱好者乐园.o%x@ Cb J[
3305 Autochanger "load slot 10, drive 0", status is OK.BSD爱好者乐园%l'xT%W/o9^ n'}-\
3000 OK label. VolBytes=64512 DVD=0 Volume="DGG465" Device="DEC TZ89" (/dev/nsa1)
p0y2P$Eh.r!}ttCatalog record for Volume "DGG465", Slot 10  successfully created.BSD爱好者乐园A)W1e[UtHY
*

bho5j(O/J#YBSD爱好者乐园&ml;S5O%u

Phew. That's the tapes labelled.BSD爱好者乐园J5Auo#Q}UI
 
Kyi$H @ BSD爱好者乐园!O8`~5jy m z{
Done, but not finished
2J%bj4f]1v2lThere are still a few things to sort out:BSD爱好者乐园-ri'^O&b

BSD爱好者乐园n,DQ,go

ensuring the devices are always the same regardless of whether they are att at boot time.BSD爱好者乐园odM.Po
making sure Bacula uses sa0 unless I tell it to use sa1. I don't want the tape library used unless I'm away
Z B.X(RK;i!onverify that /boot/devices.hints contains the rights stuff to do the aboveBSD爱好者乐园1V+ov3M v
Achieving these goals won't be done today. So they will be left for a future article. Enjoy.BSD爱好者乐园8Q,gK)J,[#v}


[重要提醒]对本篇资料有疑问,请到论坛讨论,尽量使文章准确无误>>>
[版权声明]BSD爱好者乐园站内文章,如来源不是互联网,则均系原创或翻译之作,可随意转载,或以此为基础进行演译,但务必以链接形式注明原始出处和作者信息,否则属于侵权行为。另对本站转载他处文章,俱有说明,如有侵权请联系本人,本人将会在第一时间删除侵权文章。
TAG: library Tape Library
 

评分:0

我来说两句

seccode