Self update on problem #1 - possible solution

I found that the permissions on the /devices/.../[EMAIL PROTECTED],0:changer 
was rw
for root:sys only. Adding the bacula user to sys and chmod'ing the
device to 660 helped - bacula-sd can now count the number of slots via
mtx-changer.

I found that mtx-changer is not Solaris friendly and has issues with
both the wait_for_drive function

# modified for Solaris' mt
    if mt -f $1 status | grep 'No Additional Sense'  >/dev/null 2>&1;
then
#    if mt -f $1 status | grep ONLINE  >/dev/null 2>&1; then

and the "list" command

#cat ${TMPFILE} | grep " *Storage Element [0-9]*:.*Full" | awk "{print
\$3 #\$4}" | sed "s/Full *\(:VolumeTag=\)*//"

cat ${TMPFILE} | grep ' *Storage Element [0-9]*:.*Full' | awk '{print $3
$4}' | sed 's/Full *:VolumeTag=*//' | sed 's/^\([0-9]*:\)Full/\1/'

----
Alan Davis
Senior Architect
Ruckus Network, Inc.
703.464.6578 (o)
410.365.7175 (m)
[EMAIL PROTECTED]
alancdavis AIM


-----Original Message-----
From: Alan Davis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 03, 2006 2:17 AM
To: 'Alan Davis'; 'bacula-users@lists.sourceforge.net'
Subject: RE: btape won't autoload for TL892 on Solaris 10?

Self update on problem # 2 - it just took an incredibly long time to
reposition to the last block of the first tape again.

I still have the first problem - and reading the responses to similar
questions on the archive didn't help. Here's the clearest response,
could someone clarify?

"Use the Autochanger-Directive in the SD configuration. Use that device 
 with btape and (usually) in the DIR config."


Alan Davis
Senior Architect
Ruckus Network, Inc.
703.464.6578 (o)
410.365.7175 (m)
[EMAIL PROTECTED]
alancdavis AIM


-----Original Message-----
From: Alan Davis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 03, 2006 1:58 AM
To: 'bacula-users@lists.sourceforge.net'
Subject: btape won't autoload for TL892 on Solaris 10?

I'm configuring bacula 1.39.22 on Solaris 10 x86 on an IBM e345 with a
Compaq TL892 library, 2 TZ89 DLT drives w/ 1 TL800 robot. I've been
using a combination of the Bacula manual and Dan Langille's articles to
work out the nuances of the Storage clause for the bacula-sd.conf file.

I'm getting 2 unexpected results from btape fill. It doesn't autoload
the next tape and it hangs after reading the first 10000 records from
the first tape.

Where can I start looking to resolve the problems? Is the no autoload a
problem because I don't have a storage pool defined with appendable
volumes or is it a device configuration problem?

The btape test command says that my settings are ok, and the autochanger
section of btape also works as expected. 

The btape fill command takes about 2 hours to fill the DLTIV tape using
the /dev/rmt/0cbn device. When it reaches the end of the first tape I
get this (debug is set to 99):

Wrote blk_block=540000, dev_blk_num=12500 VolBytes=34,836,415,488
rate=4939.2 KB/s
03-Oct 01:11 btape: End of Volume "TestVolume1" at 51:486 on device
"Drive-1" (/dev/rmt/0cbn). Write of 64512 bytes got 0.
btape: btape.c:2308 Last block at: 51:485 this_dev_block_num=486
btape: btape.c:2342 End of tape 53:0. VolumeCapacity=35,061,304,320.
Write rate = 4934.0 KB/s
03-Oct 01:11 btape: End of medium on Volume "TestVolume1"
Bytes=35,061,304,320 Blocks=543,485 at 03-Oct-2006 01:11.
btape: btape.c:2679 Enter dir_find_next_appendable_volume. stop=1
btape: btape.c:2707 Enter dir_ask_sysop_to_create_appendable_volume
btape: btape.c:2679 Enter dir_find_next_appendable_volume. stop=1
03-Oct 01:11 btape: Invalid slot=0 defined, cannot autoload Volume.
<----##### Unexpected result here
Mount blank Volume on device "Drive-1" (/dev/rmt/0cbn) and press return
when ready: 
btape: dev.c:283 open dev: type=2 dev_name="Drive-1" (/dev/rmt/0cbn)
vol=TestVolume2 mode=OPEN_READ_WRITE
btape: dev.c:328 open dev: device is tape
03-Oct 01:28 btape: 3301 Issuing autochanger "loaded? drive 0" command.

I used mtx in another session to unload the first tape and load the
second. The test continued normally, successfully loading, labeling and
writing to the second tape and then a similar message and the prompt to
reload the first tape.

The process then seems to hang after reading the first 10000 records :

Volume Label:
Id                : Bacula 1.0 immortal
VerNo             : 11
VolName           : TestVolume1
PrevVolName       : 
VolFile           : 0
LabelType         : PRE_LABEL
LabelSize         : 165
PoolName          : Default
MediaType         : DLT-8000
PoolType          : Backup
HostName          : athos
Date label written: 02-Oct-2006 23:12
btape: label.c:227 Leave read_volume_label() VOL_OK
03-Oct 01:31 btape: Ready to read from volume "TestVolume1" on device
"Drive-1" (/dev/rmt/0cbn).
btape: acquire.c:278 jcr->dcr=80df1d8
Rewinding.
Reading the first 10000 records from 0:0.
10000 records read now at 1:5084
Reposition from 1:5084 to 51:485

Here are my device definitions:

Autochanger { 
  Name = Autochanger 
  Device = Drive-1 
  Device = Drive-2 
  Changer Command = "/opt/bacula/bin/mtx-changer %c %o %S %a %d" 
  Changer Device = /dev/changer 
}

Device { 
  Name = Drive-1                      # 
  Drive Index = 0 
  Media Type = DLT-8000 
  Archive Device = /dev/rmt/0cbn 
  AutomaticMount = yes;               # when device opened, read it 
  AlwaysOpen = yes; 
  RemovableMedia = yes; 
  RandomAccess = no; 
  AutoChanger = yes 
  Changer Command = "/opt/bacula/bin/mtx-changer %c %o %S %a %d" 
  Changer Device = /dev/changer 
  # Enable the Alert command only if you have the mtx package loaded 
  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" 
Offline On Unmount      = no 
Hardware End of Medium  = no 
BSF at EOM              = yes 
Backward Space Record   = no 
Fast Forward Space File = no 
TWO EOF                 = yes 
  LabelMedia = yes;                   # lets Bacula label unlabeled
media 
}

Device { 
  Name = Drive-2                      # 
  Drive Index = 1 
  Media Type = DLT-8000 
  Archive Device = /dev/rmt/1cbn 
  AutomaticMount = yes;               # when device opened, read it 
  AlwaysOpen = yes; 
  RemovableMedia = yes; 
  RandomAccess = no; 
  AutoChanger = yes 
  Changer Command = "/opt/bacula/bin/mtx-changer %c %o %S %a %d" 
  Changer Device = /dev/changer 
  # Enable the Alert command only if you have the mtx package loaded 
  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" 
Offline On Unmount      = no 
Hardware End of Medium  = no 
BSF at EOM              = yes 
Backward Space Record   = no 
Fast Forward Space File = no 
TWO EOF                 = yes 
  LabelMedia = yes;                   # lets Bacula label unlabeled
media 
}




----
Alan Davis
Senior Architect
Ruckus Network, Inc.
703.464.6578 (o)
410.365.7175 (m)
[EMAIL PROTECTED]
alancdavis AIM






-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to