Bacula-users

Re: [Bacula-users] Trouble setting up Bacula on FreeBSD

2016-03-04 20:36:30
Subject: Re: [Bacula-users] Trouble setting up Bacula on FreeBSD
From: Simon Templar <stemplar AT opposedtwin DOT com>
To: Cejka Rudolf <cejkar AT fit.vutbr DOT cz>
Date: Fri, 4 Mar 2016 20:29:44 -0500
It’s been an interesting few days with my bacula system.

Thanks for all the help and the suggestions; I think I’m over the major hurdle of having a non-functioning system. I’ll get to the current config, but first let me answer the questions that were asked:

My freebsd version is 10.2-RELEASE-p12

mt -f /dev/nsa0 geteotmodel
/dev/nsa0: the model is 2 filemarks at EOT

mt -f /dev/nsa0 status -v
Drive: sa0: <QUANTUM ULTRIUM 6 4142> Serial Number: HU1305UGMF
---------------------------------
Mode      Density              Blocksize      bpi      Compression
Current:  0x5a:LTO-6           variable       384607   enabled (0x1)
---------------------------------
Current Driver State: at rest.
---------------------------------
Partition:   0      Calc File Number: 1937     Calc Record Number: 0
Residual:    0  Reported File Number: 1937 Reported Record Number: 38720002
Flags: EOP
---------------------------------
Tape I/O parameters:
 Maximum I/O size allowed by driver and controller (maxio): 131072 bytes
 Maximum I/O size reported by controller (cpi_maxio): 262144 bytes
 Maximum block size supported by tape drive and media (max_blk): 16777215 bytes
 Minimum block size supported by tape drive and media (min_blk): 1 bytes
 Block granularity supported by tape drive and media (blk_gran): 0 bytes
 Maximum possible I/O size (max_effective_iosize): 131072 bytes

mt -f /dev/nsa0 param -l
sili: 0 (Suppress an error on underlength variable reads)
eot_warn: 0 (Return an error to warn that end of tape is approaching)
protection.protection_supported: 1 (Set to 1 if protection information is supported)
protection.prot_method: 0 (Current Protection Method)
protection.pi_length: 0 (Length of Protection Information)
protection.lbp_w: 0 (Check Protection on Writes)
protection.lbp_r: 0 (Check and Include Protection on Reads)
protection.rbdp: 0 (Transfer Protection Information for RECOVER BUFFERED DATA command)

Output of btape fill command:
<snip>
01-Mar 19:39 btape JobId 0: End of Volume "TestVolume1" at 1937:1 on device "QuantumLTO" (/dev/nsa0). Write of 64512 bytes got 0.
01-Mar 19:39 btape JobId 0: Re-read of last block succeeded.
btape: btape.c:2713-0 Last block at: 1936:19999 this_dev_block_num=1
btape: btape.c:2748-0 End of tape 1937:0. Volume Bytes=2,497,779,809,280. Write rate = 79.01 MB/s
01-Mar 19:39 btape JobId 0: End of medium on Volume "TestVolume1" Bytes=2,497,779,809,280 Blocks=38,718,065 at 01-Mar-2016 19:39.
btape: btape.c:3074-0 Autochanger returned: 0
Mount blank Volume on device "QuantumLTO" (/dev/nsa0) and press return when ready:
btape: btape.c:3079-0
Wrote Volume label for volume "TestVolume2".
01-Mar 20:14 btape JobId 0: Wrote label to prelabeled Volume "TestVolume2" on tape device "QuantumLTO" (/dev/nsa0)
01-Mar 20:14 btape JobId 0: New volume "TestVolume2" mounted on device "QuantumLTO" (/dev/nsa0) at 01-Mar-2016 20:14.
btape: btape.c:2316-0 Wrote 1000 blocks on second tape. Done.
Done writing 0 records ...
Wrote End of Session label.
btape: btape.c:2385-0 Wrote state file last_block_num1=19999 last_block_num2=1001
btape: btape.c:2403-0

20:14:44 Done filling tapes at 0:1003. Now beginning re-read of first tape ...
btape: btape.c:2481-0 Enter do_unfill
btape: btape.c:2519-0 Autochanger returned: 0
Mount first tape. Press enter when ready:
btape: btape.c:2522-0
01-Mar 20:16 btape JobId 0: Ready to read from volume "TestVolume1" on tape device "QuantumLTO" (/dev/nsa0).
Rewinding.
Reading the first 10000 records from 0:0.
10000 records read now at 1:5084
Reposition from 1:5084 to 1936:19999
Reading block 19999.
Error reading block: ERR=block.c:484 Read zero bytes Vol=TestVolume1 at -1 on device "QuantumLTO" (/dev/nsa0).

Bacula interrupted by signal 11: Segmentation violation
Kaboom! btape, btape got signal 11 - Segmentation violation at 01-Mar-2016 20:18:23. Attempting traceback.
Kaboom! exepath=/colossus
Calling: /colossus/btraceback /colossus/btape 15075 /tmp
It looks like the traceback worked...
Dumping: /tmp/btape.15075.lockdump
btape: lockmgr.c:1158-0 lockmgr disabled
Segmentation fault (core dumped)

dmesg output:

(sa0:mps0:0:0:0): 10240-byte tape record bigger than supplied buffer
(sa0:mps0:0:0:0): 64512-byte tape record bigger than supplied buffer
pid 17958 (btape), uid 0: exited on signal 11 (core dumped)
pid 15075 (btape), uid 0: exited on signal 11 (core dumped)


Also asked along the way was where I got the suggestions for my configuration attempts, and one of the pages I used for reference was:

I think I started with a configuration (an incorrect one) and after a btape test succeeded I tried a backup, which failed. After that failure I’d change the bacula-sd.conf, re-run btape test, then run a multi-tape btape fill test. Which would always fail. I was going nuts trying to get it to work and wasting many hours per iteration until I read the following sentence on the aforementioned page:

Please use only the simple single tape option because the multiple tape option still doesn't work totally correctly

After learning from the output asked for by Cejka Rudolf and others I landed on a configuration that looked okay, passed a single tape btape fill test, and I then ran a backup. And it mostly worked.

I say mostly because I suffered a lot of shoe-shining, so I’ll probably start a new thread with some spooling questions, but right now I’m reading directly from an nfs mount without spooling and writing to the tape at an average of 130MB/s without undue tape stops and starts, which is okay for now.

Thanks again,
Simon

P.S. My current bacula-sd.conf file:

#

Storage {
  Name             = UralTape
  WorkingDirectory = "/usr/local/bacula/working"
  Pid Directory    = "/var/run"
}

 

Director {
  Name     = Director-Ural
  Password = “#####################"
}

 

Device {
  Name           = QuantumLTO
  Media Type     = LTO6
  Device Type = Tape
  ArchiveDevice = /dev/nsa0
  Description = "LTO-6 for FreeBSD"
  LabelMedia     = yes
  AutomaticMount = yes;               # when device opened, read it
  AlwaysOpen = yes
  RemovableMedia = yes
  Offline On Unmount = no
  Hardware End of Medium = no # Noted as FreeBSD specific in Problems section of manual
  BSF at EOM = yes # Support List Recommendation
  Backward Space Record = yes # Support List Recommendation
  Fast Forward Space File = yes # Noted as FreeBSD specific in Problems section of manual
  TWO EOF = yes # Support List Recommendation
#Minimum Block Size = 64512
#Maximum Block Size = 64512
Maximum File Size = 20GB
# for data spooling, which even using SSD causes slowdown
# tape stops completely while filling SSD, then writes fast to tape, then stops while data spools
# average is about half of using direct read from nfs mount
#Maximum Spool Size = 75gb
#Maximum Job Spool Size = 70gb
#Spool Directory = /usr/local/bacula/spool
#  If you have smartctl, enable this, it has more info than tapeinfo
#  Alert Command = "sh -c 'smartctl -H -l error %c'"


}

 

Messages {
  Name     = Standard
  director = Director-Ural = all
}






On Mar 1, 2016, at 6:34 PM, Cejka Rudolf <cejkar AT fit.vutbr DOT cz> wrote:

Simon Templar wrote (2016/03/01):
Perhaps I should have included this information in the first email,
but I???ve tried several combinations of parameters in the
bacula-sd.conf, and it failed each time. Here are the parts I???ve changed:

And perhaps include latest output of btape -c... /dev/nsa0 "test" command.

What is your FreeBSD version?

What is the output of

mt -f /dev/nsa0 status -v

mt -f /dev/nsa0 geteotmodel

mt -f /dev/nsa0 param -l

?

--
Rudolf Cejka <cejkar at fit.vutbr.cz> http://www.fit.vutbr.cz/~cejkar
Brno University of Technology, Faculty of Information Technology
Bozetechova 2, 612 66  Brno, Czech Republic

------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>