Error: sql_create.c:387 Volume x already exists

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Error: sql_create.c:387 Volume x already exists

Matteo Cerutti

Hi,


I am experiencing the following error quite frequently now:


03-Mar 19:57 bacula-dir JobId 88: Error: sql_create.c:387 Volume "fw01-Inc-20170303-1957-88" already exists.


I've posted my bacula configuration (devices, pools, storage definitions and jobdefs) at https://gist.github.com/m4ce/4d4b296bb2964a9be8ff4ddae210bd00

gist.github.com
Bacula configuration

I have tried a number of configurations, including using autochanger or specifying multiple device directives in one single bacula-dir storage definition. The problem still occurs.


Can anyone shed some light on to why this is happening?


Thanks,

M


Sent from Outlook


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|

Re: Error: sql_create.c:387 Volume x already exists

Josip Deanovic
On Saturday 2017-03-04 17:52:24 Matteo Cerutti wrote:

> Hi,
>
>
> I am experiencing the following error quite frequently now:
>
>
> 03-Mar 19:57 bacula-dir JobId 88: Error: sql_create.c:387 Volume
> "fw01-Inc-20170303-1957-88" already exists.
>
>
> I've posted my bacula configuration (devices, pools, storage definitions
> and jobdefs) at
> https://gist.github.com/m4ce/4d4b296bb2964a9be8ff4ddae210bd00
>
> [https://avatars2.githubusercontent.com/u/1254063?v=3&s=400]<https://gis
> t.github.com/m4ce/4d4b296bb2964a9be8ff4ddae210bd00>
>
> Bacula
> configuration<https://gist.github.com/m4ce/4d4b296bb2964a9be8ff4ddae210
> bd00> gist.github.com
> Bacula configuration
>
>
> I have tried a number of configurations, including using autochanger or
> specifying multiple device directives in one single bacula-dir storage
> definition. The problem still occurs.
>
>
> Can anyone shed some light on to why this is happening?


Since you have tried a number of configurations, are you sure you
didn't forget to use update pool command?


I would use list and llist commands in bconsole to check the content
of the pool and its status.


--
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|

Re: Error: sql_create.c:387 Volume x already exists

Matteo Cerutti

Hi,


unfortunately it's still happening. I pasted the output of llist pools at https://gist.github.com/m4ce/4d4b296bb2964a9be8ff4ddae210bd00#file-llist-pools .


I noticed something weird though. When I issue list volumes, the media type for all my volumes is File1. I would expect to see File2 and File3 too for some volumes?


Thanks,

Matteo



From: Josip Deanovic <djosip+[hidden email]>
Sent: 04 March 2017 18:44
To: [hidden email]
Subject: Re: [Bacula-users] Error: sql_create.c:387 Volume x already exists
 
On Saturday 2017-03-04 17:52:24 Matteo Cerutti wrote:
> Hi,
>
>
> I am experiencing the following error quite frequently now:
>
>
> 03-Mar 19:57 bacula-dir JobId 88: Error: sql_create.c:387 Volume
> "fw01-Inc-20170303-1957-88" already exists.
>
>
> I've posted my bacula configuration (devices, pools, storage definitions
> and jobdefs) at
> https://gist.github.com/m4ce/4d4b296bb2964a9be8ff4ddae210bd00
gist.github.com
Bacula configuration


>
> [https://avatars2.githubusercontent.com/u/1254063?v=3&s=400]<https://gis
> t.github.com/m4ce/4d4b296bb2964a9be8ff4ddae210bd00>
>
> Bacula
> configuration<https://gist.github.com/m4ce/4d4b296bb2964a9be8ff4ddae210
> bd00> gist.github.com
> Bacula configuration
>
>
> I have tried a number of configurations, including using autochanger or
> specifying multiple device directives in one single bacula-dir storage
> definition. The problem still occurs.
>
>
> Can anyone shed some light on to why this is happening?


Since you have tried a number of configurations, are you sure you
didn't forget to use update pool command?


I would use list and llist commands in bconsole to check the content
of the pool and its status.


--
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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|

Re: Error: sql_create.c:387 Volume x already exists

Josip Deanovic
On Saturday 2017-03-04 20:07:06 Matteo Cerutti wrote:

> Hi,
>
>
> unfortunately it's still happening. I pasted the output of llist pools
> at
> https://gist.github.com/m4ce/4d4b296bb2964a9be8ff4ddae210bd00#file-llis
> t-pools .
>
>
> I noticed something weird though. When I issue list volumes, the media
> type for all my volumes is File1. I would expect to see File2 and File3
> too for some volumes?


Are you using "Storage" option in your Job resources or is the
JobDefs the only place you have referenced the Storage?

Bacula allows it but I don't think you can use something like:
Storage = FileStorage1,FileStorage2,FileStorage3

Bacula probably took the first one and that's why all your volumes
have the same MediaType.


Could someone confirm that multiple storages could be supplied and
separated using comma like in the example above?

What would be the practical use/result of such feature anyway?


--
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|

Re: Error: sql_create.c:387 Volume x already exists

Matteo Cerutti

Hi Josip,


I am only using it in my JobDefs resource(s). 


However, as I mentioned, I have tried a number of configurations:



If this is not a supported configuration, which one should I go for my use case?


Thanks,
Matteo 



From: Josip Deanovic <djosip+[hidden email]>
Sent: 04 March 2017 21:00
To: [hidden email]
Subject: Re: [Bacula-users] Error: sql_create.c:387 Volume x already exists
 
On Saturday 2017-03-04 20:07:06 Matteo Cerutti wrote:
> Hi,
>
>
> unfortunately it's still happening. I pasted the output of llist pools
> at
> https://gist.github.com/m4ce/4d4b296bb2964a9be8ff4ddae210bd00#file-llis
gist.github.com
Bacula configuration


> t-pools .
>
>
> I noticed something weird though. When I issue list volumes, the media
> type for all my volumes is File1. I would expect to see File2 and File3
> too for some volumes?


Are you using "Storage" option in your Job resources or is the
JobDefs the only place you have referenced the Storage?

Bacula allows it but I don't think you can use something like:
Storage = FileStorage1,FileStorage2,FileStorage3

Bacula probably took the first one and that's why all your volumes
have the same MediaType.


Could someone confirm that multiple storages could be supplied and
separated using comma like in the example above?

What would be the practical use/result of such feature anyway?


--
Josip Deanovic

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
sdm.link
Slashdot: News for nerds, stuff that matters. Timely news source for technology related news with a heavy slant towards Linux and Open Source issues.


_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
lists.sourceforge.net
Bacula-users -- Bacula user's email list for support and discussions About 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|

Re: Error: sql_create.c:387 Volume x already exists

Heitor Faria
In reply to this post by Matteo Cerutti

I am experiencing the following error quite frequently now:

03-Mar 19:57 bacula-dir JobId 88: Error: sql_create.c:387 Volume "fw01-Inc-20170303-1957-88" already exists.

Hello, Matteo: is it possible your disk volumes are becoming Full within 1 minute, and them Bacula tries to create again a volume with a non-unique name? This may happen if your disk is full or if it is a multi-volume backup.
Even using JobID variable it's not guaranteed you will have unique LabelFormat naming generation. I would add (v.g.) NumVols variable.
Also, there is no need to you "Maximum Volume Jobs = 1" and "Use Volume Once = yes" both.  And the first one is better.

Regards,
--
============================================
Heitor Medrado de Faria
<a href="tel:+55%2061%202021-8260" value="+556120218260" target="_blank">+55 61 2021-8260
<a href="tel:+55%2061%208268-4220" value="+556182684220" target="_blank">+55 61 8268-4220
Site: www.bacula.com.br
Facebook: heitor.faria
Gtalk: [hidden email]
============================================

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|

Re: Error: sql_create.c:387 Volume x already exists

Josip Deanovic
In reply to this post by Matteo Cerutti
On Saturday 2017-03-04 21:33:00 Matteo Cerutti wrote:

> Hi Josip,
>
>
> I am only using it in my JobDefs resource(s).
>
>
> However, as I mentioned, I have tried a number of configurations:
>
>
>   *   multiple device directives in the director storage configuration
> with the same media type (as documented in
> http://blog.bacula.org/whitepapers/CommunityDiskBackup.pdf) *   using
> autochanger, as documented in the pdf above
>
>
> If this is not a supported configuration, which one should I go for my
> use case?

I am not sure if this a supported configuration or not. I am hoping
for someone to confirm or to deny it.
I haven't found any similar example in the documentation and bacula's
parser doesn't recognize it as a syntax error.

To keep it on a safe side you could reference the storage from
Pool resource definition. E.g. you could put "Storage = FileStorage1"
in your first pool, "Storage = FileStorage2" in your second pool and
so on.

Note that if you set the Storage in pool resource it will override
the Storage option in the Job resource.

This will probably fix that problem where you noticed that all the
volumes have the same MediaType.

--
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|

Re: Error: sql_create.c:387 Volume x already exists

Matteo Cerutti
In reply to this post by Heitor Faria

Hi Heitor,


thanks for you reply.


I have not set any maximum size over the volumes, so the first problem should not occur. What is a multi-volume backup? Right now, the way I've set it up is to create a new volume for every executed job.


  Maximum Volume Jobs = 1
  LabelFormat = "${Client}-${Pool}-${Year}${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}${Minute:p/2/0/r}-${JobId}-${NumVols}"

I have removed the 'Use volume once' and added the NumVols as you suggested. Let's see how this goes.


Updated gists:


https://gist.github.com/m4ce/4d4b296bb2964a9be8ff4ddae210bd00#file-bacula-dir-pools

https://gist.github.com/m4ce/4d4b296bb2964a9be8ff4ddae210bd00#file-llist-pools


Thanks,

Matteo



From: [hidden email] <[hidden email]> on behalf of Heitor Faria <[hidden email]>
Sent: 04 March 2017 21:54
To: Matteo Cerutti
Cc: [hidden email]
Subject: Re: [Bacula-users] Error: sql_create.c:387 Volume x already exists
 

I am experiencing the following error quite frequently now:

03-Mar 19:57 bacula-dir JobId 88: Error: sql_create.c:387 Volume "fw01-Inc-20170303-1957-88" already exists.

Hello, Matteo: is it possible your disk volumes are becoming Full within 1 minute, and them Bacula tries to create again a volume with a non-unique name? This may happen if your disk is full or if it is a multi-volume backup.
Even using JobID variable it's not guaranteed you will have unique LabelFormat naming generation. I would add (v.g.) NumVols variable.
Also, there is no need to you "Maximum Volume Jobs = 1" and "Use Volume Once = yes" both.  And the first one is better.

Regards,
--
============================================
Heitor Medrado de Faria
<a href="tel:&#43;55%2061%202021-8260" value="&#43;556120218260" target="_blank">+55 61 2021-8260
<a href="tel:&#43;55%2061%208268-4220" value="&#43;556182684220" target="_blank">+55 61 8268-4220
Site: www.bacula.com.br
Facebook: heitor.faria
Gtalk: [hidden email]
============================================

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|

Re: Error: sql_create.c:387 Volume x already exists

Matteo Cerutti
In reply to this post by Josip Deanovic

HI Josip,


thanks for your reply.


The idea was to be able to run more jobs (which write in unique volumes) concurrently on the same pool. I can try moving the Storage directive to the pool resource(s) I have, but I'd still need a way of running more jobs at the same time on the same pool.


There seems to be no standard way of doing that, or at least not really well documented?


Thanks,

Matteo



From: Josip Deanovic <djosip+[hidden email]>
Sent: 04 March 2017 22:04
To: [hidden email]
Subject: Re: [Bacula-users] Error: sql_create.c:387 Volume x already exists
 
On Saturday 2017-03-04 21:33:00 Matteo Cerutti wrote:
> Hi Josip,
>
>
> I am only using it in my JobDefs resource(s).
>
>
> However, as I mentioned, I have tried a number of configurations:
>
>
>   *   multiple device directives in the director storage configuration
> with the same media type (as documented in
> http://blog.bacula.org/whitepapers/CommunityDiskBackup.pdf) *   using
blog.bacula.org
aftertheretentionperiodhasexpired,buttheVolumewillcontinuetooccupydisk space.Thisisgenerallywhatonewantsprovidingonehassufficientdisksspace.For


> autochanger, as documented in the pdf above
>
>
> If this is not a supported configuration, which one should I go for my
> use case?

I am not sure if this a supported configuration or not. I am hoping
for someone to confirm or to deny it.
I haven't found any similar example in the documentation and bacula's
parser doesn't recognize it as a syntax error.

To keep it on a safe side you could reference the storage from
Pool resource definition. E.g. you could put "Storage = FileStorage1"
in your first pool, "Storage = FileStorage2" in your second pool and
so on.

Note that if you set the Storage in pool resource it will override
the Storage option in the Job resource.

This will probably fix that problem where you noticed that all the
volumes have the same MediaType.

--
Josip Deanovic

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
sdm.link
Slashdot: News for nerds, stuff that matters. Timely news source for technology related news with a heavy slant towards Linux and Open Source issues.


_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
lists.sourceforge.net
Bacula-users -- Bacula user's email list for support and discussions About 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users