Bacula-users

Re: [Bacula-users] Bacula mixing up pools and mount points

2009-06-15 15:44:18
Subject: Re: [Bacula-users] Bacula mixing up pools and mount points
From: Jonathan Bayer <jbayer AT regiscope DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Mon, 15 Jun 2009 15:38:40 -0400
That doesn't make sense, because the only storage I reference is the internal storage.  The only reference to the external storage is in the internal storage.

However, I may have found the problem.  I turned on tracing and set the debug level to 999.

In the SD trace file, I found the following lines:


bayer-sd: askdir.c:259-465 dir_find_next_appendable_volume: reserved=1 Vol=
bayer-sd: askdir.c:276-465 >dird CatReq Job=Clonezilla.2009-06-15_14.07.22_12 FindMedia=1 pool_name=External media_type=File
bayer-sd: askdir.c:182-465 <dird 1000 OK VolName=D1 VolJobs=14 VolFiles=63 VolBlocks=4225968 VolBytes=272625134040 VolMounts=30
VolErrors=0 VolWrites=7652227 MaxVolBytes=0 VolCapacityBytes=0 VolStatus=Append Slot=0 MaxVolJobs=0 MaxVolFiles=0 InChanger=0 Vo
lReadTime=2864375580 VolWriteTime=6009223552 EndFile=63 EndBlock=2042194391 VolParts=0 LabelType=0 MediaId=5
bayer-sd: askdir.c:205-465 do_reqest_vol_info return true slot=0 Volume=D1
bayer-sd: vol_mgr.c:541-465 find_read_vol=D1 found=1
bayer-sd: vol_mgr.c:690-465 Found in read list; cannot write vol=D1
bayer-sd: askdir.c:296-465 Volume D1 is in use.
bayer-sd: askdir.c:276-465 >dird CatReq Job=Clonezilla.2009-06-15_14.07.22_12 FindMedia=2 pool_name=External media_type=File
bayer-sd: askdir.c:182-465 <dird 1901 No Media.



Apparently it is opening the D1 volume for reading, and because of that, can't write to it.  My guess is that the virtual full is opening ALL old backups for the job, even if they have been superceded by a newer full backup.

This would also explain why it works when I purge the external volume.

So I think that I need a way to exclude backups on a particular volume(s) for a virtual full backup.

Any ideas?


JBB




On Mon, 2009-06-15 at 13:49 -0400, Dirk Bartley wrote:
OK, just re-read the storage= option under pool and it is a little bit
confusing to me because I always thought the storage came from the job
defaults, then the schedule resource for that run if it has an override.

>From the docs, this means my assumtion was incorrect.

"The Storage resource may also be specified in the Job resource, but the
value, if any, in the Pool resource overrides any value in the Job. This
Storage resource definition is not required by either the Job resource
or in the Pool, but it must be specified in one or the other. If not
configuration error will result."

I'd still look at the storage on the job's log.  You may want to choose
to put the storage= in the schedule resource just to make sure.

Dirk

On Mon, 2009-06-15 at 10:52 -0400, Jonathan Bayer wrote:
> Hi,
> 
> Running Bacula 3.0.1 on an Ubuntu 9.05 system.
> Main backups are done to an internal hard disk.  Pool is called
> Internal, volume name is Internal
> VirtualFull backups are done to an external hard disk.  Pool is called
> External, volume name is D1
> 
> The internal pool is mounted in:  /var/lib/bacula/archive
> The external pool is mounted in /media/bacula
> 
> The external pool is accessed using the NextPool keyword.
> 
> Bacula gets the pools confused.  It looks for the D1 volume at the
> internal pool location
> 
> This doesn't make sense, it is trying to both read and write at the
> same location.
> 
> Any ideas?
> 
> JBB
> 
> 
> 15-Jun 10:44 bayer-sd JobId 423: Warning: dev.c:534 dev.c:532 Could
> not open: /var/lib/bacula/archive/D1, ERR=No suchfile or directory
> 15-Jun 10:44 bayer-sd JobId 423: Warning: acquire.c:221 Read open
> device "FileStorage" (/var/lib/bacula/archive) Volume "D1" failed:
> ERR=dev.c:532 Could not open: /var/lib/bacula/archive/D1, ERR=No such
> file or directory
> 
> 15-Jun 10:44 bayer-sd JobId 423: Please mount Volume "D1" for:
>     Job:          Clonezilla.2009-06-15_10.41.00_24
>     Storage:      "FileStorage" (/var/lib/bacula/archive)
>     Pool:         Internal
>     Media type:   File
> *list media
> 
> 
> 
> Pool: Internal
> +---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
> | mediaid | volumename | volstatus | enabled | volbytes        |
> volfiles | volretention | recycle | slot | inchanger| mediatype |
> lastwritten         |
> +---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
> |       1 | Internal   | Append    |       1 | 650,457,573,214 |
> 151 |   31,536,000 |       1 |    0 |         0| File      |
> 2009-06-15 10:33:29 |
> +---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
> Pool: External
> +---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
> | mediaid | volumename | volstatus | enabled | volbytes        |
> volfiles | volretention | recycle | slot | inchanger| mediatype |
> lastwritten         |
> +---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
> |       5 | D1         | Append    |       1 | 272,625,134,040 |
> 63 |   31,536,000 |       1 |    0 |         0| File      | 2009-06-05
> 18:33:31 |
> +---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
> 
> Pool {
>   Name = Internal
>   Pool Type = Backup
>   Recycle = yes                       # Bacula can automatically
> recycle Volumes
>   AutoPrune = yes                     # Prune expired volumes
>   Volume Retention = 365 days         # one year
>   NextPool = External
>   Storage = File
> }
> 
> # Default pool definition
> Pool {
>   Name = External
>   Pool Type = Backup
>   Recycle = yes                       # Bacula can automatically
> recycle Volumes
>   AutoPrune = yes                     # Prune expired volumes
>   Volume Retention = 365 days         # one year
>   Storage = ExternalFileStorage
> }
> 
> 
> 
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing 
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________ Bacula-users mailing list Bacula-users AT lists.sourceforge DOT net https://lists.sourceforge.net/lists/listinfo/bacula-users


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users