No slots in changer to scan.

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

No slots in changer to scan.

Márcio Merlone
Hi,

I am running a bacula server since its 3.x series, now on version 7.4,
Ubuntu 16.04 on a Dell PE 2900 (old but gold). Just got this brand new
Dell TL1000 with 8 slots and one drive as an upgrade from the old simple
LTO-4 we have. Everything works fine on bash using the mtx-changer
script, while on bconsole it does not. Any hint?

root@phobos:~# lsscsi -g
[0:0:0:0]    cd/dvd  TSSTcorp CDRWDVD TS-H492C DE02  /dev/sr0 /dev/sg0
[2:0:8:0]    enclosu DP       BACKPLANE        1.05  - /dev/sg1
[2:2:0:0]    disk    DELL     PERC 5/i         1.03  /dev/sda /dev/sg2
[3:0:0:0]    tape    IBM      ULTRIUM-TD4      97F0  /dev/st0 /dev/sg3
[3:0:1:0]    tape    IBM      ULT3580-HH6      G9P1  /dev/st1 /dev/sg4
[3:0:1:1]    mediumx IBM      3572-TL          0071  /dev/sch0 /dev/sg5

root@phobos:~# /etc/bacula/mtx-changer /dev/sg5 slots
8
root@phobos:~# /etc/bacula/mtx-changer /dev/sg5 listall 0 /dev/sg4 0
D:0:E
S:1:F:000001L6
S:2:E
S:3:E
S:4:E
S:5:E
S:6:E
S:7:E
S:8:F:CLNU00L1
root@phobos:~# echo "update slots storage=TL1000" | bconsole
Connecting to Director 192.168.0.207:9101
1000 OK: 102 mercurio-dir Version: 7.4.7 (15 March 2017)
Enter a period to cancel a command.
update slots storage=TL1000
Automatically selected Catalog: CatalogoA1Sede
Using Catalog "CatalogoA1Sede"
Connecting to Storage daemon TL1000 at 192.168.0.207:9103 ...
3306 Issuing autochanger "slots" command.
Device "TL1000" has 0 slots.
No slots in changer to scan.
root@phobos:~#

bacula-sd.conf:

Storage {
   Name                                          = phobos-sd
   SDPort                                        = 9103
   WorkingDirectory                      = "/var/lib/bacula"
   Pid Directory                         = "/var/run/bacula"
   Maximum Concurrent Jobs       = 20
   SDAddress                                     = 192.168.0.207
   Maximum Concurrent Jobs       = 1
}
Device {
     Name                = LTO
     Media Type          = LTO-4
     Archive Device      = /dev/st0
         Device Type                     = Tape
     AutomaticMount      = yes
     AlwaysOpen          = yes
     RemovableMedia      = yes
     RandomAccess        = no
     AutoChanger         = no
         Volume Poll Interval    = 0
         Offline On Unmount      = yes
         Close on Poll           = yes
         Maximum Concurrent Jobs = 1
}
Autochanger {
   Name                          = TL1000
   device                        = LTO-6
   Changer Device        = /dev/sg5
   Changer Command       = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
}
Device {
         Name                    = LTO-6
         Media Type              = LTO-6
         Archive Device  = /dev/sg4
         Autochanger             = yes
         LabelMedia              = no
         AutomaticMount  = yes
         AlwaysOpen              = yes
}

bacula-dir.conf:

Storage {
         Name                    = LTO
         Address                 = 192.168.0.207
         SDPort                  = 9103
     Password            = "nonono"
         Device                  = LTO
         Media Type              = LTO-4
         Autochanger             = no
         Maximum Concurrent Jobs = 1
}
Storage {
         Name                    = TL1000
         Address                 = 192.168.0.207
         SDPort                  = 9103
     Password            = "nonono"
         Device                  = TL1000
         Media Type              = LTO-6
         Autochanger             = yes
         Maximum Concurrent Jobs = 1
}

Thanks for any hint and for bacula, best regards.

--
*Marcio Merlone*

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|

Re: No slots in changer to scan.

David Westfall
One thing that I see is that your LTO-6 points to an SG device and not an ST device.  Since you now have a library I would think that you would want bacula to reuse the tape, if so then you should use an nst device and not the base st.  The tape will rewind between jobs when you use the st device causing a long delay for bacula if it need to reuse for the next job.

I would recommend that you use a more specific path to your devices as the st and sg can change with kernel updates or new devices added or if you need to move to an new interface.

l /dev/tape/by-id/
lrwxrwxrwx 1 root root  10 Jun 12 06:30 scsi-1IBM_03584L32_0012042233500401 -> ../../sg13
lrwxrwxrwx 1 root root   9 Jun 12 06:30 scsi-1IBM_ULT3580-TD4_1204223351 -> ../../st2
lrwxrwxrwx 1 root root  10 Jun 12 06:30 scsi-1IBM_ULT3580-TD4_1204223351-nst -> ../../nst2
lrwxrwxrwx 1 root root   9 Jun 12 06:30 scsi-1IBM_ULT3580-TD4_1204223352 -> ../../st0
lrwxrwxrwx 1 root root  10 Jun 12 06:30 scsi-1IBM_ULT3580-TD4_1204223352-nst -> ../../nst0
lrwxrwxrwx 1 root root   9 Jun 12 06:30 scsi-1IBM_ULT3580-TD4_1264505056 -> ../../st3
lrwxrwxrwx 1 root root  10 Jun 12 06:30 scsi-1IBM_ULT3580-TD4_1264505056-nst -> ../../nst3
lrwxrwxrwx 1 root root   9 Jun 12 06:30 scsi-1IBM_ULT3580-TD4_1264505057 -> ../../st1
lrwxrwxrwx 1 root root  10 Jun 12 06:30 scsi-1IBM_ULT3580-TD4_1264505057-nst -> ../../nst1

 Changer Device = /dev/tape/by-id/scsi-1IBM_03584L32_0012042233500401
 Archive Device = /dev/tape/by-id/scsi-1IBM_ULT3580-TD4_1204223351-nst
 Archive Device = /dev/tape/by-id/scsi-1IBM_ULT3580-TD4_1204223352-nst
 Archive Device = /dev/tape/by-id/scsi-1IBM_ULT3580-TD4_1264505056-nst
 Archive Device = /dev/tape/by-id/scsi-1IBM_ULT3580-TD4_1264505057-nst



On Wed, Jun 14, 2017 at 2:18 PM, Marcio Merlone <[hidden email]> wrote:

>
> Hi,
>
> I am running a bacula server since its 3.x series, now on version 7.4, Ubuntu 16.04 on a Dell PE 2900 (old but gold). Just got this brand new Dell TL1000 with 8 slots and one drive as an upgrade from the old simple LTO-4 we have. Everything works fine on bash using the mtx-changer script, while on bconsole it does not. Any hint?
>
> root@phobos:~# lsscsi -g
> [0:0:0:0]    cd/dvd  TSSTcorp CDRWDVD TS-H492C DE02  /dev/sr0 /dev/sg0
> [2:0:8:0]    enclosu DP       BACKPLANE        1.05  - /dev/sg1
> [2:2:0:0]    disk    DELL     PERC 5/i         1.03  /dev/sda /dev/sg2
> [3:0:0:0]    tape    IBM      ULTRIUM-TD4      97F0  /dev/st0 /dev/sg3
> [3:0:1:0]    tape    IBM      ULT3580-HH6      G9P1  /dev/st1 /dev/sg4
> [3:0:1:1]    mediumx IBM      3572-TL          0071  /dev/sch0 /dev/sg5
>
> root@phobos:~# /etc/bacula/mtx-changer /dev/sg5 slots
> 8
> root@phobos:~# /etc/bacula/mtx-changer /dev/sg5 listall 0 /dev/sg4 0
> D:0:E
> S:1:F:000001L6
> S:2:E
> S:3:E
> S:4:E
> S:5:E
> S:6:E
> S:7:E
> S:8:F:CLNU00L1
> root@phobos:~# echo "update slots storage=TL1000" | bconsole
> Connecting to Director 192.168.0.207:9101
> 1000 OK: 102 mercurio-dir Version: 7.4.7 (15 March 2017)
> Enter a period to cancel a command.
> update slots storage=TL1000
> Automatically selected Catalog: CatalogoA1Sede
> Using Catalog "CatalogoA1Sede"
> Connecting to Storage daemon TL1000 at 192.168.0.207:9103 ...
> 3306 Issuing autochanger "slots" command.
> Device "TL1000" has 0 slots.
> No slots in changer to scan.
> root@phobos:~#
>
> bacula-sd.conf:
>
> Storage {
>   Name                                          = phobos-sd
>   SDPort                                        = 9103
>   WorkingDirectory                      = "/var/lib/bacula"
>   Pid Directory                         = "/var/run/bacula"
>   Maximum Concurrent Jobs       = 20
>   SDAddress                                     = 192.168.0.207
>   Maximum Concurrent Jobs       = 1
> }
> Device {
>     Name                = LTO
>     Media Type          = LTO-4
>     Archive Device      = /dev/st0
>         Device Type                     = Tape
>     AutomaticMount      = yes
>     AlwaysOpen          = yes
>     RemovableMedia      = yes
>     RandomAccess        = no
>     AutoChanger         = no
>         Volume Poll Interval    = 0
>         Offline On Unmount      = yes
>         Close on Poll           = yes
>         Maximum Concurrent Jobs = 1
> }
> Autochanger {
>   Name                          = TL1000
>   device                        = LTO-6
>   Changer Device        = /dev/sg5
>   Changer Command       = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
> }
> Device {
>         Name                    = LTO-6
>         Media Type              = LTO-6
>         Archive Device  = /dev/sg4
>         Autochanger             = yes
>         LabelMedia              = no
>         AutomaticMount  = yes
>         AlwaysOpen              = yes
> }
>
> bacula-dir.conf:
>
> Storage {
>         Name                    = LTO
>         Address                 = 192.168.0.207
>         SDPort                  = 9103
>     Password            = "nonono"
>         Device                  = LTO
>         Media Type              = LTO-4
>         Autochanger             = no
>         Maximum Concurrent Jobs = 1
> }
> Storage {
>         Name                    = TL1000
>         Address                 = 192.168.0.207
>         SDPort                  = 9103
>     Password            = "nonono"
>         Device                  = TL1000
>         Media Type              = LTO-6
>         Autochanger             = yes
>         Maximum Concurrent Jobs = 1
> }
>
> Thanks for any hint and for bacula, best regards.
>
> --
> *Marcio Merlone*
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Bacula-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/bacula-users




--
David Westfall

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|

Re: No slots in changer to scan.

Josh Fisher
In reply to this post by Márcio Merlone

On 6/14/2017 2:18 PM, Marcio Merlone wrote:
> Hi,
>
> I am running a bacula server since its 3.x series, now on version 7.4,
> Ubuntu 16.04 on a Dell PE 2900 (old but gold). Just got this brand new
> Dell TL1000 with 8 slots and one drive as an upgrade from the old
> simple LTO-4 we have. Everything works fine on bash using the
> mtx-changer script, while on bconsole it does not. Any hint?

Check the permissions on the device paths. The must be read/write for
the user that bacula-sd runs as. Also check ACLs for selinux, if enabled.

>
> root@phobos:~# lsscsi -g
> [0:0:0:0]    cd/dvd  TSSTcorp CDRWDVD TS-H492C DE02  /dev/sr0 /dev/sg0
> [2:0:8:0]    enclosu DP       BACKPLANE        1.05  - /dev/sg1
> [2:2:0:0]    disk    DELL     PERC 5/i         1.03  /dev/sda /dev/sg2
> [3:0:0:0]    tape    IBM      ULTRIUM-TD4      97F0  /dev/st0 /dev/sg3
> [3:0:1:0]    tape    IBM      ULT3580-HH6      G9P1  /dev/st1 /dev/sg4
> [3:0:1:1]    mediumx IBM      3572-TL          0071  /dev/sch0 /dev/sg5
>
> root@phobos:~# /etc/bacula/mtx-changer /dev/sg5 slots
> 8
> root@phobos:~# /etc/bacula/mtx-changer /dev/sg5 listall 0 /dev/sg4 0
> D:0:E
> S:1:F:000001L6
> S:2:E
> S:3:E
> S:4:E
> S:5:E
> S:6:E
> S:7:E
> S:8:F:CLNU00L1
> root@phobos:~# echo "update slots storage=TL1000" | bconsole
> Connecting to Director 192.168.0.207:9101
> 1000 OK: 102 mercurio-dir Version: 7.4.7 (15 March 2017)
> Enter a period to cancel a command.
> update slots storage=TL1000
> Automatically selected Catalog: CatalogoA1Sede
> Using Catalog "CatalogoA1Sede"
> Connecting to Storage daemon TL1000 at 192.168.0.207:9103 ...
> 3306 Issuing autochanger "slots" command.
> Device "TL1000" has 0 slots.
> No slots in changer to scan.
> root@phobos:~#
>
> bacula-sd.conf:
>
> Storage {
>   Name                                          = phobos-sd
>   SDPort                                        = 9103
>   WorkingDirectory                      = "/var/lib/bacula"
>   Pid Directory                         = "/var/run/bacula"
>   Maximum Concurrent Jobs       = 20
>   SDAddress                                     = 192.168.0.207
>   Maximum Concurrent Jobs       = 1
> }
> Device {
>     Name                = LTO
>     Media Type          = LTO-4
>     Archive Device      = /dev/st0
>         Device Type                     = Tape
>     AutomaticMount      = yes
>     AlwaysOpen          = yes
>     RemovableMedia      = yes
>     RandomAccess        = no
>     AutoChanger         = no
>         Volume Poll Interval    = 0
>         Offline On Unmount      = yes
>         Close on Poll           = yes
>         Maximum Concurrent Jobs = 1
> }
> Autochanger {
>   Name                          = TL1000
>   device                        = LTO-6
>   Changer Device        = /dev/sg5
>   Changer Command       = "/etc/bacula/scripts/mtx-changer %c %o %S %a
> %d"
> }
> Device {
>         Name                    = LTO-6
>         Media Type              = LTO-6
>         Archive Device  = /dev/sg4
>         Autochanger             = yes
>         LabelMedia              = no
>         AutomaticMount  = yes
>         AlwaysOpen              = yes
> }
>
> bacula-dir.conf:
>
> Storage {
>         Name                    = LTO
>         Address                 = 192.168.0.207
>         SDPort                  = 9103
>     Password            = "nonono"
>         Device                  = LTO
>         Media Type              = LTO-4
>         Autochanger             = no
>         Maximum Concurrent Jobs = 1
> }
> Storage {
>         Name                    = TL1000
>         Address                 = 192.168.0.207
>         SDPort                  = 9103
>     Password            = "nonono"
>         Device                  = TL1000
>         Media Type              = LTO-6
>         Autochanger             = yes
>         Maximum Concurrent Jobs = 1
> }
>
> Thanks for any hint and for bacula, best regards.
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|

Re: No slots in changer to scan.

Kern Sibbald
In reply to this post by Márcio Merlone
Hello Marcio,

As someone already pointed out your SD is probably running under
"bacula" and so may not have permission to access your library.

Try running with a debug level of 100 in the SD.

setdebug level=100 storage=TL1000

then add the barcode keyword to your command:

update slots barcodes storage=TL1000

Good luck,

Kern


On 06/14/2017 08:18 PM, Marcio Merlone wrote:

> Hi,
>
> I am running a bacula server since its 3.x series, now on version 7.4,
> Ubuntu 16.04 on a Dell PE 2900 (old but gold). Just got this brand new
> Dell TL1000 with 8 slots and one drive as an upgrade from the old
> simple LTO-4 we have. Everything works fine on bash using the
> mtx-changer script, while on bconsole it does not. Any hint?
>
> root@phobos:~# lsscsi -g
> [0:0:0:0]    cd/dvd  TSSTcorp CDRWDVD TS-H492C DE02  /dev/sr0 /dev/sg0
> [2:0:8:0]    enclosu DP       BACKPLANE        1.05  - /dev/sg1
> [2:2:0:0]    disk    DELL     PERC 5/i         1.03  /dev/sda /dev/sg2
> [3:0:0:0]    tape    IBM      ULTRIUM-TD4      97F0  /dev/st0 /dev/sg3
> [3:0:1:0]    tape    IBM      ULT3580-HH6      G9P1  /dev/st1 /dev/sg4
> [3:0:1:1]    mediumx IBM      3572-TL          0071  /dev/sch0 /dev/sg5
>
> root@phobos:~# /etc/bacula/mtx-changer /dev/sg5 slots
> 8
> root@phobos:~# /etc/bacula/mtx-changer /dev/sg5 listall 0 /dev/sg4 0
> D:0:E
> S:1:F:000001L6
> S:2:E
> S:3:E
> S:4:E
> S:5:E
> S:6:E
> S:7:E
> S:8:F:CLNU00L1
> root@phobos:~# echo "update slots storage=TL1000" | bconsole
> Connecting to Director 192.168.0.207:9101
> 1000 OK: 102 mercurio-dir Version: 7.4.7 (15 March 2017)
> Enter a period to cancel a command.
> update slots storage=TL1000
> Automatically selected Catalog: CatalogoA1Sede
> Using Catalog "CatalogoA1Sede"
> Connecting to Storage daemon TL1000 at 192.168.0.207:9103 ...
> 3306 Issuing autochanger "slots" command.
> Device "TL1000" has 0 slots.
> No slots in changer to scan.
> root@phobos:~#
>
> bacula-sd.conf:
>
> Storage {
>   Name                                          = phobos-sd
>   SDPort                                        = 9103
>   WorkingDirectory                      = "/var/lib/bacula"
>   Pid Directory                         = "/var/run/bacula"
>   Maximum Concurrent Jobs       = 20
>   SDAddress                                     = 192.168.0.207
>   Maximum Concurrent Jobs       = 1
> }
> Device {
>     Name                = LTO
>     Media Type          = LTO-4
>     Archive Device      = /dev/st0
>         Device Type                     = Tape
>     AutomaticMount      = yes
>     AlwaysOpen          = yes
>     RemovableMedia      = yes
>     RandomAccess        = no
>     AutoChanger         = no
>         Volume Poll Interval    = 0
>         Offline On Unmount      = yes
>         Close on Poll           = yes
>         Maximum Concurrent Jobs = 1
> }
> Autochanger {
>   Name                          = TL1000
>   device                        = LTO-6
>   Changer Device        = /dev/sg5
>   Changer Command       = "/etc/bacula/scripts/mtx-changer %c %o %S %a
> %d"
> }
> Device {
>         Name                    = LTO-6
>         Media Type              = LTO-6
>         Archive Device  = /dev/sg4
>         Autochanger             = yes
>         LabelMedia              = no
>         AutomaticMount  = yes
>         AlwaysOpen              = yes
> }
>
> bacula-dir.conf:
>
> Storage {
>         Name                    = LTO
>         Address                 = 192.168.0.207
>         SDPort                  = 9103
>     Password            = "nonono"
>         Device                  = LTO
>         Media Type              = LTO-4
>         Autochanger             = no
>         Maximum Concurrent Jobs = 1
> }
> Storage {
>         Name                    = TL1000
>         Address                 = 192.168.0.207
>         SDPort                  = 9103
>     Password            = "nonono"
>         Device                  = TL1000
>         Media Type              = LTO-6
>         Autochanger             = yes
>         Maximum Concurrent Jobs = 1
> }
>
> Thanks for any hint and for bacula, best regards.
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users