Bacula-users

Re: [Bacula-users] Unable to position to end of data on device

2013-09-24 10:30:07
Subject: Re: [Bacula-users] Unable to position to end of data on device
From: Radosław Korzeniewski <radoslaw AT korzeniewski DOT net>
To: Deepak <deepak AT palincorporates DOT com>
Date: Tue, 24 Sep 2013 16:25:35 +0200
Hello,

2013/9/24 Deepak <deepak AT palincorporates DOT com>:
>
> I have removed lin_tape driver permanently loaded st driver and rebooted
> system . now it is showing st devices as my st devices.
>
> [root@bacula ~]# lsscsi | grep tape
> [1:0:2:0]    tape    IBM      ULT3580-TD4      B710  /dev/st0
> [1:0:3:0]    tape    IBM      ULT3580-TD4      B710  /dev/st1
> [1:0:4:0]    tape    IBM      ULT3580-TD4      B710  /dev/st5
> [1:0:5:0]    tape    IBM      ULT3580-TD4      B710  /dev/st7
> [2:0:4:0]    tape    IBM      ULT3580-TD4      B710  /dev/st2
> [2:0:5:0]    tape    IBM      ULT3580-TD4      B710  /dev/st3
> [2:0:6:0]    tape    IBM      ULT3580-TD4      B710  /dev/st4
> [2:0:7:0]    tape    IBM      ULT3580-TD4      B710  /dev/st6
>
>
> I have modified my devices configuration in bacula-sd file too.
>
> device configuration is below for autochanger device:
>
> #######################################################
> Autochanger {
>   Name = Autochanger
>   Device = Tape-0, Tape-1, Tape-2, Tape-3
>   Changer Command = "/usr/lib64/bacula/mtx-changer %c %o %S %a %d"
>   Changer Device = /dev/changer

Is it a right device? For mtx you need to use scsi generic device.
Could you show your lsscsi -g output command, please?

> }
>
> Device {
>   Name = Tape-0
>   Drive Index = 0
>   Media Type = LTO-4
> #  Archive Device = /dev/lin_tape/IBMtape0
>   Archive Device = /dev/st0
>   AutomaticMount = yes;               # when device opened, read it
>   AlwaysOpen = yes;
>   LabelMedia = yes;
>   RemovableMedia = yes;
>   RandomAccess = no;
> #  Maximum File Size = 5GB
>     Hardware End of Medium = No
>     Fast Forward Space File = No
> ## Changer Command = "/usr/lib64/bacula/mtx-changer %c %o %S %a %d"
> ## Changer Device = /dev/sg0
>   AutoChanger = yes
> #  # Enable the Alert command only if you have the mtx package loaded
>  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
> ## If you have smartctl, enable this, it has more info than tapeinfo
> ## Alert Command = "sh -c 'smartctl -H -l error %c'"
>   TWO EOF = yes
>   MaximumOpenWait = 600
> }

I'm worried about your "Hardware End of Medium = No", "Fast Forward
Space File = No" and "TWO EOF = yes" parameters. Did you test your
configuration with btape? What was the result? This is my Device
resource for IBM LTO-4 drive:

Device {
  Name = Drive-0
  Drive Index = 0
  Media Type = LTO-4-IBM
  Archive Device =
"/dev/tape/by-path/pci-0000:04:00.0-fc-0x2002000e111354e4:0x0000000000000000-nst"
  AutomaticMount = yes;
  AlwaysOpen = yes;
  RemovableMedia = yes;
  RandomAccess = no;
  AutoChanger = yes
  Maximum File Size = 8GB
  Spool Directory = /var/spool/bacula
  Maximum Spool Size = 800G
  Maximum Job Spool Size = 128G
#  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
#  If you have smartctl, enable this, it has more info than tapeinfo
#  Alert Command = "sh -c 'smartctl -H -l error %c'"
}

It is working great for a few years now.

>
> ################################################
>
>
> I have restarted bacula and started some jobs but I am getting below error:
>
> ################################################
>
> 2013-09-24 16:33:02backup-dir JobId 37: Start Backup JobId 37,
> Job=CONFIGBackup.2013-09-24_16.33.00_05
> 2013-09-24 16:33:02backup-dir JobId 37: Using Device "Tape-0"
> 2013-09-24 16:33:03backup-sd JobId 37: 3304 Issuing autochanger "load slot
> 3, drive 0" command.
> 2013-09-24 16:38:04backup-sd JobId 37: Fatal error: 3992 Bad autochanger
> "load slot 3, drive 0": ERR=Child died from signal 15: Termination.
> Results=Program killed by Bacula (timeout)

Autochanger definition is not working. I suspect it is a problem with
wrong autochanger device. YMMV.

>
> 2013-09-24 16:38:04backup-fd JobId 37: Fatal error: job.c:2395 Bad response
> to Append Data command. Wanted 3000 OK data
> , got 3903 Error append data
>
> 2013-09-24 16:38:04backup-dir JobId 37: Error: Bacula backup-dir 5.2.12
> (12Sep12):
>   Build OS:               x86_64-unknown-linux-gnu redhat Enterprise release
>   JobId:                  37
>   Job:                    CONFIGBackup.2013-09-24_16.33.00_05
>   Backup Level:           Full
>   Client:                 "backup-fd" 5.2.12 (12Sep12)
> x86_64-unknown-linux-gnu,redhat,Enterprise release
>   FileSet:                "CONFIG" 2013-09-23 15:30:25
>   Pool:                   "BACKUP" (From Job resource)
>   Catalog:                "DefaultCatalog" (From Client resource)
>   Storage:                "Autochanger" (From Pool resource)
>   Scheduled time:         24-Sep-2013 16:33:00
>   Start time:             24-Sep-2013 16:33:02
>   End time:               24-Sep-2013 16:38:04
>   Elapsed time:           5 mins 2 secs
>   Priority:               10
>   FD Files Written:       0
>   SD Files Written:       0
>   FD Bytes Written:       0 (0 B)
>   SD Bytes Written:       0 (0 B)
>   Rate:                   0.0 KB/s
>   Software Compression:   None
>   VSS:                    no
>   Encryption:             no
>   Accurate:               yes
>   Volume name(s):
>   Volume Session Id:      1
>   Volume Session Time:    1380020355
>   Last Volume Bytes:      547,871,450,112 (547.8 GB)
>   Non-fatal FD errors:    1
>   SD Errors:              1
>   FD termination status:  Error
>   SD termination status:  Error
>   Termination:            *** Backup Error ***

> 24-Sep 17:00 backup-dir JobId 38: Start Backup JobId 38,
> Job=CONFIGBackup.2013-09-24_17.00.00_11
> 24-Sep 17:00 backup-dir JobId 38: Using Device "Tape-0"
> 24-Sep 17:03 backup-sd JobId 38: Warning: Volume "A00042L4" wanted on
> "Tape-0" (/dev/st0) is in use by device "Tape-0" (/dev/st0)
> 24-Sep 17:03 backup-sd JobId 38: Warning: mount.c:217 Open device "Tape-0"
> (/dev/st0) Volume "A00042L4" failed: ERR=dev.c:513 Unable to open device
> "Tape-0" (/dev/st0): ERR=No medium found

Well, if your autochanger is not working (see above comment) then "No
medium found" is a right error for that. Did you verified what st
(/dev/st0, /dev/st1, ... etc.) device correspond to what drive index
in your configuration?

>
> with mtx and mt tape drive is working fine manually I have manually tested
> mtx-changer command too.
>

Could you show your manual test procedure and output?

For production setup I use a permanent device name provided by udev,
not /dev/st* or /dev/sg*. It saved me from a lot of trouble.

I fount you are using a lot of tape drives in you library, so I
recommend to verify what device correspond to what drive index in your
configuration. it is not usual that /dev/st0 has drive index = 5.

best regards
-- 
Radosław Korzeniewski
radoslaw AT korzeniewski DOT net

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users