Re: [Bacula-users] How to fix Bacula after tape autoloader dysfunction?

2017-01-09 Thread Charles
On 10/01/17 03:17, Kern Sibbald wrote:
> ...The one thing that does not make sense
> to me, however, is your tapeinfo did not show any Tape Alerts ...

Thanks for being thorough, Kern.

Our bacula-sd.conf's Device stanza for the autoloader did not have an 
Alert Command directive.  Now fixed.



--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] How to fix Bacula after tape autoloader dysfunction?

2017-01-09 Thread Charles
On 09/01/17 22:39, Alan Brown wrote:
> On 09/01/17 14:47, Charles wrote:
>> ... Bacula shows the tape wth status Error (simply
>> reflecting what the autoloader has told it?).
>
> Are you sure it was the loader which had the critical error?

No

> Most "critical errors" of this kind are bacula attempting to unload a
> locked drive

Confirmed in bacula.log

> (Lesson: issue explicit unlocking commands in your startup sequence)
>
> Or they're an attempt to unload a tape from a drive where the loader has
> lost track of what slot it came from.
>
> (Lesson: issue explicit drive unload commands in your startup sequence.)

Have modified /etc/init.d/bacula-sd (Debian Jessie), adding mt rewoffl and
mtx unload commands immediately before bacula-sd is started.

> ...
> Other than that: update volume={tapelabel} volstatus=append

Done

Many thanks for sharing your insights Alan :)

Comments inline above.

The only wrinkle was with the autoloader.  Presumably it marked a tape 
in error because Bacula did.  Clearing the Bacula status did not clear 
the autolodaer status until the tape was loaded to the drive.

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bacula-sd file storage question

2017-01-09 Thread Dimitri Maziuk
On 01/09/2017 01:55 PM, Timo Neuvonen wrote:

> I'm still wondering if this really is the
> simplest way of implementing the file storage?
> 
> What would I lose if I simply had only one of the two device resources, no
> autochanger resource at all, and the jobs would refer directly to the device
> resource? I think it should work too...

What are you trying to achieve? I agree that "virtual autochanger" is a
mind boggle with no obvious practical use, but why are you looking at it
in the first place? One file storage device is exactly how it works,
moreover it's the only way it works natively.

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] How to fix Bacula after tape autoloader dysfunction?

2017-01-09 Thread Kern Sibbald
Hello Charles,

If you do not know who Alan Brown is, I can say that he is at least 10 
times more knowledgeable about the use of tape drives with Bacula than I 
am, so I defer to his analysis.  The one thing that does not make sense 
to me, however, is your tapeinfo did not show any Tape Alerts, which I 
would have expected.

Best regards,
Kern

On 01/09/2017 06:09 PM, Alan Brown wrote:
> On 09/01/17 14:47, Charles wrote:
>> Hello bacula-users :-)
>>
>> Are any tools available to mend Bacula after almost certainly spurious
>> errors reported by a tape autoloader?
>>
>> Within a few minutes of Bacula starting to use an autoloader which had
>> been subject to an abrupt power outage, the autoloader reported a
>> critical tape alert.  Bacula shows the tape wth status Error (simply
>> reflecting what the autoloader has told it?).
> Are you sure it was the loader which had the critical error?
>
>
> Most "critical errors" of this kind are bacula attempting to unload a
> locked drive
>
> (Lesson: issue explicit unlocking commands in your startup sequence)
>
> Or they're an attempt to unload a tape from a drive where the loader has
> lost track of what slot it came from.
>
> (Lesson: issue explicit drive unload commands in your startup sequence.)
>
>
> Yes, they're errors, but not really critical in the overall scheme of
> things even if the loader thinks they are.
>
>
> If you have multipath fibre/SAS/scsi to the drives, then bear in mind
> that locks are logically ORed together.
>
> ie: If you lock drive Z  from controller N and bacula starts using the
> path from controller P, unlock commands from bacula will come from
> controller X and the drive will remain locked.
>
> This caught us out for a long time. I eventually wrote a small shell
> script which worked out what the paths were to any given drive and
> issued unlock commands for ALL of them. This was grafted into a
> localised MTX-changer script.
>
>
> The overall lesson is simple: "Make sure your drives are empty, BEFORE
> (re)starting bacula-sd"
>
>
> Other than that: update volume={tapelabel} volstatus=append
>
> (Or "used" if you simply want to put the tape in a safe)
>
>
>> We believe the condition is spurious but we do not know how to recover
>> from it apart from re-initialising the tape which holds 97% of our
>> backup volume.
>>
>> Best
>>
>> Charles
>>
>>
>>
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> ___
>> Bacula-users mailing list
>> Bacula-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/bacula-users
>>
>>
>
>
>
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bacula-sd file storage question

2017-01-09 Thread Kern Sibbald

  
  
Hello,
  
  The Autochanger definition for the SD you show below is a Virtual
  Autochanger.  It is anything but a dummy, though that is arguable.
  
  If you want more information about it, there are two whitepapers
  on the bacula.org web site that talk about this feature of
  Bacula.  See: www.bacula.org
  -->Documentation-->Whitepapers.  They are: 
  
Disk Backup Design 
  PDF
Best Practices for Disk
Backup 
  PDF 
  
  Best regards,
  Kern
  
  
  On 01/09/2017 08:55 PM, Timo Neuvonen wrote:


  Pasted below is a piece of the  default bacula-sd.conf
My installation is from epel-bacula repo for CentOS 7, but exactly the same
conf example can be found from the latest Bacula source tarball.

Could someone explain why a file storage device is definend as an "dummy"
autochanger, and the two file storage devices to which the autochanger
refers? I can't get the point what this autochanger does - changer command
is an empty string etc, and both the devices use the same /tmp path.

I understand that this could be used as a skeleton, to provide more advanced
autochanger functionality. But since this is the most simplest file storage
device example in the conf file, I'm still wondering if this really is the
simplest way of implementing the file storage?

What would I lose if I simply had only one of the two device resources, no
autochanger resource at all, and the jobs would refer directly to the device
resource? I think it should work too...


Regards,

Timo


#
# Define a Virtual autochanger
#
Autochanger {
  Name = FileChgr1
  Device = FileChgr1-Dev1, FileChgr1-Dev2
  Changer Command = ""
  Changer Device = /dev/null
}

Device {
  Name = FileChgr1-Dev1
  Media Type = File1
  Archive Device = /tmp
  LabelMedia = yes;   # lets Bacula label unlabeled media
  Random Access = Yes;
  AutomaticMount = yes;   # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
  Maximum Concurrent Jobs = 5
}

Device {
  Name = FileChgr1-Dev2
  Media Type = File1
  Archive Device = /tmp
  LabelMedia = yes;   # lets Bacula label unlabeled media
  Random Access = Yes;
  AutomaticMount = yes;   # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
  Maximum Concurrent Jobs = 5
} 



--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users





  


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Restore Job RunAfterJob

2017-01-09 Thread Josip Deanovic
On Monday 2017-01-09 09:56:54 Lloyd Brown wrote:
> On 01/09/2017 09:46 AM, Josip Deanovic wrote:
> > Hi!
> > Maybe you could make use of Verify jobs in case you are restoring the
> > most recent backup and you have fairly recent Verification job run.
> 
> I considered a Verify job.  I haven't done them much, but the trouble is
> that my boss wants a full end-to-end restore test, not just verifying
> what's in the catalog.  So, when the description says "In general,
> *verify* jobs permit you to compare the contents of the catalog to the
> file system, or to what was backed up", I didn't dig much further.
> 
> Of course, there could certainly be a less-obvious way to apply verify
> jobs, that I'm not thinking of now.  I'll dig into it further.

There are several aspects of performing job verification.
The one I would find interesting in your case is the ability to
compare the md5sum of a file on the disk with a value of a md5sum
stored in the catalog.

Anyway it could prove to be hard to achieve because it would require
additional modifications of the bacula configuration (special file set).

So your original question was about running an external script from
the restore job.

I have never needed it but I have tested few minutes ago and I can
confirm that it works as expected.
In my test I have configured a restore job and added a line such as this:
ClientRunAfterJob  = "/etc/bacula/scripts/bla"

It will run on the client after the restore job.



If you are restoring just some subdirectory and not the whole system,
the idea to use the job verification if the job and the file set are 
configured correctly should still be doable.

This approach would make it possible to check your files and get the
report about the missing or modified files sent to your e-mail but
it depends on your particular needs.

The idea with the ClientRunAfterJob will work but you will still need
to get the checksums from the database and compare them with your
file list.


-- 
Josip Deanovic

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] bacula-sd file storage question

2017-01-09 Thread Timo Neuvonen
Pasted below is a piece of the  default bacula-sd.conf
My installation is from epel-bacula repo for CentOS 7, but exactly the same
conf example can be found from the latest Bacula source tarball.

Could someone explain why a file storage device is definend as an "dummy"
autochanger, and the two file storage devices to which the autochanger
refers? I can't get the point what this autochanger does - changer command
is an empty string etc, and both the devices use the same /tmp path.

I understand that this could be used as a skeleton, to provide more advanced
autochanger functionality. But since this is the most simplest file storage
device example in the conf file, I'm still wondering if this really is the
simplest way of implementing the file storage?

What would I lose if I simply had only one of the two device resources, no
autochanger resource at all, and the jobs would refer directly to the device
resource? I think it should work too...


Regards,

Timo


#
# Define a Virtual autochanger
#
Autochanger {
  Name = FileChgr1
  Device = FileChgr1-Dev1, FileChgr1-Dev2
  Changer Command = ""
  Changer Device = /dev/null
}

Device {
  Name = FileChgr1-Dev1
  Media Type = File1
  Archive Device = /tmp
  LabelMedia = yes;   # lets Bacula label unlabeled media
  Random Access = Yes;
  AutomaticMount = yes;   # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
  Maximum Concurrent Jobs = 5
}

Device {
  Name = FileChgr1-Dev2
  Media Type = File1
  Archive Device = /tmp
  LabelMedia = yes;   # lets Bacula label unlabeled media
  Random Access = Yes;
  AutomaticMount = yes;   # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
  Maximum Concurrent Jobs = 5
} 



--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] How to fix Bacula after tape autoloader dysfunction?

2017-01-09 Thread Alan Brown
On 09/01/17 14:47, Charles wrote:
>
> Hello bacula-users :-)
>
> Are any tools available to mend Bacula after almost certainly spurious
> errors reported by a tape autoloader?
>
> Within a few minutes of Bacula starting to use an autoloader which had
> been subject to an abrupt power outage, the autoloader reported a
> critical tape alert.  Bacula shows the tape wth status Error (simply
> reflecting what the autoloader has told it?).

Are you sure it was the loader which had the critical error?


Most "critical errors" of this kind are bacula attempting to unload a 
locked drive

(Lesson: issue explicit unlocking commands in your startup sequence)

Or they're an attempt to unload a tape from a drive where the loader has 
lost track of what slot it came from.

(Lesson: issue explicit drive unload commands in your startup sequence.)


Yes, they're errors, but not really critical in the overall scheme of 
things even if the loader thinks they are.


If you have multipath fibre/SAS/scsi to the drives, then bear in mind 
that locks are logically ORed together.

ie: If you lock drive Z  from controller N and bacula starts using the 
path from controller P, unlock commands from bacula will come from 
controller X and the drive will remain locked.

This caught us out for a long time. I eventually wrote a small shell 
script which worked out what the paths were to any given drive and 
issued unlock commands for ALL of them. This was grafted into a 
localised MTX-changer script.


The overall lesson is simple: "Make sure your drives are empty, BEFORE 
(re)starting bacula-sd"


Other than that: update volume={tapelabel} volstatus=append

(Or "used" if you simply want to put the tape in a safe)


> We believe the condition is spurious but we do not know how to recover
> from it apart from re-initialising the tape which holds 97% of our
> backup volume.
>
> Best
>
> Charles
>
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
>




--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Restore Job RunAfterJob

2017-01-09 Thread Lloyd Brown
On 01/09/2017 09:46 AM, Josip Deanovic wrote:
> Hi!
> Maybe you could make use of Verify jobs in case you are restoring the
> most recent backup and you have fairly recent Verification job run.

I considered a Verify job.  I haven't done them much, but the trouble is
that my boss wants a full end-to-end restore test, not just verifying
what's in the catalog.  So, when the description says "In general,
*verify* jobs permit you to compare the contents of the catalog to the
file system, or to what was backed up", I didn't dig much further.

Of course, there could certainly be a less-obvious way to apply verify
jobs, that I'm not thinking of now.  I'll dig into it further.


-- 
Lloyd Brown
Systems Administrator
Fulton Supercomputing Lab
Brigham Young University
http://marylou.byu.edu

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Restore Job RunAfterJob

2017-01-09 Thread Josip Deanovic
On Monday 2017-01-09 09:37:48 Lloyd Brown wrote:
> I hope this isn't something obvious I've missed, but ... well ... I
> missed it, at least so far.  I'll keep looking but my google-fu seems to
> be missing something.
> 
> Is there an easy way to run an external script (eg. a "RunAfterJob" or
> similar) associated with a *restore* job?  I'm trying to build an
> automated test of restores, and I need a way to trigger an external
> script, so it can md5/sha256 checksum the restored files, etc.
> 
> So far, I've got the actual restore working pretty well, using syntax
> 
> like this:
> > echo 'restore client=backup-fd where=/path/to/restore/destination/
> > restoreclient=backup-fd file= > current yes' | bconsole
> 
> At this point, I can script something that can check the files
> checksums, and optionally notify us if a restore fails.  I just need a
> way to trigger that script to run after the restore job completes.  I
> considered just doing a "echo 'wait' | bconsole" or similar, but there's
> a possibility of other jobs still running, so I don't necessarily want
> to wait for *those*.
> 
> Any thoughts/recommendations? I'm coming up empty at the moment.
> 
> Thanks,
> Lloyd


Hi!

Maybe you could make use of Verify jobs in case you are restoring the
most recent backup and you have fairly recent Verification job run.


-- 
Josip Deanovic

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Restore Job RunAfterJob

2017-01-09 Thread Lloyd Brown
I hope this isn't something obvious I've missed, but ... well ... I
missed it, at least so far.  I'll keep looking but my google-fu seems to
be missing something.

Is there an easy way to run an external script (eg. a "RunAfterJob" or
similar) associated with a *restore* job?  I'm trying to build an
automated test of restores, and I need a way to trigger an external
script, so it can md5/sha256 checksum the restored files, etc.

So far, I've got the actual restore working pretty well, using syntax
like this:

> echo 'restore client=backup-fd where=/path/to/restore/destination/
> restoreclient=backup-fd file= current yes' | bconsole

At this point, I can script something that can check the files
checksums, and optionally notify us if a restore fails.  I just need a
way to trigger that script to run after the restore job completes.  I
considered just doing a "echo 'wait' | bconsole" or similar, but there's
a possibility of other jobs still running, so I don't necessarily want
to wait for *those*.

Any thoughts/recommendations? I'm coming up empty at the moment.

Thanks,
Lloyd

-- 
Lloyd Brown
Systems Administrator
Fulton Supercomputing Lab
Brigham Young University
http://marylou.byu.edu


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Tape full before it should.

2017-01-09 Thread Alan Brown

On 09/01/17 13:45, Kern Sibbald wrote:

Hello,

The status Bacula received was -1, which means that the tape drive 
reported a hardware end of tape (i.e. an end of tape marker was seen.  
This can happen for the following reasons:


1. You reached the hardware end of tape marker at 150GB, but the 
marker was placed in the wrong place on the tape when it was 
manufactured.  I.e. the tape cassette is defective.


Kern, that's not a good interpretation of the problem.


LTO tapes don't have a "hardware end of tape marker" as you might expect 
with DAT or other older unidirectional tapes.



Because of the serpentine layout of the tape, the beginning of the tape 
is also the end of the tape and the servo track (factory written and 
unchangeable) contains "offset distance from end of the reel" information.


Serpentine means:

1: The tape winds to the end of the reel, heads move slightly (onto the 
next track) and then the tape winds back into the cartridge.

2: The heads move to the next track again.
3: This process is then repeated until the last track pair is completed.
4: Data is written to the tape in both directional passes.

When the end of the last track is reached, the tape has been wound back 
into the cartridge.


What this means is that the maximum seek time is approximately half of 
one track length (~900 metres) and that's around 35GB, even if you're 
seeking several hundred GB into the tape - ie: Whilst the seek command 
is a linear offset, actual seeking on a LTO is 2-dimensional - "N track 
and X offset". The tape's internal chip records the 2D location of files 
and data blocks, so that there's never any need to linearly seek along 
all tracks from the start of the tape.


LTO heads are constructed so that drives do read-after-write 
verification on the fly in both directions. A bacula verification pass 
is normally unncecessary because detected errors result in the data 
being rewritten to the tape immediately.


If there are errors, the drive will attempt to rewrite the data several 
times.(*) If all rewrites fail then it will flag an uncorrectable error 
- "The tape is bad and should be discarded"(**). Bacula interprets this 
as an end-of-tape error



(*) This means that errors on a tape result in 2 effects if there are a 
lot of errors


   1: There's a massive slowdown in reported despooling speed for jobs 
and tape "full" capacity is reduced somewhat from the theoretical values 
(somewhere between 90%-250% of _uncompressed_ capacity would be a normal 
tape)


   2: When reading the tape's RFID chip, it will say that they tape is 
somewhere between "97"-"99"% full, but the total amount of data it says 
has been written since last labelled is significantly less than the 
_uncompressed_ value of the tape.


(**) The same effect will occur if the heads are dirty or damaged - and 
it DOES happen(***). Once a contaminated tape finds its way into a drive 
and fouls the heads you can pretty much guarantee that all subsequent 
tapes will have reported problems, but until the heads are cleaned or 
repaired you won't know if the tapes are wrecked or OK.


(***) We had a bad batch of HP LTO5s contaminate multiple drives before 
we realised what was happening. We're still cleaning up the mess 3 years 
later.



Drive error codes actually indicate "drive problem", "tape problem" or 
"unable to work out which is the problem", but the effect is the same as 
far as bacula's concerned. There are a slew of other error codes.




LTO tapes wear out rapidly with repeated use. The lifespan of a LTO tape 
is claimed to be "up to" 162 complete writes but in reality it's more 
like 10-20% of this number before degradation is significant. We're 
seeing tapes with 20-30 write cycles down to 60% of original capacity 
and thanks to rewrites the despool speeds are _very slow_.



Apart from interrogating the tape drive and tape cartridge chip (Kern 
and I have been discussing how to handle this on the fly), Despooling 
speed is a critical indicator of tape health. If it suddenly drops off, 
this is cause for alarm.






2. You are using some tape driver (e.g. the ibm tape driver) rather 
than the Linux st tape driver.  The ibm tape driver does not work 
correctly with Bacula.




Having encountered this problem, the described issue is not consistent 
with the IBM driver error (which comes form "ERROR 0: Success" messages).


In the case of a IBM driver, the tape can be labelled and written quite 
happily. Problems occur when attempts are made to seek to EOD on a tape 
with _existing_ data - the error 0 message fools bacula into thinking 
the operatiopn has failed.



My opinion:

The error reported and the fact that it took 31 minutes to write 150Gb 
before erroring out points to fouled heads.

Load a cleaning tape() and try writing a new tape.
If that writes ok, then discard the errored tape (and possibly the one 
before that). If not then the drive will need return-to-base repairs and 
the test tape/last 

Re: [Bacula-users] How to fix Bacula after tape autoloader dysfunction?

2017-01-09 Thread Charles
On 27/12/16 23:30, bacula-users-requ...@lists.sourceforge.net wrote:
> --
>
> Message: 8
> Date: Fri, 23 Dec 2016 10:13:58 +0530
> From: Charles 
> Subject: [Bacula-users] How to fix Bacula after tape autoloader
>   dysfunction?
> To: bacula-users@lists.sourceforge.net
> Cc: Aurinoco Systems 
> Message-ID:
>   <1d2ef726-aa98-f014-0763-87a5d11de...@charlesmatkinson.org>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> Hello bacula-users :-)
>
> Following misbehaviour by an HP StoreEver 18G2 LTO-6 Ultrium 6250 Tape
> Autoloader, the list volume command shows two tapes with VolStatus Error
> and one tape as Full with VolBytes 12,901,819,392.
>
> We do not believe the information.  Surely an LT06 cannot be filled with
> 12.5 GB.  And in a recent previous similar incident a different tape was
> shown with Error.  We cleared that by re-initialising the Bacula
> database and the tapes.
>
> Happily we have a parallel backup system and anyway the Bacula system
> has not been running long since re-initialisation.  So we can
> re-initialise again.
>
> Alternatively what can we do to recover Bacula from this situation,
> assuming the autoloader is fixed?  The update command can be used to
> change VolStatus but that is a forceful override.  Is there anything
> equivalent to "update slots" for tapes, to ask Bacula to scan all the
> tapes, updating VolStatus, VolBytes etc?
>
> Best
>
> Charles

Hello bacula-users :-)

Are any tools available to mend Bacula after almost certainly spurious 
errors reported by a tape autoloader?

Within a few minutes of Bacula starting to use an autoloader which had 
been subject to an abrupt power outage, the autoloader reported a 
critical tape alert.  Bacula shows the tape wth status Error (simply 
reflecting what the autoloader has told it?).

We believe the condition is spurious but we do not know how to recover 
from it apart from re-initialising the tape which holds 97% of our 
backup volume.

Best

Charles



--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula Startup Errors Log Location

2017-01-09 Thread Daniel Heitepriem

Hi,

you can run bacula director in debug mode using:

"*path/to/your/bacula-dir* -f  -c /*path/to/bacula-dir.conf* -d 400" 
(400 is the maximal debug output, so expect  quite a lot written to stdout)


Best regards,
Daniel

On 09.01.17 14:53, webmas...@peter-speer.de wrote:


Hi there.

I am on CentOS 7 with Bacula 7.4.4 buld from source.
I wonder, if there is a file where I can see why i.e. bacula-dir is 
not coming up i.e. if I have a mistake in my bacula-dir.conf.
Where is bacula logging those messages? I am not able to see anything 
in /var/log/messages or /opt/bacula/log/*...
Is there a way to set and/or increase log level? Does Bacula have a 
config file test parser like other apps have it?


Thanks for your time.
-fuz



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula Startup Errors Log Location

2017-01-09 Thread Josip Deanovic
On Monday 2017-01-09 14:53:21 webmas...@peter-speer.de wrote:
> Hi there.
> 
> I am on CentOS 7 with Bacula 7.4.4 buld from source.
> I wonder, if there is a file where I can see why i.e. bacula-dir is not
> coming up i.e. if I have a mistake in my bacula-dir.conf. Where is
> bacula logging those messages? I am not able to see anything in
> /var/log/messages or /opt/bacula/log/*... Is there a way to set and/or
> increase log level? Does Bacula have a config file test parser like
> other apps have it?
> 
> Thanks for your time.
> -fuz

Hi!

The path to log files depends on your bacula setup.
In my case I can see bacula logs in /var/log/bacula

You can use bacula-dir -t -c /etc/bacula/bacula-dir.conf
to test the configuration.
You can further help yourself while debugging if you run the bacula in
foreground using the option '-f'.
You can also set the debug level using the '-d' option.

-- 
Josip Deanovic

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Bacula Startup Errors Log Location

2017-01-09 Thread webmaster


Hi there.I am on CentOS 7 with Bacula 7.4.4 buld from source.I wonder, if there is a file where I can see why i.e. bacula-dir is not coming up i.e. if I have a mistake in my bacula-dir.conf.Where is bacula logging those messages? I am not able to see anything in /var/log/messages or /opt/bacula/log/*...Is there a way to set and/or increase log level? Does Bacula have a config file test parser like other apps have it?Thanks for your time.-fuz

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Tape full before it should.

2017-01-09 Thread Kern Sibbald

  
  
Hello,
  
  The status Bacula received was -1, which means that the tape drive
  reported a hardware end of tape (i.e. an end of tape marker was
  seen.  This can happen for the following reasons:
  
  1. You reached the hardware end of tape marker at 150GB, but the
  marker was placed in the wrong place on the tape when it was
  manufactured.  I.e. the tape cassette is defective.
  
  2. You are using some tape driver (e.g. the ibm tape driver)
  rather than the Linux st tape driver.  The ibm tape driver does
  not work correctly with Bacula.
  
  Best regards,
  Kern
  
  On 01/09/2017 04:29 AM, Gi Dot wrote:


  
Hi all,
  
  

At the data centre we are using IBM-LTO tape - 3.0TB
  compressed, 1.5T uncompressed. Last 2 nights a backup was
  running and it stopped at about 150GB size and bacula marked
  the tape as full.
  

Since the total amount of backed up data sometimes could be
  huge, I have purged the volume straight away before the tape
  was inserted. There is a total of 10 jobs, and the first job
  holds the biggest data, somewhere around 500GB to 2TB at a
  time. Backup failed at the first job, at 150GB size.
  
  | 3,053 | db01Job  | 2017-01-08 01:00:03 | B| F |   43,942 |   150,874,925,633 | f  
  

Excerpt from the logs:
  07-Jan 05:00 phisbackupdns1-dir JobId 3052: shell command: run AfterJob "/usr/lib64/bacula/delete_catalog_backup"
08-Jan 01:00 phisbackupdns1-dir JobId 3053: Start Backup JobId 3053, Job=phisdb01Job.2017-01-08_01.00.00_52
08-Jan 01:00 phisbackupdns1-dir JobId 3053: Using Device "Drive0"
08-Jan 01:00 phisbackupdns1-sd JobId 3053: Volume "A00053L5" previously written, moving to end of data.
08-Jan 01:01 phisbackupdns1-sd JobId 3053: Warning: For Volume "A00053L5":
The number of files mismatch! Volume=1955 Catalog=0
Correcting Catalog
08-Jan 01:31 phisbackupdns1-sd JobId 3053: End of Volume "A00053L5" at 2106:1 on device "Drive0" (/dev/nst1). Write of 64512
bytes got -1.
08-Jan 01:31 phisbackupdns1-sd JobId 3053: Re-read of last block succeeded.
08-Jan 01:31 phisbackupdns1-sd JobId 3053: End of medium on Volume "A00053L5" Bytes=150,990,400,512 Blocks=2,340,501 at 08-Ja
n-2017 01:31.
08-Jan 01:31 phisbackupdns1-sd JobId 3053: 3307 Issuing autochanger "unload slot 2, drive 0" command.
08-Jan 01:33 phisbackupdns1-sd JobId 3053: No slot defined in catalog (slot=0) for Volume "A00032L5" on "Drive0" (/dev/nst1).
08-Jan 01:33 phisbackupdns1-sd JobId 3053: Cartridge change or "update slots" may be required.
08-Jan 01:33 phisbackupdns1-sd JobId 3053: Warning: mount.c:217 Open device "Drive0" (/dev/nst1) Volume "A00032L5" failed: ER
R=dev.c:513 Unable to open device "Drive0" (/dev/nst1): ERR=No medium found



  Hardware compression is enabled:
# tapeinfo -f /dev/nst1
Product Type: Tape Drive
Vendor ID: 'IBM '
Product ID: 'ULT3580-TD5 '
Revision: 'G360'
Attached Changer API: No
SerialNumber: '10WT008032'
MinBlock: 1
MaxBlock: 8388608
SCSI ID: 1
SCSI LUN: 0
Ready: yes
BufferedMode: yes
Medium Type: 0x58
Density Code: 0x58
BlockSize: 0
DataCompEnabled: yes
DataCompCapable: yes
DataDeCompEnabled: yes
CompType: 0x1
DeCompType: 0x1
BOP: yes
Block Position: 0
Partition 0 Remaining Kbytes: -1
Partition 0 Size in Kbytes: -1
ActivePartition: 0
EarlyWarningSize: 0
NumPartitions: 0
MaxPartitions: 1


  Pool configuration for the volume:
Pool {
  Name = ADHOC
  Label Format = "ADHOC_Vol"
  Pool Type = Backup
  Recycle = yes   
  AutoPrune = yes 
  Storage = ibmts3310
  Volume Retention = 12h
  Recycle Current Volume = Yes
}


  Side note: I just realized that I missed the "Volume Use Duration = 10h" directive in the pool. Reason being is the same tape would be in the drive for 2 nights (Saturday and Sunday), since there is no operator around to change a tape. The tape supposed to be recycled on Sunday night.



  Appreciate if anyone can enlighten me as to why the tape is full way earlier compared to the size that it is able to contain.


  Thanks.

  


  

  
  
  
  
  --
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
  
  
  
  ___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users




  


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! 

Re: [Bacula-users] Schedule 4 disks rotating weekly

2017-01-09 Thread Sergio Belkin
2017-01-04 12:57 GMT-03:00 Phil Stracchino :

> On 01/04/17 10:52, Martin Simmons wrote:
> >> On Fri, 30 Dec 2016 18:37:28 -0300, Sergio Belkin said:
> >>
> >> I have 4 disks:
> >>
> >> I'd want to plug every disk every monday.
> >>
> >> So, Mondays run Full Backups and the rest of the days
> >> Differential/Incremental ones
> >> ...
> >> I'd want that operator: rotate from disk 1 to disk 4 regardless the
> week of
> >> the month. Or at least is a way that set the number of week of the month
> >> regardless of the day of week?
> >
> > You could use "Week of Year" notation (w01, w02 etc) plus the day (mon,
> tue
> > etc).  The schedule might have to be rewritten every year to get
> continuity
> > though.
>
>
> Or you could go the calendar-independent route and set an appropriate
> volume use window.  If you set the volume use window to be just less
> than a week, expiring late Sunday night or early Monday morning, it will
> force Bacula to rotate to the next volume weekly.
>
>
> --
>   Phil Stracchino
>   Babylon Communications
>   ph...@caerllewys.net
>   p...@co.ordinate.org
>   Landline: 603.293.8485
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>


I've implemented a mixed solution, volume use window and time, something
like that:

Schedule {
  Name = "Pool-A"
  Run = Storage=Pool-A Pool=Pool-A Level=Differential  w00,w01, w05, w09,
w13, w17, w21, w25, w29, w33, w37, w41, w45, w49, w53 fri-sun at 23:00
  Run = Storage=Pool-A Pool=Pool-A Level=Differential w02, w06, w10, w14,
w18, w22, w26, w30, w34, w38, w42, w46, w50  mon-thu at 23:00

}

HTH and thanks!


-- 
--
Sergio Belkin
LPIC-2 Certified - http://www.lpi.org
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users