Problem when using removable drives (such as HD USB)

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

Problem when using removable drives (such as HD USB)

Wanderlei Huttel
I was making a test for a Brazilian guy, and I've created a Device in bacula-sd.conf as Removable Device. (I'm using bacula 7.4.4)


Device {
  Name = DiscoLocal3
  Media Type = File
  Device Type = File
  Archive Device = "/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2"
  LabelMedia = yes
  RemovableMedia = yes
  Random Access = yes
  Requires Mount = yes
  Mount Point  = "/mnt/disco_usb"
  Mount Command = "/bin/mount -t ext4 %a %m"
  Unmount Command = "/bin/umount %m"
  Maximum Concurrent Jobs = 50
}

In bconsole I receive a message asking for label new media:

15-Nov 22:35 bacula-sd JobId 31: Warning: label.c:368 Open file device "DiscoLocal3" (/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2) Volume "Volume-Default-0006" failed: ERR=file_dev.c:185 Could not open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006,CREATE_READ_WRITE,0640): ERR=Not a directory

15-Nov 22:35 bacula-sd JobId 31: Warning: label.c:368 Open file device "DiscoLocal3" (/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2) Volume "Volume-Default-0006" failed: ERR=file_dev.c:185 Could not open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006,CREATE_READ_WRITE,0640): ERR=Not a directory

15-Nov 22:35 bacula-sd JobId 31: Warning: mount.c:222 Open of file device "DiscoLocal3" (/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2) Volume "Volume-Default-0006" failed: ERR=file_dev.c:185 Could not open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006,CREATE_READ_WRITE,0640): ERR=Not a directory

15-Nov 22:35 bacula-sd JobId 31: Please mount append Volume "Volume-Default-0006" or label a new one for:
    Job:          Backup_Servidor_Bacula.2016-11-15_22.29.58_03
    Storage:      "DiscoLocal3" (/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2)
    Pool:         Pool-Default
    Media type:   File


In debugging bacula-sd it looks that bacula had mounted the device correctly, but it looks bacula is trying to use "Arquive Device, instead Mount Point"

bacula-sd: file_dev.c:313-31 mount_file: cmd=/bin/mount -t ext4 /dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2 /mnt/disco_usb mounted=0
bacula-sd: file_dev.c:324-31 mount_file run_prog=/bin/mount -t ext4 /dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2 /mnt/disco_usb
bacula-sd: file_dev.c:410-31 ============ mount=1
bacula-sd: file_dev.c:179-31 open disk: mode=OPEN_READ_WRITE open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006, 0x2, 0640)
bacula-sd: file_dev.c:186-31 open failed: file_dev.c:185 Could not open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006,OPEN_READ_WRITE,0640): ERR=Not a directory

Am I doing something wrong ?

Best Regards

Wanderlei Hüttel

------------------------------------------------------------------------------

_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem when using removable drives (such as HD USB)

Josh Fisher

On 11/15/2016 7:46 PM, Wanderlei Huttel wrote:
I was making a test for a Brazilian guy, and I've created a Device in bacula-sd.conf as Removable Device. (I'm using bacula 7.4.4)


Device {
  Name = DiscoLocal3
  Media Type = File
  Device Type = File
  Archive Device = "/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2"
  LabelMedia = yes
  RemovableMedia = yes
  Random Access = yes
  Requires Mount = yes
  Mount Point  = "/mnt/disco_usb"
  Mount Command = "/bin/mount -t ext4 %a %m"
  Unmount Command = "/bin/umount %m"
  Maximum Concurrent Jobs = 50
}

Check that the user:group that bacula-sd runs as has permission to mount that device at that mount point.


In bconsole I receive a message asking for label new media:

15-Nov 22:35 bacula-sd JobId 31: Warning: label.c:368 Open file device "DiscoLocal3" (/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2) Volume "Volume-Default-0006" failed: ERR=file_dev.c:185 Could not open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006,CREATE_READ_WRITE,0640): ERR=Not a directory

15-Nov 22:35 bacula-sd JobId 31: Warning: label.c:368 Open file device "DiscoLocal3" (/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2) Volume "Volume-Default-0006" failed: ERR=file_dev.c:185 Could not open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006,CREATE_READ_WRITE,0640): ERR=Not a directory

15-Nov 22:35 bacula-sd JobId 31: Warning: mount.c:222 Open of file device "DiscoLocal3" (/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2) Volume "Volume-Default-0006" failed: ERR=file_dev.c:185 Could not open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006,CREATE_READ_WRITE,0640): ERR=Not a directory

15-Nov 22:35 bacula-sd JobId 31: Please mount append Volume "Volume-Default-0006" or label a new one for:
    Job:          Backup_Servidor_Bacula.2016-11-15_22.29.58_03
    Storage:      "DiscoLocal3" (/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2)
    Pool:         Pool-Default
    Media type:   File


In debugging bacula-sd it looks that bacula had mounted the device correctly, but it looks bacula is trying to use "Arquive Device, instead Mount Point"

bacula-sd: file_dev.c:313-31 mount_file: cmd=/bin/mount -t ext4 /dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2 /mnt/disco_usb mounted=0
bacula-sd: file_dev.c:324-31 mount_file run_prog=/bin/mount -t ext4 /dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2 /mnt/disco_usb
bacula-sd: file_dev.c:410-31 ============ mount=1
bacula-sd: file_dev.c:179-31 open disk: mode=OPEN_READ_WRITE open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006, 0x2, 0640)
bacula-sd: file_dev.c:186-31 open failed: file_dev.c:185 Could not open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006,OPEN_READ_WRITE,0640): ERR=Not a directory

Am I doing something wrong ?

Best Regards

Wanderlei Hüttel


------------------------------------------------------------------------------


_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users


------------------------------------------------------------------------------

_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem when using removable drives (such as HD USB)

Wanderlei Huttel
Hello Josh

I'm running all bacula daemons as root

root@bacula:~# ps -aux | grep bacula
root       346  0.3  0.1 728908  7280 ?        Ssl  Nov07  41:23 /sbin/bacula-sd -v -c /etc/bacula/bacula-sd.conf
root       353  0.0  0.0 204804  4724 ?        Ssl  Nov07   4:38 /sbin/bacula-fd -v -c /etc/bacula/bacula-fd.conf
root       360  0.0  0.1 759796  6724 ?        Ssl  Nov07   0:21 /sbin/bacula-dir -v -c /etc/bacula/bacula-dir.conf


Best Regards

Wanderlei Hüttel

2016-11-16 10:28 GMT-02:00 Josh Fisher <[hidden email]>:

On 11/15/2016 7:46 PM, Wanderlei Huttel wrote:
I was making a test for a Brazilian guy, and I've created a Device in bacula-sd.conf as Removable Device. (I'm using bacula 7.4.4)


Device {
  Name = DiscoLocal3
  Media Type = File
  Device Type = File
  Archive Device = "/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2"
  LabelMedia = yes
  RemovableMedia = yes
  Random Access = yes
  Requires Mount = yes
  Mount Point  = "/mnt/disco_usb"
  Mount Command = "/bin/mount -t ext4 %a %m"
  Unmount Command = "/bin/umount %m"
  Maximum Concurrent Jobs = 50
}

Check that the user:group that bacula-sd runs as has permission to mount that device at that mount point.


In bconsole I receive a message asking for label new media:

15-Nov 22:35 bacula-sd JobId 31: Warning: label.c:368 Open file device "DiscoLocal3" (/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2) Volume "Volume-Default-0006" failed: ERR=file_dev.c:185 Could not open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006,CREATE_READ_WRITE,0640): ERR=Not a directory

15-Nov 22:35 bacula-sd JobId 31: Warning: label.c:368 Open file device "DiscoLocal3" (/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2) Volume "Volume-Default-0006" failed: ERR=file_dev.c:185 Could not open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006,CREATE_READ_WRITE,0640): ERR=Not a directory

15-Nov 22:35 bacula-sd JobId 31: Warning: mount.c:222 Open of file device "DiscoLocal3" (/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2) Volume "Volume-Default-0006" failed: ERR=file_dev.c:185 Could not open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006,CREATE_READ_WRITE,0640): ERR=Not a directory

15-Nov 22:35 bacula-sd JobId 31: Please mount append Volume "Volume-Default-0006" or label a new one for:
    Job:          Backup_Servidor_Bacula.2016-11-15_22.29.58_03
    Storage:      "DiscoLocal3" (/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2)
    Pool:         Pool-Default
    Media type:   File


In debugging bacula-sd it looks that bacula had mounted the device correctly, but it looks bacula is trying to use "Arquive Device, instead Mount Point"

bacula-sd: file_dev.c:313-31 mount_file: cmd=/bin/mount -t ext4 /dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2 /mnt/disco_usb mounted=0
bacula-sd: file_dev.c:324-31 mount_file run_prog=/bin/mount -t ext4 /dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2 /mnt/disco_usb
bacula-sd: file_dev.c:410-31 ============ mount=1
bacula-sd: file_dev.c:179-31 open disk: mode=OPEN_READ_WRITE open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006, 0x2, 0640)
bacula-sd: file_dev.c:186-31 open failed: file_dev.c:185 Could not open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006,OPEN_READ_WRITE,0640): ERR=Not a directory

Am I doing something wrong ?

Best Regards

Wanderlei Hüttel


------------------------------------------------------------------------------


_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users



------------------------------------------------------------------------------

_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem when using removable drives (such as HD USB)

Kern Sibbald
In reply to this post by Wanderlei Huttel
Hello Wanderlei,

Bacula always uses the Archive Device for backup.  It never uses the mount point.

Probably if you inverted the names on the Archive Device and the Mount Point, then switch the %a %m to %m %a, it might work.

Best regards,
Kern

On 11/16/2016 01:46 AM, Wanderlei Huttel wrote:
I was making a test for a Brazilian guy, and I've created a Device in bacula-sd.conf as Removable Device. (I'm using bacula 7.4.4)


Device {
  Name = DiscoLocal3
  Media Type = File
  Device Type = File
  Archive Device = "/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2"
  LabelMedia = yes
  RemovableMedia = yes
  Random Access = yes
  Requires Mount = yes
  Mount Point  = "/mnt/disco_usb"
  Mount Command = "/bin/mount -t ext4 %a %m"
  Unmount Command = "/bin/umount %m"
  Maximum Concurrent Jobs = 50
}

In bconsole I receive a message asking for label new media:

15-Nov 22:35 bacula-sd JobId 31: Warning: label.c:368 Open file device "DiscoLocal3" (/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2) Volume "Volume-Default-0006" failed: ERR=file_dev.c:185 Could not open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006,CREATE_READ_WRITE,0640): ERR=Not a directory

15-Nov 22:35 bacula-sd JobId 31: Warning: label.c:368 Open file device "DiscoLocal3" (/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2) Volume "Volume-Default-0006" failed: ERR=file_dev.c:185 Could not open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006,CREATE_READ_WRITE,0640): ERR=Not a directory

15-Nov 22:35 bacula-sd JobId 31: Warning: mount.c:222 Open of file device "DiscoLocal3" (/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2) Volume "Volume-Default-0006" failed: ERR=file_dev.c:185 Could not open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006,CREATE_READ_WRITE,0640): ERR=Not a directory

15-Nov 22:35 bacula-sd JobId 31: Please mount append Volume "Volume-Default-0006" or label a new one for:
    Job:          Backup_Servidor_Bacula.2016-11-15_22.29.58_03
    Storage:      "DiscoLocal3" (/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2)
    Pool:         Pool-Default
    Media type:   File


In debugging bacula-sd it looks that bacula had mounted the device correctly, but it looks bacula is trying to use "Arquive Device, instead Mount Point"

bacula-sd: file_dev.c:313-31 mount_file: cmd=/bin/mount -t ext4 /dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2 /mnt/disco_usb mounted=0
bacula-sd: file_dev.c:324-31 mount_file run_prog=/bin/mount -t ext4 /dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2 /mnt/disco_usb
bacula-sd: file_dev.c:410-31 ============ mount=1
bacula-sd: file_dev.c:179-31 open disk: mode=OPEN_READ_WRITE open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006, 0x2, 0640)
bacula-sd: file_dev.c:186-31 open failed: file_dev.c:185 Could not open(/dev/disk/by-uuid/7345471b-770e-438e-8124-33b6d4599ce2/Volume-Default-0006,OPEN_READ_WRITE,0640): ERR=Not a directory

Am I doing something wrong ?

Best Regards

Wanderlei Hüttel


------------------------------------------------------------------------------


_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users



------------------------------------------------------------------------------

_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users