bareos-sd device count usage

58 views
Skip to first unread message

wizh...@gmail.com

unread,
Sep 26, 2023, 9:25:48 AM9/26/23
to bareos-users
I see the sd now has a "Count" parameter that looks handy for multiple devices.

in the director I see no similar way to specify these devices except to list out manually like in the example

https://docs.bareos.org/TasksAndConcepts/VolumeManagement.html#example-use-four-storage-devices-pointing-to-the-same-directory

Would be nice if the sd config a a similar directive to not have to list all the auto generated devices.

Perhaps I am missing something and it already does?

Bruno Friedmann (bruno-at-bareos)

unread,
Sep 27, 2023, 4:55:39 AM9/27/23
to bareos-users
The trick is to use a virtual autochanger for those kind of device, so only the changer is declared on the director.

If you want to get inspired, you can have a look at the following PR which will propose to introduce this 

wizh...@gmail.com

unread,
Sep 27, 2023, 8:49:28 AM9/27/23
to bareos-users
I saw the autochanger, but that does not allow for parallel jobs correct?

Currently to have parallel jobs you have to define multiple devices and specify them all in both the sd and dir.

using count simplifies the sd config, but the director with needs each listed.

Bruno Friedmann (bruno-at-bareos)

unread,
Sep 27, 2023, 9:43:42 AM9/27/23
to bareos-users
Well not really, I've implemented that with 4 devices in my autochanger which mean I can run 4 concurrents writes job or 2 read / 2 write for copy/AI etc.
and I have one storage definition on my director.
Of course that mean I will write 4 distinct volumes at the same time. and not 4 jobs on a volume. 

wizh...@gmail.com

unread,
Sep 27, 2023, 9:46:46 AM9/27/23
to bareos-users
I believe you are saying what i was saying.

With X number of devices in an autochanger then up to X number of jobs can run at the same time.  Perfect.

Maksim Pratasevich

unread,
Sep 28, 2023, 5:41:27 AM9/28/23
to bareos-users
storage daemon

1. Create device config

Device {
  Name = device-sd
  Media Type = File
  Archive Device = /srv/backup/device
  Count = 4
  Label Media = yes
  AutomaticMount = yes
  RemovableMedia = no
  AlwaysOpen = no
  RandomAccess = yes
  Maximum Concurrent Jobs = 1
}

2. create autochanger config

Autochanger {
  Name =  autochanger-ac
  Device = device-sd ## YOUR DEVICE HERE
  Changer Device = /dev/null
  Changer Command = ""
}

director config
3. create storage config

Storage {
  Name = storage-st
  Address = ...
  Password = ...
  Device = autochanger-ac ##autochanger here
  Auto changer = yes
  Media Type = File
  Maximum Concurrent Jobs = 4
}

4. and finally create job configs

Job {
  Name = job1-jb
...
  Storage  =  storage-st ##storage here
... 
}

Job {
  Name = job2-jb
...
  Storage  =  storage-st  ##storage here
...
}

I have 30 jobs set up like this, 4 running simultaneously
среда, 27 сентября 2023 г. в 15:46:46 UTC+2, wizh...@gmail.com:

wizh...@gmail.com

unread,
Sep 28, 2023, 8:50:09 AM9/28/23
to bareos-users
Thank you for clarifying, this is a welcome configuration simplification.
Reply all
Reply to author
Forward
0 new messages