Re: [Bacula-users] [Bacula-devel] Load slots timeout

2014-11-09 Thread Kern Sibbald
On 11/10/2014 06:54 AM, Jesper Krogh wrote:
>> On 09/11/2014, at 17.14, Dan Langille  wrote:
>>
>> Five minutes to load a tape is way too long for something which succeeds.  
>> My hypothesis: there is a problem with the process.
> Yes and no
>
> If the tape has been closed properly then Yes, if it hasnt the first thing 
> the drive is going to do is to pass over the entire tape to get the 
> end-marker position out of the tape which can take way more than 5 minutes 
> and really isnt an error state.  

When Bacula is using mtx (the mtx-changer script) to load a tape, it
does not move the tape to the end of media marker.  This will happen
later only if Bacula is going to write on the tape.  Thus moving to the
end of the media is not part of the timeout for loading a tape -- unless
you have some really non-standard tape drive or OS kernel driver, which
I have never heard of.

Best regards,
Kern

>
> And to my knowledge there is no way to detect it other than to wait
>
> Jesper
> --
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>


--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] [Bacula-devel] Load slots timeout

2014-11-09 Thread Jesper Krogh

> On 09/11/2014, at 17.14, Dan Langille  wrote:
> 
> Five minutes to load a tape is way too long for something which succeeds.  My 
> hypothesis: there is a problem with the process.

Yes and no

If the tape has been closed properly then Yes, if it hasnt the first thing the 
drive is going to do is to pass over the entire tape to get the end-marker 
position out of the tape which can take way more than 5 minutes and really isnt 
an error state.  

And to my knowledge there is no way to detect it other than to wait

Jesper
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Failed on backup volume 2 suddenly

2014-11-09 Thread Keith T
Hi there,
Since last two month the monthly job always failed when backup data to volume 2 
(around 73%) with below error message. I should not do any change of bacula 
configuration in this period. Any idea? Thanks in advance!

Connecting to Director baculab:9101
1000 OK: bacula-dir Version: 5.2.13 (19 February 2013)
Enter a period to cancel a command.
message
10-Nov 01:12 bacula-fd JobId 1105: Error: bsock.c:429 Write error sending 29424 
bytes to Storage daemon:localhost:910
3: ERR=Connection reset by peer
10-Nov 01:12 bacula-fd JobId 1105: Fatal error: backup.c:1200 Network send 
error to SD. ERR=Connection reset by peer
10-Nov 01:45 bacula-dir JobId 1105: Fatal error: sql_create.c:860 Fill File 
table Query failed: INSERT INTO File (Fil
eIndex, JobId, PathId, FilenameId, LStat, MD5, DeltaSeq) SELECT 
batch.FileIndex, batch.JobId, Path.PathId, Filename.F
ilenameId,batch.LStat, batch.MD5, batch.DeltaSeq FROM batch JOIN Path ON 
(batch.Path = Path.Path) JOIN Filename ON (b
atch.Name = Filename.Name): ERR=ERROR:  relation "batch" does not exist
LINE 1: ...ameId,batch.LStat, batch.MD5, batch.DeltaSeq FROM batch JOIN...
 ^
10-Nov 01:45 bacula-dir JobId 1105: Error: Bacula bacula-dir 5.2.13 (19Jan13):
  Build OS:   x86_64-unknown-linux-gnu redhat
  JobId:  1105
  Job:    COMMTHLY1.2014-11-05_23.31.32_13
  Backup Level:   Full
  Client: "baculab-fd" 5.2.13 (19Jan13) 
x86_64-unknown-linux-gnu,redhat,
  FileSet:    "baculab Monthly Backup FS1" 2014-06-01 08:00:00
  Pool:   "MonthlyPool" (From Job resource)
  Catalog:    "MyCatalog" (From Client resource)
  Storage:    "usbstorage1" (From Job resource)
  Scheduled time: 05-Nov-2014 23:31:31
  Start time: 05-Nov-2014 23:31:35
  End time:   10-Nov-2014 01:45:21
  Elapsed time:   4 days 2 hours 13 mins 46 secs
  Priority:   9
  FD Files Written:   53,612,033
  SD Files Written:   0
  FD Bytes Written:   3,432,140,478,966 (3.432 TB)
  SD Bytes Written:   0 (0 B)
  Rate:   9705.6 KB/s
  Software Compression:   None
  VSS:    no
  Encryption: yes
  Accurate:   no
  Volume name(s): COMHKM10HDD1|COMHKM10HDD2
  Volume Session Id:  2
  Volume Session Time:    1415159058
  Last Volume Bytes:  1,450,907,925,271 (1.450 TB)
  Non-fatal FD errors:    587
  SD Errors:  0
  FD termination status:  Error
  SD termination status:  Running
  Termination:    *** Backup Error ***

Best regards,Keith
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Configuration reload for bacula-sd

2014-11-09 Thread Dmitri Maziuk
On 11/9/2014 5:53 AM, Kern Sibbald wrote:

> Bacula can only mount one device in any given Device section at a time,
> but in an Autochanger (virtual or not) there are multiple Devices and
> each can have its own directory.  However, if you use different
> directories, you must use different Media Types otherwise, Bacula will
> not know the right directory to look in for "fixed" disks.

That's the part that doesn't make sense to me: why not? If I have 2 
ait-3 tape drives, do I always have to put a tape in the drive that 
originally wrote it? If yes, then fine, whatever (and I haven't used 
bacula with tapes so I actually don't know), but if not, why do file 
volumes have to be different?

Aside from that it looks to me that you can't use different media types 
in the same pool, so yes, you can use more than one disk. But you have 
to define a separate pool for each and spread your clients over the 
pools and guesstimate your backup sizes/client correctly and generally 
make the whole thing much more complicated than it needs to be.

Dima


--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] [Bacula-devel] Load slots timeout

2014-11-09 Thread Kern Sibbald

  
  
Hello,
  
  Assuming you are using the Bacula mtx-changer script.
  
  In case of really big problems with the mtx-changer script, the
  first step is to execute it by hand and see what it outputs.  The
  second step is to set the environment variable debug_log=1 and the
  working directory at the file mtx.log.  That should give a better
  idea what is going on.
  
  Best regards,
  Kern
  
  On 11/09/2014 05:14 PM, Dan Langille wrote:


  
  
  
  
  

  On Nov 8, 2014, at 7:28 PM, Dan Langille  wrote:
  
  



  

  On Nov 4, 2014, at 6:55 AM, Andrey
Chebotarev 
wrote:
  
  


  
  
  

Hi guys.

I use bacula 5.2.13 with IBM TS3200 library.

Periodically I face problem with load slot time
out. In logs it looks lilke:

22-Sep 00:35 baculasrv-dir JobId
  10471: Recycled volume "220AAAL6"
22-Sep 00:35 baculasrv-sd JobId
  10471: 3304 Issuing autochanger "load slot 1,
  drive 1" command.
22-Sep 00:40 baculasrv-sd JobId
  10471: Fatal error: 3992 Bad autochanger "load
  slot 1, drive 1": ERR=Child died from signal
  15: Termination.
Results=Program killed by Bacula
  (timeout)
22-Sep 00:32 sqcompose-fd JobId
  10471: Fatal error: backup.c:1019 Network send
  error to SD.

As I understood, bacula tries to load slot for 5
minutes and if it's not successful stops job.
I started investigation why bacula sometimes
doesn't manage to load slot in 5 minutes and
find out library stops responding to commands
and starts cleaning drive procedure which takes
more than 5 minutes(Library was configured to
clean drive automatically)

So how can I solve the problem?
I've found place in mtx-changer script where
declared 300 seconds to wait. I've increased it
value to 1800 seconds. Is it only place or I
have to change somthing else in sources?
  
  

  

  
  
  
  

  Hi everybody.
Increasing timeout in mtx-changer script hasn't
helped, I have the same issue. Where in sources I
can increase timeout to 30 minutes?
  

  
  
  
  I don’t see why this is on devel  It should be on users,
  which is cc’d here.

  


  
  Have you ensured everything is correct with the permissions
etc?
  
  
  Five minutes to load a tape is way too long for something
which succeeds.  My hypothesis: there is a problem with the
process.
  
  
  Configuring an autochanger has many places where it can go
astray.
  
  
  I documented some of the pitfalls here: http://www.freebsddiary.org/tape-library.php
  
  
  And more of the odd stuff here: http://www.freebsddiary.org/tape-library-integration.php
  
  
  Hope that helps.
  
  
— 
Dan Langille
  
  
  
  
  
  --

  
  
  
  ___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users



  


--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] [Bacula-devel] Load slots timeout

2014-11-09 Thread Dan Langille

> On Nov 8, 2014, at 7:28 PM, Dan Langille  > wrote:
> 
> 
>> On Nov 4, 2014, at 6:55 AM, Andrey Chebotarev > > wrote:
>> 
>> 
>>> Hi guys.
>>> 
>>> I use bacula 5.2.13 with IBM TS3200 library.
>>> 
>>> Periodically I face problem with load slot time out. In logs it looks lilke:
>>> 
>>> 22-Sep 00:35 baculasrv-dir JobId 10471: Recycled volume "220AAAL6"
>>> 22-Sep 00:35 baculasrv-sd JobId 10471: 3304 Issuing autochanger "load slot 
>>> 1, drive 1" command.
>>> 22-Sep 00:40 baculasrv-sd JobId 10471: Fatal error: 3992 Bad autochanger 
>>> "load slot 1, drive 1": ERR=Child died from signal 15: Termination.
>>> Results=Program killed by Bacula (timeout)
>>> 22-Sep 00:32 sqcompose-fd JobId 10471: Fatal error: backup.c:1019 Network 
>>> send error to SD.
>>> 
>>> As I understood, bacula tries to load slot for 5 minutes and if it's not 
>>> successful stops job.
>>> I started investigation why bacula sometimes doesn't manage to load slot in 
>>> 5 minutes and find out library stops responding to commands and starts 
>>> cleaning drive procedure which takes more than 5 minutes(Library was 
>>> configured to clean drive automatically)
>>> 
>>> So how can I solve the problem?
>>> I've found place in mtx-changer script where declared 300 seconds to wait. 
>>> I've increased it value to 1800 seconds. Is it only place or I have to 
>>> change somthing else in sources?
>> 
> 
> 
>> Hi everybody.
>> Increasing timeout in mtx-changer script hasn't helped, I have the same 
>> issue. Where in sources I can increase timeout to 30 minutes?
> 
> I don’t see why this is on devel  It should be on users, which is cc’d here.
> 

Have you ensured everything is correct with the permissions etc?

Five minutes to load a tape is way too long for something which succeeds.  My 
hypothesis: there is a problem with the process.

Configuring an autochanger has many places where it can go astray.

I documented some of the pitfalls here: 
http://www.freebsddiary.org/tape-library.php 


And more of the odd stuff here: 
http://www.freebsddiary.org/tape-library-integration.php 


Hope that helps.

— 
Dan Langille

--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Configuration reload for bacula-sd

2014-11-09 Thread Kern Sibbald
On 11/08/2014 09:20 PM, Dmitri Maziuk wrote:
> PS. I should probably clarify that bacula has very convenient
> automatic volume management features that work perfectly well with
> single-filesystem disk backup.  It's a pity bacula's disk backup
> mechnism is apparently designed so you can have either automatic
> volume management or multiple disks, but not both.

As mentioned in a prior response, Bacula *may* actually permit both
providing each disk has its own filesystem (path). 

I would add small nuance to what you wrote:  if Bacula does *only* allow
either automatic volume management or multiple disks, it is not by
"design", but rather because other than some elementary USB stick code I
wrote and the no longer used DVD code, we never thought about dealing
with the particularities of hot-swappable disks.

By the way, during my vacation I noticed that you gave some very helpful
advice on this list -- thanks.

Kern

>
> Dima
>


--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Configuration reload for bacula-sd

2014-11-09 Thread Kern Sibbald
On 11/08/2014 07:35 PM, Dmitri Maziuk wrote:
> On 11/8/2014 5:36 AM, Kern Sibbald wrote:
>
>> I think so.  If I understand correctly, you want disk mount points or
>> directories to be treated much like a tape drive, so that you can
>> mount multiple "disks".
>>
>> I think this feature is already implemented, with one difference ...
>> that when the device is mounted, it assumes that it has a
>> filesystem  on it rather than treating it as a raw device.
>
> Either way works, filesystem makes it easy to see what's on it, but
> you have to mkfs on a new disk.
>
>> Much like the Virtual Autochanger feature, I am not 100% sure where this
>> is documented, so you may have to search for it. The main requirement
>> for it to work is to configure the SD Device (even if it is a disk
>> device) as removable.
>
> "Devices that require a mount (USB)" in
> http://www.bacula.org/7.0.x-manuals/en/main/Storage_Daemon_Configuratio.html#SECTION00173
> says, among other things, "write part command must be defined". "Write
> part command" is somewhat documented in "Devices that require a mount
> (DVD)" in docs for 5.0 and below, but not in 7.0. Its purpose is
> unclear, my guess would be it's intended for "write to optical disk
> but not close it", no idea how or why that would apply to a usb stick.

It looks like the document is out of date.  I am not sure we ever made a
pass through the manual to remove the DVD documentation.  In any case, a
mount command may or may not be necessary for doing USB, but the "Write
Part Command" is definitely not needed and indeed not used any more.

>
> From reading that section I can't figure out the config for 12-bay
> hot-swap sata storage server where I can write to all disks and
> replace them as they get full, just like they were tapes. (But see my
> reading comprehension note below.)

I don't remember what the configuration would be, because I have not
used the feature for about 5 years, but the first step would be to play
with setting "Removable Media" to true, then looking at whether or not
"Requires Mount" and the "Mount Point" and "Mount Command" are needed. 
If you have setup your USB to be automatically mounted, which seems to
be the default now, but was not when I used the feature, you may not
need any mount commands, though if the operator must explicitly remove
and replace a disk, I imagine they will be required.
>
>> By the way, in case you have not noticed, there are three white
>> papers posted on the bacula.org web site, two of them, if I am not
>> mistaken, document Virtual Autochangers as implemented in the
>> community version (slightly different from the Enterprise version).
>
> I notice now, thanks.
>
> CommunityDiskBackup.pdf has the same old problem in 2.1 Grouping
> Storage Devices: as usual, it talks multiple devices and shows 2
> Device definitions with Archive Device = /disk in both. Personally I
> don't know how to mount multiple physical devices in the same /disk at
> the same time and keep them separate too.

Bacula can only mount one device in any given Device section at a time,
but in an Autochanger (virtual or not) there are multiple Devices and
each can have its own directory.  However, if you use different
directories, you must use different Media Types otherwise, Bacula will
not know the right directory to look in for "fixed" disks.

>
> Same goes for 2.2 Virtual Autochanger: it doesn't let you write to
> multiple (disk) devices, it lets bacula treat a single Archive Device
> as "multipe devices" -- presumably for concurrent access.

I am not sure why you believe the above.  Each Device can have a
different Archive Device path.  The examples probably use the same
directory so that it does not get too complicated (with Media Types and
all).  I suggest you just try using different disk devices and see what
happens.

>
> Same goes for section 3 (Multiple Devices) in
> CommunityDiskBackupDesign.pdf
>
> At least that's what I read in there. Maybe I'm not reading it right:
> the years have not been kind and my leet reading comprehension skillz
> ain't what they used to be.

I think it is just that the examples are simpler than what you want to do.

>
> The rest of it is very useful but not germane to the topic of using
> multiple hot-swappable disks for storage.

In principle hot-swappable disks should work, but since I don't think
anyone has done it before, there may be hidden problems that I am not
aware of.

>
> This is all great but so far the only known config I've actually seen
> working is a vchanger. I'd consider buying it off and rolling it into
> bacula proper so instead of much handwaving and allegations of "maybe
> documented somewhere" features you'd have a definitive and working
> answer for retentive assholes like me.

I would say that if you are already using vchanger and it works for you,
you should stick with it.  If someone is setting up a new configuration,
the Virtual Autochanger feature may or may not be able to solve the

Re: [Bacula-users] CentOS 6.6 SELINUX Problems BACULA 5.2.18 [Help]

2014-11-09 Thread Simone Caronni
Hello,

you should do some debugging on the SELinux side, this is not related to
Bacula. It is too complicated to explain by mail, Redhat docs are very
good in this regard.

On Fri, 2014-11-07 at 13:06 -0500, Humphrey Bryant wrote:
> I check, recheck and double check all permissions on my volumes/files
> and directory and everything was OK but when i run the backup they
> still hang nonetheless. It was after I temporarily disabled SELINUX
> backup start working again, so I am of the conclusion that SELINUX is
> at fault here..
> 
> I need some help getting SELINUX to play nice with Bacula on CENTOS
> 6.6, can anyone here help me out please. any one can help me create a
> policy or something, I don’t want to upgrade my production server and
> have this same problem.

First of all, you can try to relabel your filesystem in case you have
some mislabeled file; as root do "fixfiles onboot" and reboot the
system.

Second, you can delete all files in "/var/log/audit/" and make the
problem reappear, so you can debug the SELinux permission problems with
"audit2allow -a" or by looking directly at a clean
"/var/log/audit/audit.log" file.

Then, it's worth saying that "/backup" is not a path that is part of
SELinux labels. It is not a problem by itself (it should work anyway)
but my suggestion is to use "/bacula/" as the path for your backups.

# semanage fcontext -l | grep bacula
/bacula(/.*)?  all files
system_u:object_r:bacula_store_t:s0 
/etc/bacula.*  all files
system_u:object_r:bacula_etc_t:s0 
/etc/rc\.d/init\.d/bacula.*regular file
system_u:object_r:bacula_initrc_exec_t:s0 
/usr/sbin/bacula.* regular file
system_u:object_r:bacula_exec_t:s0 
/usr/sbin/bat  regular file
system_u:object_r:bacula_admin_exec_t:s0 
/usr/sbin/bconsole regular file
system_u:object_r:bacula_admin_exec_t:s0 
/var/lib/bacula.*  all files
system_u:object_r:bacula_var_lib_t:s0 
/var/log/bacula.*  all files
system_u:object_r:bacula_log_t:s0 
/var/run/bacula.*  regular file
system_u:object_r:bacula_var_run_t:s0 
/var/spool/bacula.*all files
system_u:object_r:bacula_spool_t:s0 
/var/spool/bacula/log(/.*)?all files
system_u:object_r:var_log_t:s0 

Regards,
--Simone


--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users