volume already exists

62 views
Skip to first unread message

Ramil

unread,
Nov 28, 2023, 6:23:44 AM11/28/23
to bareos-users
Hello!
Why is the volume not overwritten with this pool configuration?
I'm using Bareos v.22.1.2 

Pool {
  Name = Inc-vl-elma01
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 10d
  Action On Purge = Truncate
  Maximum Volumes = 3
  Maximum Volume Jobs = 500
  Label Format = "${Pool}"
}

28-Nov 16:47 bareos-dir JobId 0: Fatal error: Authorization key rejected by ::.
28-Nov 16:47 bareos-dir: ERROR in dird/authenticate_console.cc:352 Unable to authenticate console "admin" at client:::1:9101.
28-Nov 16:47 bareos-dir JobId 2681: Start Backup JobId 2681, Job=vl-elma01-job.2023-11-28_16.47.39_14
28-Nov 16:47 bareos-dir JobId 2681: Connected Storage daemon at 10.64.118.172:9103, encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
28-Nov 16:47 bareos-dir JobId 2681:  Encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
28-Nov 16:47 bareos-dir JobId 2681: Probing client protocol... (result will be saved until config reload)
28-Nov 16:47 bareos-dir JobId 2681: Connected Client: bareos-fd at localhost:9102, encryption: None
28-Nov 16:47 bareos-dir JobId 2681:    Handshake: Cleartext
28-Nov 16:47 bareos-dir JobId 2681:  Encryption: None
28-Nov 16:47 bareos-dir JobId 2681: Volume "Inc-vl-elma01" has Volume Retention of 864000 sec. and has 3 jobs that will be pruned
28-Nov 16:47 bareos-dir JobId 2681: Purging the following 3 JobIds: 1126,1133,1140
28-Nov 16:47 bareos-dir JobId 2681: Error: cats/sql_create.cc:404 Volume "Inc-vl-elma01" already exists.
28-Nov 16:47 bareos-dir JobId 2681: Using Device "Elma" to write.
28-Nov 16:47 ct-bareos01-fd JobId 2681:  Encryption: None
28-Nov 16:47 ct-bareos01-fd JobId 2681: Connected Storage daemon at 10.64.118.172:9103, encryption: None
28-Nov 16:47 bareos-dir JobId 2681: Error: cats/sql_create.cc:404 Volume "Inc-vl-elma01" already exists.
28-Nov 16:47 bareos-dir JobId 2681: Error: cats/sql_create.cc:404 Volume "Inc-vl-elma01" already exists.
28-Nov 16:47 bareos-sd JobId 2681: Job vl-elma01-job.2023-11-28_16.47.39_14 is waiting. Cannot find any appendable volumes.
Please use the "label" command to create a new Volume for:
    Storage:      "Elma" (/mnt/backups/vmware/elma/elma)
    Pool:         Inc-vl-elma01
    Media type:   File
28-Nov 16:47 ct-bareos01-fd JobId 2681: Extended attribute support is enabled
28-Nov 16:47 ct-bareos01-fd JobId 2681: ACL support is enabled
28-Nov 16:48 bareos-dir JobId 2681: Fatal error: Network error with FD during Backup: ERR=No data available
28-Nov 16:48 bareos-sd JobId 2681: Error: lib/bsock_tcp.cc:461 Socket is terminated=1 on call to client:10.64.116.173:9103
28-Nov 16:48 bareos-sd JobId 2681: Job vl-elma01-job.2023-11-28_16.47.39_14 canceled while waiting for mount on Storage Device ""Elma" (/mnt/backups/vmware/elma/elma)".
28-Nov 16:48 bareos-dir JobId 2681: Fatal error: No Job status returned from FD.
28-Nov 16:48 bareos-dir JobId 2681: Bareos bareos-dir 22.1.2~pre4.c37b33136 (06Nov23):
  ......................


Ramil

unread,
Nov 28, 2023, 10:26:57 PM11/28/23
to bareos-users
I want the volume to be overwritten after a specified retention period, deleting older jobs. I thought this would work with this pool configuration, but overwriting the existing volume doesn't happen even though its retention period has already expired. Please tell me how to fix this

вторник, 28 ноября 2023 г. в 17:23:44 UTC+6, Ramil:

Miguel Santos

unread,
Nov 29, 2023, 12:34:31 AM11/29/23
to Ramil, bareos-users
I do not know about the error you get. It seems you messed up with the DB.

Having said that, bareos will reuse volumes when it needs new volumes only. And it will take those volumes marked as Full, Purged or Used. (Bconsole -> list media )

This translates that even if the retention period has expired, the volume will not be reused until bareos will need one.

As always there are caveats, but on general this is how it works.

I can speculate that with your configuration, bareos will allocate the max volumes first before reusing the 'expired' volumes.

If you update the pool setting, remember to use bconsole -> update -> Pool.

And take a look at the documentation.

Good luck.


--
You received this message because you are subscribed to the Google Groups "bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/ab183b40-d11d-4114-b3a9-f5d28cc10768n%40googlegroups.com.

Miguel Santos

unread,
Nov 29, 2023, 12:43:53 AM11/29/23
to Ramil, bareos-users
I took a look at the error again. Most of my previous message does not apply.

However, it is strange because the error says that the volume with the same name as your pool already exists. When it should number them as name-<media number>

I would manually create the volumes, and try that way. Using the bconsole -> label command.

You can also include the result of 'list media'.

Or hopefully someone knows better around here.

Good luck.

Hendrik Peyerl

unread,
Nov 29, 2023, 2:42:46 AM11/29/23
to Miguel Santos, Ramil, bareos-users
We did run into a similar issue where Bareos tried to create a new volume with a name that was already used leading to the same error.

We tried to cleanup everything, recreate all volumes and tinker with all the volume options - sadly without success.

In the end what worked for us was to make sure to have the volume name as unique as possible with date and time in its name:

$Client-$Level-$Year$Month$Day$Hour$Minute

As we have a cronjob that manually deletes the volume files in the filesystem that are older than the retention period we have no issue with too many volumes.

Bareos itself cleans the database as expected, so our workaround does not cause any orphaned database entries.

Hope this helps,

Hendrik
> To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/CA%2BBgf-2ULrKdUQ_N6Sm1m3ggB%2Bw0_anjqRO4x7%3D6qOC46ZpmMQ%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages