Re: [Bacula-users] Assistance with Autochanger configuration

2018-11-05 Thread William Muriithi
Hi Patti,

> Use /dev/sch0, not /dev/sg2.  Bear in mind, udev is not your friend.  If you 
> ever add another tape drive to your library or expand your device fabric, 
> these device references will/can change with every system boot.  As is, the 
> /dev/sgX references can change with reboots, but if you only have one changer 
> and one drive, the /dev/sch0 and /dev/nst0 devices should remain static.  

He seem to have the same problem too
https://unix.stackexchange.com/questions/193472/interacting-with-tape-library-on-centos-7-via-mtx

Hmm, it doesn't seem to live /dev/sch0.  I agree with you that using /dev/sgX 
isn't reliable, but when I made the change suggested above, it failed with the 
error below:
Tape block granularity is 1024 bytes.
btape: butil.c:290-0 Using device: "/dev/nst0" for writing.
05-Nov 13:17 btape JobId 0: 3991 Bad autochanger "loaded? drive 0" command: 
ERR=Child exited with code 1.
Results=/dev/sch0 is not an sg device, or old sg driver

> Also, you have "Drive Index = 1" commented out.  Uncomment and change it to 
> "Drive Index = 0".  All tape drives in a changer must have an index and the 
> first one is zero.  Give those a try.

Hmm, I have seem this previously and when I implemented it, I had this issue. I 
have 8 tapes, do I believe I need 8 archive device.  However, the system only 3 
sgX devices.  How would one overcome this problem?

[root@eng-backup02 ~]# ls -ltr /dev/sg*
crw-rw. 1 root disk 21, 0 Oct 10 15:42 /dev/sg0
crw-rw. 1 root tape 21, 1 Nov  5 12:16 /dev/sg1
crw-rw. 1 root tape 21, 2 Nov  5 12:16 /dev/sg2
[root@eng-backup02 ~]# 

Regards,
William

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


Re: [Bacula-users] Assistance with Autochanger configuration

2018-11-05 Thread Jeffrey R. Lang
William

I believe that message is generated when it tries to do an unload but the tape 
is still in the drive.   

Try changing the $BACULA_BASE/etc/mtx-changer.conf and set the "offline" 
variable to do an eject before an unload.

Then give it a try.

Jeff

-Original Message-
From: William Muriithi  
Sent: Monday, November 5, 2018 11:01 AM
To: Bacula Users Mailing List 
Subject: [Bacula-users] Assistance with Autochanger configuration

◆ This message was sent from a non-UWYO address. Please exercise caution when 
clicking links or opening attachments from external sources.


Hello,

We have a quantum superloader 3 that seem to be fine when tested through mt and 
mtx command.

[root@eng-backup02 ~]# lsscsi -g
[0:2:0:0]diskDELL PERC H710P   3.13  /dev/sda   /dev/sg0
[1:0:2:0]tapeIBM  ULTRIUM-HH6  E4J1  /dev/st0   /dev/sg1
[1:0:2:1]mediumx QUANTUM  UHDL 0091  /dev/sch0  /dev/sg2
[root@eng-backup02 ~]#

When we run btape -c test, the command, it come back successful for all tape 
tests.  However, for the autochanger, I am getting this error.  Have anyone 
seen it before and how did you resolve it?

=== Autochanger test ===

3301 Issuing autochanger "loaded" command.
Slot 3 loaded. I am going to unload it.
3302 Issuing autochanger "unload 3 0" command.
unload status=OK 0
3303 Issuing autochanger "load 1 0" command.
3993 Bad autochanger command: /etc/bacula/scripts/mtx-changer /dev/sg2 load 1 
/dev/nst0 0
3993 result="Loading media from Storage Element 1 into drive 0...done
": ERR=Child died from signal 15: Termination You must correct this error or 
the Autochanger will not work.
*

Below is my storage configurations:
Autochanger {
  Name = SuperLoader3
  Device = ultrium1
  Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
  Changer Device = /dev/sg2
}

Device {
  Name = ultrium1
  Media Type = LTO-6
  Archive Device = /dev/nst0
#  Drive Index = 1
  LabelMedia = yes;   # lets Bacula label unlabeled media
  Random Access = no;
  AutomaticMount = yes;   # when device opened, read it
  RemovableMedia = yes;
  AlwaysOpen = yes;
  Autochanger = yes;
}

Would appreciate any guidance a  lot

Regards,
William

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

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


Re: [Bacula-users] Assistance with Autochanger configuration

2018-11-05 Thread Clark, Patti via Bacula-users
Sorry about the /dev/sch0.  I've written udev rules to use consistent names 
regardless of what udev does - I do use the /dev/sgX for changer 
identification.  If you've rebooted your system, the output from lsscsi -g may 
have changed.  You still need the Drive Index line in your bacula-sd.conf .  

Ahhh - bacula-sd runs as the bacula user.  Did you add bacula to the tape group?

Patti
 

On 11/5/18, 1:34 PM, "William Muriithi"  wrote:

Hi Patti,

> Use /dev/sch0, not /dev/sg2.  Bear in mind, udev is not your friend.  If 
you ever add another tape drive to your library or expand your device fabric, 
these device references will/can change with every system boot.  As is, the 
/dev/sgX references can change with reboots, but if you only have one changer 
and one drive, the /dev/sch0 and /dev/nst0 devices should remain static.  

He seem to have the same problem too

https://unix.stackexchange.com/questions/193472/interacting-with-tape-library-on-centos-7-via-mtx

Hmm, it doesn't seem to live /dev/sch0.  I agree with you that using 
/dev/sgX isn't reliable, but when I made the change suggested above, it failed 
with the error below:
Tape block granularity is 1024 bytes.
btape: butil.c:290-0 Using device: "/dev/nst0" for writing.
05-Nov 13:17 btape JobId 0: 3991 Bad autochanger "loaded? drive 0" command: 
ERR=Child exited with code 1.
Results=/dev/sch0 is not an sg device, or old sg driver

> Also, you have "Drive Index = 1" commented out.  Uncomment and change it 
to "Drive Index = 0".  All tape drives in a changer must have an index and the 
first one is zero.  Give those a try.

Hmm, I have seem this previously and when I implemented it, I had this 
issue. I have 8 tapes, do I believe I need 8 archive device.  However, the 
system only 3 sgX devices.  How would one overcome this problem?

[root@eng-backup02 ~]# ls -ltr /dev/sg*
crw-rw. 1 root disk 21, 0 Oct 10 15:42 /dev/sg0
crw-rw. 1 root tape 21, 1 Nov  5 12:16 /dev/sg1
crw-rw. 1 root tape 21, 2 Nov  5 12:16 /dev/sg2
[root@eng-backup02 ~]# 

Regards,
William


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


Re: [Bacula-users] Assistance with Autochanger configuration

2018-11-05 Thread shouldbe q931
On Mon, Nov 5, 2018 at 5:22 PM William Muriithi  wrote:
>
> Hello,
>
> We have a quantum superloader 3 that seem to be fine when tested through mt 
> and mtx command.
>
> [root@eng-backup02 ~]# lsscsi -g
> [0:2:0:0]diskDELL PERC H710P   3.13  /dev/sda   /dev/sg0
> [1:0:2:0]tapeIBM  ULTRIUM-HH6  E4J1  /dev/st0   /dev/sg1
> [1:0:2:1]mediumx QUANTUM  UHDL 0091  /dev/sch0  /dev/sg2
> [root@eng-backup02 ~]#
>

The H710P is a SAS RAID controller not a SAS HBA, this might have an
impact on usage.

Cheers


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


Re: [Bacula-users] Assistance with Autochanger configuration

2018-11-05 Thread Clark, Patti via Bacula-users
Use /dev/sch0, not /dev/sg2.  Bear in mind, udev is not your friend.  If you 
ever add another tape drive to your library or expand your device fabric, these 
device references will/can change with every system boot.  As is, the /dev/sgX 
references can change with reboots, but if you only have one changer and one 
drive, the /dev/sch0 and /dev/nst0 devices should remain static.  Also, you 
have "Drive Index = 1" commented out.  Uncomment and change it to "Drive Index 
= 0".  All tape drives in a changer must have an index and the first one is 
zero.  Give those a try.

Patti Clark
Sr. Linux System Administrator
Oak Ridge National Laboratory

On 11/5/18, 12:26 PM, "William Muriithi"  wrote:

Hello,

We have a quantum superloader 3 that seem to be fine when tested through mt 
and mtx command.

[root@eng-backup02 ~]# lsscsi -g
[0:2:0:0]diskDELL PERC H710P   3.13  /dev/sda   /dev/sg0 
[1:0:2:0]tapeIBM  ULTRIUM-HH6  E4J1  /dev/st0   /dev/sg1 
[1:0:2:1]mediumx QUANTUM  UHDL 0091  /dev/sch0  /dev/sg2 
[root@eng-backup02 ~]#

When we run btape -c test, the command, it come back successful for all 
tape tests.  However, for the autochanger, I am getting this error.  Have 
anyone seen it before and how did you resolve it?

=== Autochanger test ===

3301 Issuing autochanger "loaded" command.
Slot 3 loaded. I am going to unload it.
3302 Issuing autochanger "unload 3 0" command.
unload status=OK 0
3303 Issuing autochanger "load 1 0" command.
3993 Bad autochanger command: /etc/bacula/scripts/mtx-changer /dev/sg2 load 
1 /dev/nst0 0
3993 result="Loading media from Storage Element 1 into drive 0...done
": ERR=Child died from signal 15: Termination
You must correct this error or the Autochanger will not work.
*

Below is my storage configurations:
Autochanger {
  Name = SuperLoader3
  Device = ultrium1 
  Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
  Changer Device = /dev/sg2
}

Device {
  Name = ultrium1
  Media Type = LTO-6
  Archive Device = /dev/nst0
#  Drive Index = 1
  LabelMedia = yes;   # lets Bacula label unlabeled media
  Random Access = no;
  AutomaticMount = yes;   # when device opened, read it
  RemovableMedia = yes;
  AlwaysOpen = yes;
  Autochanger = yes;
}

Would appreciate any guidance a  lot

Regards,
William 

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



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


[Bacula-users] Assistance with Autochanger configuration

2018-11-05 Thread William Muriithi
Hello,

We have a quantum superloader 3 that seem to be fine when tested through mt and 
mtx command.

[root@eng-backup02 ~]# lsscsi -g
[0:2:0:0]diskDELL PERC H710P   3.13  /dev/sda   /dev/sg0 
[1:0:2:0]tapeIBM  ULTRIUM-HH6  E4J1  /dev/st0   /dev/sg1 
[1:0:2:1]mediumx QUANTUM  UHDL 0091  /dev/sch0  /dev/sg2 
[root@eng-backup02 ~]#

When we run btape -c test, the command, it come back successful for all tape 
tests.  However, for the autochanger, I am getting this error.  Have anyone 
seen it before and how did you resolve it?

=== Autochanger test ===

3301 Issuing autochanger "loaded" command.
Slot 3 loaded. I am going to unload it.
3302 Issuing autochanger "unload 3 0" command.
unload status=OK 0
3303 Issuing autochanger "load 1 0" command.
3993 Bad autochanger command: /etc/bacula/scripts/mtx-changer /dev/sg2 load 1 
/dev/nst0 0
3993 result="Loading media from Storage Element 1 into drive 0...done
": ERR=Child died from signal 15: Termination
You must correct this error or the Autochanger will not work.
*

Below is my storage configurations:
Autochanger {
  Name = SuperLoader3
  Device = ultrium1 
  Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
  Changer Device = /dev/sg2
}

Device {
  Name = ultrium1
  Media Type = LTO-6
  Archive Device = /dev/nst0
#  Drive Index = 1
  LabelMedia = yes;   # lets Bacula label unlabeled media
  Random Access = no;
  AutomaticMount = yes;   # when device opened, read it
  RemovableMedia = yes;
  AlwaysOpen = yes;
  Autochanger = yes;
}

Would appreciate any guidance a  lot

Regards,
William 

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