Re: [Bacula-users] [Non-DoD Source] Re: Bacula kills tape drive and autoloader

2017-07-26 Thread Darold Lucus
lsscsi -L This will list your auto changer

mtx -f /dev/sgx status This will list all of the tapes in your auto changer.


root@nas:~# mtx -f /dev/sg1 status
  Storage Changer /dev/sg1:1 Drives, 16 Slots ( 0 Import/Export )
Data Transfer Element 0:Empty
  Storage Element 1:Full :VolumeTag=131000
  Storage Element 2:Full :VolumeTag=131001
  Storage Element 3:Full :VolumeTag=131002
  Storage Element 4:Full :VolumeTag=131003


   root@nas:~# lsscsi -L
[5:0:0:0]tapeQUANTUM  ULTRIUM 53210  /dev/st0
  device_blocked=0
  iocounterbits=32
  iodone_cnt=0x11
  ioerr_cnt=0x1
  iorequest_cnt=0x11
  queue_depth=1
  queue_type=none
  scsi_level=7
  state=running
  timeout=900
  type=1
[5:0:0:1]mediumx QUANTUM  UHDL 0090  /dev/sch0
  device_blocked=0
  iocounterbits=32
  iodone_cnt=0x19
  ioerr_cnt=0x2
  iorequest_cnt=0x19
  queue_depth=1
  queue_type=none
  scsi_level=3
  state=running
  timeout=0
  type=8

lsscsi -g
[6:0:0:0]tapeQUANTUM  ULTRIUM 53210  */dev/st0 *  /dev/sg0
*=Drive*
[6:0:0:1]mediumx QUANTUM  UHDL0092  /dev/sch0 * /dev/sg1 =Changer*







Sincerely,

Darold Lucus


[image: cid:image002.png@01D06336.119F49E0] 

=
LAN Administrator
EMAC, Inc
618-529-4525 EXT:370
www.emacinc.com
=



This message is confidential. It may also be privileged or otherwise
protected by work product immunity or other legal rules. If you have
received it by mistake, please let us know by e-mail reply and delete it
from your system; you may not copy this message or disclose its contents to
anyone.

On Wed, Jul 26, 2017 at 5:53 PM, Ana Emília M. Arruda <
emiliaarr...@gmail.com> wrote:

> Hello Daniel,
>
> Did you run the btape tests? were the tests successful?
> All tapes need to be blank tapes before you label them in Bacula.
> If, for example, you use tar to write to the tape, then you label this
> tape in Bacula, only the space not used by the tar command will be
> available to be used by Bascula.
>
> You may also make sure you don't have volume size limit in your pool
> definition.
>
> Hope this helps.
>
> Best regards,
>
> Ana
>
> El 26 jul. 2017 14:58, "Hicks, Daniel CTR OSD DMEA" <
> daniel.hicks@dmea.osd.mil> escribió:
>
>> Ana
>>
>>
>>
>> Thanks for your help, your suggestions helped to get me started. I also
>> needed to define within the source pool that is was a read pool for the
>> job.
>>
>>
>>
>> Now I have two different issues, one where I can only write a small
>> amount of data about 2GB of data and then the tape is marked full, the
>> tapes are 3TB tapes. The other is when a larger migration job starts about
>> 5 minutes in it will kill the tape drive taking it offline where the server
>> no longer sees the SCSI devices for autoloader and tape drive. The only way
>> to get it back is to reboot the autoloader/tape drive.
>>
>>
>>
>> Any ideas.
>>
>>
>>
>> Daniel Hicks | 916-999-2711 <(916)%20999-2711> | DMEA
>>
>>
>>
>> *From:* Ana Emília M. Arruda [mailto:emiliaarr...@gmail.com]
>> *Sent:* Monday, July 24, 2017 3:01 PM
>> *To:* Hicks, Daniel CTR OSD DMEA 
>> *Cc:* Bacula-users@lists.sourceforge.net
>> *Subject:* Re: [Non-DoD Source] Re: [Bacula-users] Bacula kills tape
>> drive and autoloader
>>
>>
>>
>> Hello Daniel,
>>
>>
>>
>> You are welcome :-).
>>
>>
>>
>> I see you are using /dev/sgX and /dev/nstX device names for the
>> autochanger configuration. This is not recommended since they can be
>> modified after server reboots.
>>
>>
>>
>> Please use /dev/tape/by-id values or even udev rules. Also, I noticed you
>> have a pool configured to use "Storage = HP-Overland". To avoid confusion,
>> I would rename your tape library and tape drive resources:
>>
>>
>>
>>
>>
>> bacula-sd.conf
>>
>>
>>
>> Autochanger {
>>
>>   Name = "
>>
>> ​HP-Overland-​
>>
>> Autochanger"
>>
>>   Device = HP-Overland
>>
>> ​-Drive-0​
>>
>>   Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d"
>>
>>   Changer Device = /dev/​tape/by-id/scsi-3500110a00093f5f0
>>
>> }
>>
>>
>>
>> Device {
>>
>>   Name = HP-Overland
>>
>> ​-Drive-0​
>>
>>   Drive Index = 0
>>
>>   Media Type = LTO-5
>>
>>   Archive Device = /dev/​tape/by-id/scsi-3500110a00093f5f1-nst
>>
>>   AutomaticMount = yes;
>>
>>   AlwaysOpen = yes;
>>
>>   RemovableMedia = yes;
>>
>>   RandomAccess = no;
>>
>>   AutoChanger = yes;
>>
>>   Alert Command = "sh -c 'smartctl -H -l error /dev/sg3'"
>>
>> }
>>
>>
>>
>>
>> ​The Storage definition in bacula-dir.conf, should use
>>
>> ​ be something like:
>>
>>
>>
>> Storage {
>>
>>   Name =
>>
>> HP-Overlan
>>
>> ​d​
>>
>> ​-TL
>>
>>   Device = HP-Overland-Autochanger
>>
>> ...
>>
>>   Autochanger = yes
>>
>> ​}​
>>
>> ​
>>
>>
>>
>> ​Then your Tape pool should be configured to use the tape library and not
>> the single drive:​
>>
>>
>>
>> # Tape pool definition
>>
>> Pool {
>>
>>   Name = Tape
>>
>>   Pool Type = Backup
>>
>>   Recycle = yes
>>
>>   AutoPrune = yes

Re: [Bacula-users] Error talking to remote storage daemon

2017-07-26 Thread Ana Emília M . Arruda
Hi steve,

It seems we have a configuration issue. It is not a good idea to have
symlinks to sg devices. They can change after a server reboot.

**
>From the /dev directory on odin:
lrwxrwxrwx 1 root root 3 Jun  5 17:42 /dev/autochanger1 -> sg3
crw-rw 1 root tape 21, 3 Jun  1 15:01 /dev/sg3
**

This can be very probably causing this issue with the label command. But I
can't confirm this because I have never tried this.

It is better to use the /dev/tape/by-id names and even better to create
udev rules based on the tape library specific charactheristics  such as
serial number.

A "ls -lR /dev/tape" and "lsscsi -g" will help you.

Then you should chage:

Changer Device = /dev/autochanger1 with the by-id name for mediumx

And

Archive Device = /dev/nst0 with the by-id name for the tape drive (remember
to use here the one that ends with -nst).

I noticed you have data spool configured. With an LTO6 It is very probably
that you will slow down backups performance, unless you have clients with
poor network performance.

Hope this helps you.

Best regards,
Ana

El 26 jul. 2017 20:25, "Steve Garcia"  escribió:

OK, I've got my tape drive working (thanks Ana!) but I'm having trouble
connecting to the autochanger it's in using the director.  This is the
first time I've tried having a storage daemon on a different machine than
the director.  The director is a slightly lower version (7.4.3 on Debian
Jessie using backports) than the storage daemon (7.4.4 on stretch) but I
had understood that those versions were close enough to work.

So I'm hoping this is another configuration issue.

Right now what I'm trying to do is label all the tapes in the new library.

When I try to access the new storage from the director, it is able to get a
listing of all the tapes, but it fails when it tries to actually do the
labeling.  I get a "3999 Device not found or could not be opened" error.
These errors show up quickly, there is no delay as it tries each slot, so
it's obviously not getting far enough to try.  But it *is* obviously
connecting to the remote storage, otherwise it wouldn't be able to obtain
the slot list.

What am I missing?

root@sleipnir:/etc/bacula# bconsole
Connecting to Director sleipnir:9101
1000 OK: 102 sleipnir-dir Version: 7.4.3 (18 June 2016)
Enter a period to cancel a command.
*label storage=Library2 barcodes
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Connecting to Storage daemon Library2 at odin:9103 ...
3306 Issuing autochanger "slots" command.
Device "AutochangerOdin" has 24 slots.
Connecting to Storage daemon Library2 at odin:9103 ...
3306 Issuing autochanger "list" command.
The following Volumes will be labeled:
Slot  Volume
==
   1  15L6
   2  18L6
   3  21L6
   4  CLNU00L1
   5  14L6
   6  17L6
   7  20L6
   8  CLN005L3
   9  13L6
  10  16L6
  11  19L6
  12  12L6
  13  09L6
  14  06L6
  15  03L6
  16  11L6
  17  08L6
  18  05L6
  19  02L6
  20  10L6
  21  07L6
  22  04L6
  23  01L6
Do you want to label these Volumes? (yes|no):  yes
Defined Pools:
 1: Default
 2: OdinPool
Select the Pool (1-2): 2
Connecting to Storage daemon Library2 at odin:9103 ...
Sending label command for Volume "15L6" Slot 1 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 15L6.
Sending label command for Volume "18L6" Slot 2 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 18L6.
Sending label command for Volume "21L6" Slot 3 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 21L6.
Media record for Slot 4 Volume "CLNU00L1" already exists.
Sending label command for Volume "14L6" Slot 5 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 14L6.
Sending label command for Volume "17L6" Slot 6 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 17L6.
Sending label command for Volume "20L6" Slot 7 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 20L6.
Media record for Slot 8 Volume "CLN005L3" already exists.
Sending label command for Volume "13L6" Slot 9 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 13L6.
Sending label command for Volume "16L6" Slot 10 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 16L6.
Sending label command for Volume "19L6" Slot 11 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 19L6.
Sending label command for Volume "12L6" Slot 12 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed 

Re: [Bacula-users] [Non-DoD Source] Re: Bacula kills tape drive and autoloader

2017-07-26 Thread Ana Emília M . Arruda
Hello Daniel,

Did you run the btape tests? were the tests successful?
All tapes need to be blank tapes before you label them in Bacula.
If, for example, you use tar to write to the tape, then you label this tape
in Bacula, only the space not used by the tar command will be available to
be used by Bascula.

You may also make sure you don't have volume size limit in your pool
definition.

Hope this helps.

Best regards,

Ana

El 26 jul. 2017 14:58, "Hicks, Daniel CTR OSD DMEA" <
daniel.hicks@dmea.osd.mil> escribió:

> Ana
>
>
>
> Thanks for your help, your suggestions helped to get me started. I also
> needed to define within the source pool that is was a read pool for the
> job.
>
>
>
> Now I have two different issues, one where I can only write a small amount
> of data about 2GB of data and then the tape is marked full, the tapes are
> 3TB tapes. The other is when a larger migration job starts about 5 minutes
> in it will kill the tape drive taking it offline where the server no longer
> sees the SCSI devices for autoloader and tape drive. The only way to get it
> back is to reboot the autoloader/tape drive.
>
>
>
> Any ideas.
>
>
>
> Daniel Hicks | 916-999-2711 <(916)%20999-2711> | DMEA
>
>
>
> *From:* Ana Emília M. Arruda [mailto:emiliaarr...@gmail.com]
> *Sent:* Monday, July 24, 2017 3:01 PM
> *To:* Hicks, Daniel CTR OSD DMEA 
> *Cc:* Bacula-users@lists.sourceforge.net
> *Subject:* Re: [Non-DoD Source] Re: [Bacula-users] Bacula kills tape
> drive and autoloader
>
>
>
> Hello Daniel,
>
>
>
> You are welcome :-).
>
>
>
> I see you are using /dev/sgX and /dev/nstX device names for the
> autochanger configuration. This is not recommended since they can be
> modified after server reboots.
>
>
>
> Please use /dev/tape/by-id values or even udev rules. Also, I noticed you
> have a pool configured to use "Storage = HP-Overland". To avoid confusion,
> I would rename your tape library and tape drive resources:
>
>
>
>
>
> bacula-sd.conf
>
>
>
> Autochanger {
>
>   Name = "
>
> ​HP-Overland-​
>
> Autochanger"
>
>   Device = HP-Overland
>
> ​-Drive-0​
>
>   Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d"
>
>   Changer Device = /dev/​tape/by-id/scsi-3500110a00093f5f0
>
> }
>
>
>
> Device {
>
>   Name = HP-Overland
>
> ​-Drive-0​
>
>   Drive Index = 0
>
>   Media Type = LTO-5
>
>   Archive Device = /dev/​tape/by-id/scsi-3500110a00093f5f1-nst
>
>   AutomaticMount = yes;
>
>   AlwaysOpen = yes;
>
>   RemovableMedia = yes;
>
>   RandomAccess = no;
>
>   AutoChanger = yes;
>
>   Alert Command = "sh -c 'smartctl -H -l error /dev/sg3'"
>
> }
>
>
>
>
> ​The Storage definition in bacula-dir.conf, should use
>
> ​ be something like:
>
>
>
> Storage {
>
>   Name =
>
> HP-Overlan
>
> ​d​
>
> ​-TL
>
>   Device = HP-Overland-Autochanger
>
> ...
>
>   Autochanger = yes
>
> ​}​
>
> ​
>
>
>
> ​Then your Tape pool should be configured to use the tape library and not
> the single drive:​
>
>
>
> # Tape pool definition
>
> Pool {
>
>   Name = Tape
>
>   Pool Type = Backup
>
>   Recycle = yes
>
>   AutoPrune = yes
>
>   Volume Retention = 3 years
>
>   Storage = HP-Overland​​-TL
>
> }
>
>
>
> ​Regarding what you mentioned about the migration job, I would recommend
> you to have the btape tests successfully run and a successful backup job
> writing to tape before dealing with a migration job.​
>
>
>
> The "fill" btape test needs a blank tape. You should have it formated
> before using it with the fill btape test:
>
>
>
> mt -f /dev/nst0 rewind
>
> mt -f /dev/nst0 weof
>
>
>
> If this does not solve this problem, please let us know the Bacula version
> you are using.
>
>
>
> Best regards,
>
> Ana
>
--
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
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Error talking to remote storage daemon

2017-07-26 Thread Steve Garcia
OK, I've got my tape drive working (thanks Ana!) but I'm having trouble 
connecting to the autochanger it's in using the director.  This is the first 
time I've tried having a storage daemon on a different machine than the 
director.  The director is a slightly lower version (7.4.3 on Debian Jessie 
using backports) than the storage daemon (7.4.4 on stretch) but I had 
understood that those versions were close enough to work.

So I'm hoping this is another configuration issue.

Right now what I'm trying to do is label all the tapes in the new library.

When I try to access the new storage from the director, it is able to get a 
listing of all the tapes, but it fails when it tries to actually do the 
labeling.  I get a "3999 Device not found or could not be opened" error.  These 
errors show up quickly, there is no delay as it tries each slot, so it's 
obviously not getting far enough to try.  But it *is* obviously connecting to 
the remote storage, otherwise it wouldn't be able to obtain the slot list.

What am I missing?

root@sleipnir:/etc/bacula# bconsole
Connecting to Director sleipnir:9101
1000 OK: 102 sleipnir-dir Version: 7.4.3 (18 June 2016)
Enter a period to cancel a command.
*label storage=Library2 barcodes
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Connecting to Storage daemon Library2 at odin:9103 ...
3306 Issuing autochanger "slots" command.
Device "AutochangerOdin" has 24 slots.
Connecting to Storage daemon Library2 at odin:9103 ...
3306 Issuing autochanger "list" command.
The following Volumes will be labeled:
Slot  Volume
==
   1  15L6
   2  18L6
   3  21L6
   4  CLNU00L1
   5  14L6
   6  17L6
   7  20L6
   8  CLN005L3
   9  13L6
  10  16L6
  11  19L6
  12  12L6
  13  09L6
  14  06L6
  15  03L6
  16  11L6
  17  08L6
  18  05L6
  19  02L6
  20  10L6
  21  07L6
  22  04L6
  23  01L6
Do you want to label these Volumes? (yes|no):  yes
Defined Pools:
 1: Default
 2: OdinPool
Select the Pool (1-2): 2
Connecting to Storage daemon Library2 at odin:9103 ...
Sending label command for Volume "15L6" Slot 1 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 15L6.
Sending label command for Volume "18L6" Slot 2 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 18L6.
Sending label command for Volume "21L6" Slot 3 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 21L6.
Media record for Slot 4 Volume "CLNU00L1" already exists.
Sending label command for Volume "14L6" Slot 5 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 14L6.
Sending label command for Volume "17L6" Slot 6 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 17L6.
Sending label command for Volume "20L6" Slot 7 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 20L6.
Media record for Slot 8 Volume "CLN005L3" already exists.
Sending label command for Volume "13L6" Slot 9 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 13L6.
Sending label command for Volume "16L6" Slot 10 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 16L6.
Sending label command for Volume "19L6" Slot 11 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 19L6.
Sending label command for Volume "12L6" Slot 12 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 12L6.
Sending label command for Volume "09L6" Slot 13 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 09L6.
Sending label command for Volume "06L6" Slot 14 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 06L6.
Sending label command for Volume "03L6" Slot 15 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 03L6.
Sending label command for Volume "11L6" Slot 16 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 11L6.
Sending label command for Volume "08L6" Slot 17 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 08L6.
Sending label command for Volume "05L6" Slot 18 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 05L6.
Sending label command for Volume "02L6" Slot 19 ...
3999 Device "AutochangerOdin" not found or could not be opened.
Label command failed for Volume 02L6.
Sending 

Re: [Bacula-users] [Non-DoD Source] Re: Bacula kills tape drive and autoloader

2017-07-26 Thread Hicks, Daniel CTR OSD DMEA
Ana

 

Thanks for your help, your suggestions helped to get me started. I also needed 
to define within the source pool that is was a read pool for the job. 

 

Now I have two different issues, one where I can only write a small amount of 
data about 2GB of data and then the tape is marked full, the tapes are 3TB 
tapes. The other is when a larger migration job starts about 5 minutes in it 
will kill the tape drive taking it offline where the server no longer sees the 
SCSI devices for autoloader and tape drive. The only way to get it back is to 
reboot the autoloader/tape drive. 

 

Any ideas. 

 

Daniel Hicks | 916-999-2711 | DMEA 

 

From: Ana Emília M. Arruda [mailto:emiliaarr...@gmail.com] 
Sent: Monday, July 24, 2017 3:01 PM
To: Hicks, Daniel CTR OSD DMEA 
Cc: Bacula-users@lists.sourceforge.net
Subject: Re: [Non-DoD Source] Re: [Bacula-users] Bacula kills tape drive and 
autoloader

 

Hello Daniel,

 

You are welcome :-).

 

I see you are using /dev/sgX and /dev/nstX device names for the autochanger 
configuration. This is not recommended since they can be modified after server 
reboots.

 

Please use /dev/tape/by-id values or even udev rules. Also, I noticed you have 
a pool configured to use "Storage = HP-Overland". To avoid confusion, I would 
rename your tape library and tape drive resources:

 

 

bacula-sd.conf

 

Autochanger {

  Name = "

​HP-Overland-​

Autochanger"

  Device = HP-Overland

​-Drive-0​

  Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d"

  Changer Device = /dev/​tape/by-id/scsi-3500110a00093f5f0 

}

 

Device {

  Name = HP-Overland

​-Drive-0​

  Drive Index = 0

  Media Type = LTO-5

  Archive Device = /dev/​tape/by-id/scsi-3500110a00093f5f1-nst

  AutomaticMount = yes;

  AlwaysOpen = yes;

  RemovableMedia = yes;

  RandomAccess = no;

  AutoChanger = yes;

  Alert Command = "sh -c 'smartctl -H -l error /dev/sg3'"

}

 


​The Storage definition in bacula-dir.conf, should use

​ be something like:

 

Storage {

  Name = 

HP-Overlan

​d​

​-TL

  Device = HP-Overland-Autochanger

...

  Autochanger = yes

​}​

​

 

​Then your Tape pool should be configured to use the tape library and not the 
single drive:​

 

# Tape pool definition

Pool {

  Name = Tape

  Pool Type = Backup

  Recycle = yes

  AutoPrune = yes

  Volume Retention = 3 years

  Storage = HP-Overland​​-TL 

}

 

​Regarding what you mentioned about the migration job, I would recommend you to 
have the btape tests successfully run and a successful backup job writing to 
tape before dealing with a migration job.​

 

The "fill" btape test needs a blank tape. You should have it formated before 
using it with the fill btape test:

 

mt -f /dev/nst0 rewind

mt -f /dev/nst0 weof

 

If this does not solve this problem, please let us know the Bacula version you 
are using.

 

Best regards,

Ana



smime.p7s
Description: S/MIME cryptographic signature
--
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
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users