You should not use add to try and create new file volumes, as that command only adds them to the database, but does not actually create them.  If you want to create a file volume, just use the label command.  The joblog even asks you to use it: "Please use the "label" command to create a new Volume for:".  If you do that, the job should also automatically pick it up.

I could not reproduce your issue either, so I am not sure what happened there.

Kind Regards
Sebastian Sura

Am 18.12.24 um 14:55 schrieb Christoph Haas:
Thanks for the reply, Sebastian.

<tl;dr>Can't reproduce it.</tl;dr>

What I did (and what seemed to have worked this time):

 1. Start the backup job to the "VmwareIncr" disk pool.
 2. 18-Dec 14:21 bareos-dir JobId 3950: Start Backup JobId 3950,
    Job=vm-zabbix2.2024-12-18_14.21.39_12
    18-Dec 14:21 bareos-dir JobId 3950: Connected Storage daemon at
    bareos-dr.pmd5.org:9103, encryption: TLS_CHACHA20_POLY1305_SHA256
    TLSv1.3
    18-Dec 14:21 bareos-dir JobId 3950:  Encryption:
    TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
    18-Dec 14:21 bareos-dir JobId 3950: Probing client protocol...
    (result will be saved until config reload)
    18-Dec 14:21 bareos-dir JobId 3950: Connected Client: bareos-fd at
    localhost:9102, encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
    18-Dec 14:21 bareos-dir JobId 3950:    Handshake: Immediate TLS
    18-Dec 14:21 bareos-dir JobId 3950:  Encryption:
    TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
    18-Dec 14:21 bareos-dir JobId 3950: Pruning oldest volume
    "VmwareIncr-2110"
    18-Dec 14:21 bareos-dir JobId 3950: Pruning volume
    VmwareIncr-2110: 0 Jobs have expired and can be pruned.
    18-Dec 14:21 bareos-dir JobId 3950: Volume "VmwareIncr-2110" still
    contains jobs after pruning.
    18-Dec 14:21 bareos-dir JobId 3950: Using Device
    "DiskVmwareStorage1" to write.
    18-Dec 14:21 bareos-fd JobId 3950: Connected Storage daemon at
    bareos-dr.pmd5.org:9103, encryption: TLS_CHACHA20_POLY1305_SHA256
    TLSv1.3
    18-Dec 14:21 bareos-fd JobId 3950:  Encryption:
    TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
    18-Dec 14:21 bareos-fd JobId 3950: Extended attribute support is
    enabled
    18-Dec 14:21 bareos-fd JobId 3950: ACL support is enabled
    18-Dec 14:21 bareos-dir JobId 3950: Pruning oldest volume
    "VmwareIncr-2110"
    18-Dec 14:21 bareos-dir JobId 3950: Pruning volume
    VmwareIncr-2110: 0 Jobs have expired and can be pruned.
    18-Dec 14:21 bareos-dir JobId 3950: Volume "VmwareIncr-2110" still
    contains jobs after pruning.
    18-Dec 14:21 bareos-dir JobId 3950: Pruning oldest volume
    "VmwareIncr-2110"
    18-Dec 14:21 bareos-dir JobId 3950: Pruning volume
    VmwareIncr-2110: 0 Jobs have expired and can be pruned.
    18-Dec 14:21 bareos-dir JobId 3950: Volume "VmwareIncr-2110" still
    contains jobs after pruning.
    18-Dec 14:21 bareos-sd JobId 3950: Job
    vm-zabbix2.2024-12-18_14.21.39_12 is waiting. Cannot find any
    appendable volumes.
    Please use the "label" command to create a new Volume for:
        Storage:      "DiskVmwareStorage1" (/srv/stor2/bareos/vmware)
        Pool:         VmwareIncr
        Media type:   File
 3. The pool:
    *list pool=VmwareIncr
    Using Catalog "MyCatalog"
    +--------+------------+---------+---------+----------+-------------+
    | poolid | name       | numvols | maxvols | pooltype | labelformat |
    +--------+------------+---------+---------+----------+-------------+
    |     34 | VmwareIncr |     203 |     203 | Backup   | VmwareIncr- |
    +--------+------------+---------+---------+----------+-------------+
 4. Edit /etc/bareos/bareos-dir.d/pool/VmwareIncr.conf
 5. Increase the number of "Maximum Volumes = …" to a higher number
 6. bconsole
 7. reload
 8. 18-Dec 14:26 bareos-dir JobId 3950: Pruning oldest volume
    "VmwareIncr-2110"
    18-Dec 14:26 bareos-dir JobId 3950: Pruning volume
    VmwareIncr-2110: 0 Jobs have expired and can be pruned.
    18-Dec 14:26 bareos-dir JobId 3950: Volume "VmwareIncr-2110" still
    contains jobs after pruning.
    18-Dec 14:31 bareos-dir JobId 3950: Pruning oldest volume
    "VmwareIncr-2110"
    18-Dec 14:31 bareos-dir JobId 3950: Pruning volume
    VmwareIncr-2110: 0 Jobs have expired and can be pruned.
    18-Dec 14:31 bareos-dir JobId 3950: Volume "VmwareIncr-2110" still
    contains jobs after pruning.
 9. The pool has picked up my change:
    *list pool=VmwareIncr
    +--------+------------+---------+---------+----------+-------------+
    | poolid | name       | numvols | maxvols | pooltype | labelformat |
    +--------+------------+---------+---------+----------+-------------+
    |     34 | VmwareIncr |     203 |     204 | Backup   | VmwareIncr- |
    +--------+------------+---------+---------+----------+-------------+
10. The job hasn't picked up the change yet:
    Running Jobs:
    Console connected at 18-Dec-24 14:32
     JobId Level   Name                       Status
    ======================================================================
      3950 Increme  vm-zabbix2.2024-12-18_14.21.39_12 is waiting for
    an appendable Volume
11. *mount
    The defined Storage resources are:
    1: DiskCritical
    2: DiskDatabase
    3: DiskVmware
    4: File
    5: Tape
    Select Storage resource (1-5): 3
    Connecting to Storage daemon DiskVmware at bareos-dr.pmd5.org:9103 ...
    3001 OK mount requested. Device="DiskVmwareStorage1"
    (/srv/stor2/bareos/vmware)
12. Suprisingly this worked. The job has picked up the enlarged pool
    and has taken the new volume:
    18-Dec 14:36 bareos-dir JobId 3950: Created new Volume
    "VmwareIncr-2351" in catalog.
    18-Dec 14:36 bareos-sd JobId 3950: Labeled new Volume
    "VmwareIncr-2351" on device "DiskVmwareStorage1"
    (/srv/stor2/bareos/vmware).
    18-Dec 14:36 bareos-sd JobId 3950: Moving to end of data on volume
    "VmwareIncr-2351"
    18-Dec 14:36 bareos-sd JobId 3950: Ready to append to end of
    Volume "VmwareIncr-2351" size=223

To be honest I am not sure what I did differently this time.

Is it generally a bad idea to do it like this? Would you suggest using "add" instead? Thanks!

…Christoph
Sebastian Sura schrieb am Mittwoch, 18. Dezember 2024 um 13:29:23 UTC+1:

    Hi Christoph

    how did you "increase the number of volumes in the Pool
    definition" ? Did you just edit the pool configuration file and do
    a reload ?
    Or did you use the `add` command to add new volumes directly ?

    https://docs.bareos.org/TasksAndConcepts/BareosConsole.html#console-commands

    >>> This command is used to add Volumes to an existing Pool. That
    is, it creates the Volume name in the catalog and inserts into the
    Pool in the catalog, but does not attempt to access the physical
    Volume. Once added, Bareos expects that Volume to exist and to be
    labeled.

    Are you sure that the message was printed _after_ you added new
    volumes to the pool ? Maybe this message was printed first and you
    only added new volumes afterwards ?

    Could you provide the full job log ?

    Kind Regards
    Sebastian Sura

    Am 18.12.24 um 11:42 schrieb Christoph Haas:
    While running a backup I realized that the pool had too few
    volumes (on disk). So I increased the number of volumes in the
    Pool definition, went to the bconsole and reloaded.

    However that instantly lead to this error:

    18-Dec 11:37 bareos-sd JobId 3605: Warning: stored/mount.cc:246
    Open device "DiskVmwareStorage9" (/srv/stor2/bareos/vmware)
    Volume "VmwareIncr-2346" failed: ERR=stored/dev.cc:597 Could not
    open: /srv/stor2/bareos/vmware/VmwareIncr-2346, ERR=No such file
    or directory

    There is indeed no such file. The most recent files are:

    -rw-r----- 1 bareos bareos 10736369887 Dez 18 03:21 VmwareIncr-2339
    -rw-r----- 1 bareos bareos 10736369871 Dez 18 03:21 VmwareIncr-2331
    -rw-r----- 1 bareos bareos 10736369879 Dez 18 03:21 VmwareIncr-2338
    -rw-r----- 1 bareos bareos 10736369887 Dez 18 03:22 VmwareIncr-2337
    -rw-r----- 1 bareos bareos 10736369887 Dez 18 03:23 VmwareIncr-2341
    -rw-r----- 1 bareos bareos 10736369887 Dez 18 03:23 VmwareIncr-2340
    -rw-r----- 1 bareos bareos 10736369887 Dez 18 03:24 VmwareIncr-2343
    -rw-r----- 1 bareos bareos 10736369887 Dez 18 03:27 VmwareIncr-2342

    My Pool definition:

    Pool {
      Name = VmwareIncr
      Pool Type = Backup
      Recycle = yes                       # Bareos can automatically
    recycle Volumes
      AutoPrune = yes                     # Prune expired volumes
      Volume Retention = 10 days          # How long should the
    Incremental Backups be kept?
      Maximum Volume Bytes = 10G           # Limit Volume size to
    something reasonable
      Maximum Volumes = 400               # Limit number of Volumes
    in Pool
      Label Format = "VmwareIncr-"       # Volumes will be labeled
    "Incremental-<volume-id>"
      Recycle Oldest Volume = yes
    }

    The only way I can solve that is cancelling all active jobs
    (cancel all yes) and restarting them.

    I'm on Bareos 23.1.1 on Debian 12. Has anyone else seen this?
    What am I doing wrong?

    Cheers
     Christoph
-- 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 [email protected].
    To view this discussion visit
    
https://groups.google.com/d/msgid/bareos-users/aa0dcfd4-a51e-4019-b1a5-1f8b48dd137an%40googlegroups.com
    
<https://groups.google.com/d/msgid/bareos-users/aa0dcfd4-a51e-4019-b1a5-1f8b48dd137an%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- Sebastian [email protected]
      Bareos GmbH & Co. KG            Phone: +49 221 630693-0
      https://www.bareos.com
      Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
      Komplementär: Bareos Verwaltungs-GmbH
      Geschäftsführer: Stephan Dühr, Jörg Steffens, Philipp Storz

--
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 [email protected]. To view this discussion visit https://groups.google.com/d/msgid/bareos-users/63eadc52-7494-482d-b6d9-5f8d365217e5n%40googlegroups.com <https://groups.google.com/d/msgid/bareos-users/63eadc52-7494-482d-b6d9-5f8d365217e5n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
 Sebastian [email protected]
 Bareos GmbH & Co. KG            Phone: +49 221 630693-0
 https://www.bareos.com
 Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
 Komplementär: Bareos Verwaltungs-GmbH
 Geschäftsführer: Stephan Dühr, Jörg Steffens, Philipp Storz

--
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/bareos-users/fbe9aac1-3e9e-4789-af77-7084164f66cc%40bareos.com.

Reply via email to