Bacula-users

Re: [Bacula-users] IBM DAT 160 (dds6) media status error after backup.

2016-09-23 06:58:51
Subject: Re: [Bacula-users] IBM DAT 160 (dds6) media status error after backup.
From: Marcin Haba <ganiuszka AT gmail DOT com>
To: Gi Dot <gadidot AT gmail DOT com>
Date: Fri, 23 Sep 2016 12:57:29 +0200
Hello Gi Dot,

Thanks for this output from btape test.

You are asking about my thoughts. Looking on advices in your btape
output, I would propose to add these three directives to device
config:

Hardware End of Medium = No
Fast Forward Space File = No
BSF at EOM = yes

You mentioned that you already changed directives self, and now this
error doesn't occur. That is fine, you are rich in new experiences.

I usually in this type of chooses when I don't know in full 100% how
something works, I use values recommended by software author.

I am sure that Bacula developers know well these directives that they
proposed you in btape test output.

You use mt, not mt-st. OK, you can change it, it should be useful too.

I would propose to do all these changes now, because some problems
with your current config can come after some time, for example when
you will need urgent restore from a tape.

I hope that I helped.

Please let know here how it works with new changes if you decide to use them.

Best regards.
Marcin

On 23 September 2016 at 11:54, Gi Dot <gadidot AT gmail DOT com> wrote:
> Oh ya btw I'm using the mt command.
>
> On Fri, Sep 23, 2016 at 5:51 PM, Gi Dot <gadidot AT gmail DOT com> wrote:
>>
>> Hi,
>>
>> Thanks for your reply. I have changed my bacula-sd.conf configuration
>> since a couple of weeks, and removed the mount.sh and umount.sh scripts. So
>> far I have not received the tape error anymore.
>>
>> I did run the btape test as suggested, and seems like I have more
>> modification to make. Let me know your thoughts.
>>
>>
>>
>>
>> # btape test output:
>> https://dpaste.de/0Qme/raw
>>
>>
>> # Current bacula-sd.conf:
>> Device {
>> Name = ibm-dds6
>> Media Type = DDS6
>> Device Type = tape
>> Archive Device = /dev/nst0
>> AutomaticMount = yes; # when device opened, read it
>> AlwaysOpen = no;
>> Hardware End of Medium = yes;
>> Two EOF = Yes
>> RemovableMedia = yes;
>> RandomAccess = no;
>> }
>>
>>
>>
>> # mt -f /dev/nst0 status
>> drive type = Generic SCSI-2 tape
>> drive status = 1207959552
>> sense key error = 0
>> residue count = 0
>> file number = 0
>> block number = 0
>> Tape block size 0 bytes. Density code 0x48 (DAT160).
>> Soft error count since last status=0
>> General status bits on (41010000):
>>  BOT ONLINE IM_REP_EN
>>
>> # tapeinfo -f /dev/nst0
>> Product Type: Tape Drive
>> Vendor ID: 'IBM     '
>> Product ID: 'DDS Gen6        '
>> Revision: 'WU04'
>> Attached Changer API: No
>> SerialNumber: 'HU14246VM2'
>> MinBlock: 1
>> MaxBlock: 16777215
>> SCSI ID: 0
>> SCSI LUN: 0
>> Ready: yes
>> BufferedMode: yes
>> Medium Type: Not Loaded
>> Density Code: 0x48
>> BlockSize: 0
>> DataCompEnabled: yes
>> DataCompCapable: yes
>> DataDeCompEnabled: yes
>> CompType: 0x20
>> DeCompType: 0x0
>> BOP: yes
>> Block Position: 0
>> Partition 0 Remaining Kbytes: 86814000
>> Partition 0 Size in Kbytes: 86814000
>> ActivePartition: 0
>> EarlyWarningSize: 0
>> NumPartitions: 0
>> MaxPartitions: 1
>>
>>
>>
>> Thanks.
>>
>> On Fri, Sep 23, 2016 at 11:39 AM, Marcin Haba <ganiuszka AT gmail DOT com> 
>> wrote:
>>>
>>> Hello Gi Dot,
>>>
>>> Could you try to run test command in btape tool and past here output
>>> from this test?
>>>
>>> The output text from the test command in btape can also advise adding
>>> some directives to your Bacula config (BSF at EOM = yes/no ...and
>>> others).
>>>
>>> I have also question if you use "mt" or "mt-st" program to manage
>>> magnetic tape drive? Your IBM DAT 160 works on SCSI bus (it is SAS)
>>> and that is OK, because Bacula supports SCSI tape drives, of course. I
>>> am asking about it because to tape drives on SCSI bus better is use
>>> mt-st (magnetic tape control tool for SCSI tape driver) instead of mt
>>> (standard magnetic tape control tool) to use proper ioctls for your
>>> SCSI tape driver.
>>>
>>> Thanks in advance for sending btape test output here.
>>>
>>> Best regards.
>>> Marcin Haba (gani)
>>>
>>> On 5 September 2016 at 11:19, Gi Dot <gadidot AT gmail DOT com> wrote:
>>> > Hi all,
>>> >
>>> > I am using IBM DAT 160 media with bacula, and I always get a tape error
>>> > after a successful backup job. There were a lot of times that the tapes
>>> > snapped as well. At first I thought the tapes are just defect, but the
>>> > error
>>> > occured so frequent that I started to doubt my bacula configuration.
>>> >
>>> > I used to get this error in the logs, but couldn't find similar error
>>> > in
>>> > recent logs:
>>> >
>>> > 05-May 15:54 hpsf-sd JobId 130: Volume "set1-w" previously written,
>>> > moving
>>> > to end of data.
>>> > 05-May 15:54 hpsf-sd JobId 130: Error: Unable to position to end of
>>> > data on
>>> > device "ibm-dds6" (/dev/nst0): ERR=dev.c:776 ioct
>>> > l MTEOM error on "ibm-dds6" (/dev/nst0). ERR=Input/output error.
>>> >
>>> > 05-May 15:54 hpsf-sd JobId 130: Marking Volume "set1-w" in Error in
>>> > Catalog.
>>> >
>>> >
>>> > Whenever this occured, I can only relabel the tape in order to reuse
>>> > it. I
>>> > hope anyone can have a look on the information of the tape settings and
>>> > bacula configuration provided below, and advise if there is anything
>>> > that is
>>> > not right.
>>> >
>>> > # tapeinfo -f /dev/nst0
>>> > Product Type: Tape Drive
>>> > Vendor ID: 'IBM     '
>>> > Product ID: 'DDS Gen6        '
>>> > Revision: 'WU04'
>>> > Attached Changer API: No
>>> > SerialNumber: 'HU14086PJM'
>>> > MinBlock: 1
>>> > MaxBlock: 16777215
>>> > SCSI ID: 0
>>> > SCSI LUN: 0
>>> > Ready: yes
>>> > BufferedMode: yes
>>> > Medium Type: Not Loaded
>>> > Density Code: 0x48
>>> > BlockSize: 0
>>> > DataCompEnabled: yes
>>> > DataCompCapable: yes
>>> > DataDeCompEnabled: yes
>>> > CompType: 0x20
>>> > DeCompType: 0x0
>>> > BOP: yes
>>> > Block Position: 0
>>> > Partition 0 Remaining Kbytes: 86814000
>>> > Partition 0 Size in Kbytes: 86814000
>>> > ActivePartition: 0
>>> > EarlyWarningSize: 0
>>> > NumPartitions: 0
>>> > MaxPartitions: 1
>>> >
>>> >
>>> > # mt -f /dev/nst0 status
>>> > drive type = Generic SCSI-2 tape
>>> > drive status = 1207959552
>>> > sense key error = 0
>>> > residue count = 0
>>> > file number = 0
>>> > block number = 0
>>> > Tape block size 0 bytes. Density code 0x48 (DAT160).
>>> > Soft error count since last status=0
>>> > General status bits on (41010000):
>>> >  BOT ONLINE IM_REP_E
>>> >
>>> >
>>> > # bacula-sd.conf:
>>> > Device {
>>> >   Name = ibm-dds6
>>> >   Media Type = DDS6
>>> >   Device Type = tape
>>> >   Archive Device = /dev/nst0
>>> >   AlwaysOpen = yes;
>>> >   Hardware End of Medium = no;
>>> > # Two EOF = Yes
>>> >   RemovableMedia = yes;
>>> >   RandomAccess = no;
>>> > }
>>> >
>>> >
>>> > Before running the first job, mount script will be executed (run before
>>> > job). After running the last job, umount script will be executed (run
>>> > after
>>> > job).
>>> >
>>> > # cat mount.sh
>>> > #!/bin/sh
>>> >
>>> > /usr/sbin/bconsole -c /etc/bacula/bconsole.conf <<EOF
>>> > mount storage=TapeDrive
>>> > EOF
>>> >
>>> >
>>> > # cat umount.sh
>>> > #!/bin/sh
>>> >
>>> > /bin/sleep 60
>>> >
>>> > /usr/sbin/bconsole -c /etc/bacula/bconsole.conf <<EOF
>>> > umount storage=TapeDrive
>>> > EOF
>>> >
>>> > More from bacula.log:
>>> > https://dpaste.de/uAYF/raw
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > ------------------------------------------------------------------------------
>>> >
>>> > _______________________________________________
>>> > Bacula-users mailing list
>>> > Bacula-users AT lists.sourceforge DOT net
>>> > https://lists.sourceforge.net/lists/listinfo/bacula-users
>>> >
>>>
>>>
>>>
>>> --
>>> "Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
>>> za przyjaciół swoich." Jezus Chrystus
>>
>>
>



-- 
"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 AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users