Re: [Bacula-users] Autochanger and Baculum

2024-02-06 Thread Marcin Haba
Hello Stefan,

Thanks for describing to us the solution that you found for the
autochanger management problem. Yes, Baculum needs to be capable to
open this directory.

Long time ago I prepared a chapter in the Baculum documentation about
setting up autochanger with Baculum. I guess you have already read it,
but maybe it will be helpful also for other users:

https://baculum.app/doc/brief/configuration.html#autochanger-management

On Tue, 6 Feb 2024 at 18:19, Stefan G. Weichinger  wrote:
>
> I think I found the issue:
>
> the execute-permission was missing on "/etc/bacula"
>
> I can unload tapes now from baculum.
>
> testing things now
>
> I hope I haven't broken anything by editing everything ;-)

You will see, but I am almost sure that you haven't broken anything :-D

Best regards,
Marcin Haba (gani)

> thanks, Stefan
>
>
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users



-- 
"Greater love hath no man than this, that a man lay down his life for
his friends." Jesus Christ

"Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
za przyjaciół swoich." Jezus Chrystus


___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Autochanger and Baculum

2024-02-06 Thread Stefan G. Weichinger

I think I found the issue:

the execute-permission was missing on "/etc/bacula"

I can unload tapes now from baculum.

testing things now

I hope I haven't broken anything by editing everything ;-)

thanks, Stefan


___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Autochanger and Baculum

2024-02-06 Thread Stefan G. Weichinger

sorry for "flooding"

I just want to provide as much details as possible


*mount
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Automatically selected Storage: loader1
Enter autochanger slot: 2
3991 Bad autochanger "loaded? drive 0" command: ERR=Keine Berechtigung.
Results=
3991 Bad autochanger "loaded? drive 0" command: ERR=Keine Berechtigung.
Results=
3991 Bad autochanger "loaded? drive 0" command: ERR=Keine Berechtigung.
Results=
3991 Bad autochanger "loaded? drive 0" command: ERR=Keine Berechtigung.
Results=
3304 Issuing autochanger "load Volume , Slot 2, Drive 0" command.
3992 Bad autochanger "load Volume  Slot 2, Drive 0": ERR=Keine Berechtigung.
Results=
3991 Bad autochanger "loaded? drive 0" command: ERR=Keine Berechtigung.
Results=
3001 Mounted Volume: Vol002
3001 Device ""HP-Ultrium4" (/dev/tape/by-id/scsi-350014380032d5e61-nst)" 
is already mounted with Volume "Vol002"


strange

-

current config:

# bacula-sd.conf

Device {
  Name = "HP-Ultrium4"
  MediaType = "LTO-4"
  ArchiveDevice = "/dev/tape/by-id/scsi-350014380032d5e61-nst"
  RemovableMedia = yes
  RandomAccess = no
  LabelMedia = yes
  AlwaysOpen = yes
  Autochanger = yes
  MaximumFileSize = 200
}

Autochanger {
  Name = "HP-Autoloader"
  Description = "HP 1x8 G2 AUTOLDR"
  Device = "HP-Ultrium4"
  ChangerDevice = "/dev/tape/by-id/scsi-350014380032d5e60-changer"
  ChangerCommand = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
}


# bacula-dir.conf

Storage {
  Name = "loader1"
  SdPort = 9103
  Address = "localhost"
  Password = "EkcGgtnIijvclGBT6fTwbT44bk5n-jKp8"
  Device = "HP-Ultrium4"
  MediaType = "LTO-4"
  Autochanger = yes
  MaximumConcurrentJobs = 10
}



___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Autochanger and Baculum

2024-02-06 Thread Stefan G. Weichinger

I edited the names and the device-names:

Device {
  Name = "HP-Ultrium4"
  MediaType = "LTO-4"
  DeviceType = "Tape"
  ArchiveDevice = "/dev/tape/by-id/scsi-350014380032d5e61-nst"
  LabelMedia = yes
  AlwaysOpen = yes
  Autochanger = yes
  MaximumFileSize = 200
}
Autochanger {
  Name = "HP-Autoloader"
  Description = "HP 1x8 G2 AUTOLDR"
  Device = "HP-Ultrium4"
  ChangerDevice = "/dev/tape/by-id/scsi-350014380032d5e60-changer"
  ChangerCommand = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
}

# lsscsi -g
[0:0:0:0]diskVMware   Virtual disk 2.0   /dev/sda   /dev/sg0
[1:0:0:0]tapeHP   Ultrium 4-SCSI   U62W  /dev/st0   /dev/sg2
[1:0:0:1]mediumx HP   1x8 G2 AUTOLDR   4.80  /dev/sch0  /dev/sg3
[4:0:0:0]cd/dvd  NECVMWar VMware SATA CD00 1.00  /dev/sr0   /dev/sg1

/etc/bacula/scripts/mtx-changer /dev/sg3 slots
8


# /usr/sbin/bconsole
Connecting to Director localhost:9101
1000 OK: 103 debian1-dir Version: 9.6.7 (10 December 2020)
Enter a period to cancel a command.
*status slots
Automatically selected Storage: HP-Autoloader
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Connecting to Storage daemon HP-Autoloader at localhost:9103 ...
3306 Issuing autochanger "slots" command.
Device "HP-Autoloader" has 0 slots.
No slots in changer to scan.






___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Autochanger and Baculum

2024-02-06 Thread Stefan G. Weichinger



I try to set up a HP 1x8 Changer and an LTO drive.

I defined it in

* bacula-sd.conf

Device {
  Name = "HP-LTO7"
  MediaType = "LTO-4"
  DeviceType = "Tape"
  ArchiveDevice = "/dev/nst0"
  LabelMedia = yes
  AlwaysOpen = yes
  Autochanger = yes
  MaximumFileSize = 200
}
Autochanger {
  Name = "HP Autoloader"
  Description = "HP 1x8 Autoloader"
  Device = "HP-LTO7"
  ChangerDevice = "/dev/tape/by-id/scsi-350014380032d5e60-changer"
  ChangerCommand = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
}

and in

* bacula-dir.conf


Storage {
  Name = "HP Autoloader"
  SdPort = 9103
  Address = "localhost"
  Password = "x"
  Device = "HP Autoloader"
  MediaType = "LTO-4"
  Autochanger = yes
  MaximumConcurrentJobs = 10
}


That works, backups write and restores read from tapes!


I want to be able to manage the autochanger in Baculum-11.0.6, so I 
tried to copy the cfg from bacula-dir.


Currently I even see the drive and the Changer slots in baculum, but for 
example I cannot "Unload" the current tape. Why?


# cat /etc/bacula/baculum/Config-api-apache/devices.conf

[HP-LTO7]
type = "device"
device = "/dev/nst0"
index = "0"

[HP Autoloader]
type = "autochanger"
device = "/dev/tape/by-id/scsi-350014380032d5e60-changer"
command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
use_sudo = "1"
drives = "HP-LTO7"


My understanding is:

configure bacula-sd, then bacula-dir, test via bconsole

then proceed to copy the config into baculum

This is a debian-12.4 host with bacula from the debian repos, and 
baculum from "http://www.bacula.org/downloads/baculum/stable-11/debian;




___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users