Hello,

first, on Linux it's recommended specify the /dev/tape/by-id/... instead of 
/dev/nstX in
the configuration. Look at the output of

    lsscsi -g

and

    ls -l /dev/tape/by-id/

because the /dev/nstX and /dev/sgX devices are not guaranteed to be persistent
across reboots.

Also, the Drive Index should increment by 1, you have DriveIndex = 0 and 
DriveIndex = 2,
that should be DriveIndex = 0 and DriveIndex = 1
Same for the other changer, the DriveIndex must be unique per changer, not 
globally.

Example:

[root@bareost02 ~]# lsscsi -g
[0:0:0:0]    cd/dvd  QEMU     QEMU DVD-ROM     1.6.  /dev/sr0   /dev/sg0
[2:0:0:0]    mediumx STK      L700             0105  /dev/sch0  /dev/sg8
[2:0:1:0]    tape    IBM      ULT3580-TD5      0105  /dev/st0   /dev/sg1
[2:0:2:0]    tape    IBM      ULT3580-TD5      0105  /dev/st1   /dev/sg2
[2:0:3:0]    tape    IBM      ULT3580-TD4      0105  /dev/st2   /dev/sg3
[2:0:4:0]    tape    IBM      ULT3580-TD4      0105  /dev/st3   /dev/sg4
[2:0:8:0]    mediumx STK      L80              0105  /dev/sch1  /dev/sg9
[2:0:9:0]    tape    STK      T10000B          0105  /dev/st4   /dev/sg5
[2:0:10:0]   tape    STK      T10000B          0105  /dev/st5   /dev/sg6
[2:0:11:0]   tape    STK      T10000B          0105  /dev/st6   /dev/sg7
[2:0:12:0]   tape    STK      T10000B          0105  /dev/st7   /dev/sg10
[root@bareost02 ~]# ls -l /dev/tape/by-id/
total 0
lrwxrwxrwx. 1 root root   9 Jan  3 13:22 scsi-350223344ab000100 -> ../../st0
lrwxrwxrwx. 1 root root  10 Jan  3 13:22 scsi-350223344ab000100-nst -> 
../../nst0
lrwxrwxrwx. 1 root root   9 Jan  3 13:22 scsi-350223344ab000200 -> ../../st1
lrwxrwxrwx. 1 root root  10 Jan  3 13:22 scsi-350223344ab000200-nst -> 
../../nst1
lrwxrwxrwx. 1 root root   9 Jan  3 13:22 scsi-350223344ab000300 -> ../../st2
lrwxrwxrwx. 1 root root  10 Jan  3 13:22 scsi-350223344ab000300-nst -> 
../../nst2
lrwxrwxrwx. 1 root root   9 Jan  3 13:22 scsi-350223344ab000400 -> ../../st3
lrwxrwxrwx. 1 root root  10 Jan  3 13:22 scsi-350223344ab000400-nst -> 
../../nst3
lrwxrwxrwx. 1 root root   9 Jan  3 13:22 scsi-350223344ab000900 -> ../../st4
lrwxrwxrwx. 1 root root  10 Jan  3 13:22 scsi-350223344ab000900-nst -> 
../../nst4
lrwxrwxrwx. 1 root root   9 Jan  3 13:22 scsi-350223344ab001000 -> ../../st5
lrwxrwxrwx. 1 root root  10 Jan  3 13:22 scsi-350223344ab001000-nst -> 
../../nst5
lrwxrwxrwx. 1 root root   9 Jan  3 13:22 scsi-350223344ab001100 -> ../../st6
lrwxrwxrwx. 1 root root  10 Jan  3 13:22 scsi-350223344ab001100-nst -> 
../../nst6
lrwxrwxrwx. 1 root root   9 Jan  3 13:22 scsi-350223344ab001200 -> ../../st7
lrwxrwxrwx. 1 root root  10 Jan  3 13:22 scsi-350223344ab001200-nst -> 
../../nst7
lrwxrwxrwx. 1 root root   9 Jan  3 13:22 scsi-SSTK_L700_XYZZY_A -> ../../sg8
lrwxrwxrwx. 1 root root   9 Jan  3 13:22 scsi-SSTK_L80_XYZZY_B -> ../../sg9

The config then should look like this:

Autochanger {
  Name = "L700"
  Changer Device = /dev/tape/by-id/scsi-SSTK_L700_XYZZY_A
  Device = L700Drive0
  Device = L700Drive1
  Device = L700Drive2
  Device = L700Drive3
  Changer Command = "/usr/lib/bareos/scripts/mtx-changer %c %o %S %a %d"
}

Device {
    Name = "L700Drive0"
    DeviceType = tape
    DriveIndex = 0
    ArchiveDevice = /dev/tape/by-id/scsi-350223344ab000100-nst
    ...
}

Device {
    Name = "L700Drive1"
    DeviceType = tape
    DriveIndex = 1
    ArchiveDevice = /dev/tape/by-id/scsi-350223344ab000200-nst
    ...
}

Device {
    Name = "L700Drive2"
    DeviceType = tape
    DriveIndex = 2
    ArchiveDevice = /dev/tape/by-id/scsi-350223344ab000300-nst
    ...
}

Device {
    Name = "L700Drive3"
    DeviceType = tape
    DriveIndex = 3
    ArchiveDevice = /dev/tape/by-id/scsi-350223344ab000400-nst
    ...
}

Autochanger {
  Name = "L80"
  Changer Device = /dev/tape/by-id/scsi-SSTK_L80_XYZZY_B
  Device = L80Drive0
  Device = L80Drive1
  Device = L80Drive2
  Device = L80Drive3
  Changer Command = "/usr/lib/bareos/scripts/mtx-changer %c %o %S %a %d"
}

Device {
    Name = "L80Drive0"
    DeviceType = tape
    DriveIndex = 0
    ArchiveDevice = /dev/tape/by-id/scsi-350223344ab000900-nst
    ...
}

Device {
    Name = "L80Drive1"
    DeviceType = tape
    DriveIndex = 1
    ArchiveDevice = /dev/tape/by-id/scsi-350223344ab001000-nst
    ...
}

Device {
    Name = "L80Drive2"
    DeviceType = tape
    DriveIndex = 2
    ArchiveDevice = /dev/tape/by-id/scsi-350223344ab001100-nst
    ...
}

Device {
    Name = "L80Drive3"
    DeviceType = tape
    DriveIndex = 3
    ArchiveDevice = /dev/tape/by-id/scsi-350223344ab001200-nst
    ...
}


Regards,

Stephan


On 12/28/2016 05:44 PM, Daniel Wedewardt wrote:
> Hello Community,
> 
> I've already searched the mailing list and Google but wasn't able to find a 
> helpful answer. Therefore I decided to post my issue here and ask you for 
> some thoughts.
> 
> I have two auto changing storage libraries (Tandberg T40 and Overland 
> NEO400s). Both with two drives each. As you hopefully can see in attached 
> screenshot "release_only_Drive0.png", I have a wired issue when releasing (or 
> (un-)mounting) tapes from/to second drive in NEO400s. As you can see he 
> answers with '3999 Device "NEO400" not found or could not be opened.' while 
> the same command to first drive gets the right feedback '3307 Issuing 
> autochanger "unload slot 1, drive 0" command.'
> 
> Restarting bareos-dir and bareos-sd does not solve the issue.
> 
> Doing the same task from CLI with mtx while bareos-sd is stopped result in 
> --
> # /usr/sbin/mtx -f /dev/AutoChanger unload 1 2
> Unloading drive 2 into Storage Element 1...done
> --
> 
> Please find also attached bareos-sd.d/neo400.conf attached as well for your 
> reference. DriveIndex is IMHO correct. The NEO400s has 4 half hight drive 
> slots where drive slot 1 and 3 are used what will result in DriveIndex0 for 
> /dev/nst0 and DriveIndex2 for /dev/nst1.
> 
> Best
> Daniel W.
> 


-- 
  Stephan Dühr                              [email protected]
  Bareos GmbH & Co. KG                      Phone: +49 221-630693-90
  http://www.bareos.com

  Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
  Komplementär: Bareos Verwaltungs-GmbH
  Geschäftsführer: S. Dühr, M. Außendorf, J. Steffens, Philipp Storz

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to