View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000774 | bareos-core | storage daemon | public | 2017-02-06 19:32 | 2017-02-17 15:20 |
Reporter | scrasa | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | won't fix | ||
Platform | Linux | OS | Debian | OS Version | 8 |
Product Version | 16.2.4 | ||||
Summary | 0000774: concurrent mouting same disk | ||||
Description | We are using bareos to backup volumes on usb disk. We are using multi storage devices on same disk to do concurrent jobs backups. We are using internal mount script to mount disks with veracrypt encryption (veracrypt.codeplex.com) (but seems independant of mounted filesystem) If multi jobs are launched/scheduled on the same time, they all are launching the same mouting script on the same time and same device (which could depending of the mounted filesystem count do problems ...?) | ||||
Steps To Reproduce | On storage add multi devices : Device { name = storage1 Automatic Mount = yes Media Type = EncryptUsbDisk Always Open = no Device Type = File Random Access = yes Removable Media = yes Requires Mount = yes Maximum Concurrent Jobs = 10 Archive Device = /mnt/veracrypt-usb mount command = "sudo /root/bin/mountScript /dev/sdb1 DISK01 %m" Unmount Command = "sudo /root/bin/umountScript %m" ...} Device { name = storage2 mount command = "sudo /root/bin/mountScript /dev/sdb1 DISK01 %m" ...} on director : Storage { Name = EncryptedUsbDisk1 ... Device = storage1 Device = storage2 Media Type = EncryptUsbDisk Maximum Concurrent Jobs = 10 } multi jobs, same schedule on mount script to trace multi launch of mount command, you can do date >> /root/bareos-log echo "Start" >> /root/bareos-log pstree -sp $PPID >> /root/bareos-log mount ... if [ $? -ne 0 ] ; then date >> /root/bareos-log echo "Error" >> /root/bareos-log pstree -sp $PPID >> /root/bareos-log exit 1 fi If the mount command take a few second to do his job (depending filesystem) The first job do log : start, pid(1) The second job do log start , pid(2) error, pid(2) the second job re-lauch the mount, but enter on the if ($? -ne 0), because first mount is already launched and not terminated (multi mouting command on the same system disk device) | ||||
Additional Information | I tested the problem on bareos 14.2 and 16.2 I will test code on my mount script to avoid concurrent script launching, but is it not task of bareos to not launch again the same mount script if already launched on different storage device but same "archive device" mount path ? | ||||
Tags | No tags attached. | ||||
It is the same thing for umount. Same storage with 2 device. If you run 2 concurrents jobs, and the first finish, the second already running, the first seems to try several times to unmount the device even if the first job is running on it. |
|
Well, for me this is the expected behaviour. For Bareos these are two independent devices. Also I don't see that extra code to handle this will be added. On the other hand site, you could argue, that it does not make sense for a disk device to only be able to handle one access (volume) at a time (the reason why you have defined two devices at all). This is something we wanted to change in any case. However, we have to see, if this can b done until bareos-17.2. For this reasons, I will close the ticket now. As I assume, this is quite a common problem, there are two things you can do: 1. discuss this on the bareos-users mailing list. I assume, there are plenty of other persons with similar requirements. 2. If you scripts are done and working fine, I would like to see them shared with other people. Maybe you can push them to https://github.com/bareos/bareos-contrib ? |
|