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

2016-09-23 Thread Marcin Haba
Hello Gi Dot,

That is fantastic. You found source of the problem and you fixed the
source. From this time the workarround with shell scripts is not
needed anymore.

By the way you fixed your tape drive problem with EOF position and you
adjusted your tape drive to work with Bacula.

Only good things :-)

Best regards.
Marcin

On 23 September 2016 at 20:48, Gi Dot  wrote:
> Hi,
>
> I don't use the mount and umount scripts anymore by setting the following
> parameters:
>
> AlwaysOpen = no
> AutomaticMount = yes
>
> Previously I had AlwaysOpen set to yes and therefore I had to manually
> unmount it so that the tape is ready to be ejected by the user.
> AutomaticMount was not set as well and that's why I needed the mount script.
>
> Thanks.
>
>
> On 23 Sep 2016 19:54, "Marcin Haba"  wrote:
>>
>> Hello Gi Dot,
>>
>> OK, fine.
>>
>> Please note that mount and umount scripts that you mentioned are
>> defined on Director side, not on Storage Daemon side. You also
>> mentioned that you removed mount.sh and umount.sh after some tests.
>>
>> To btape you use bacula-sd.conf as a param in which you don't use
>> mount.sh and umount.sh.
>>
>> I think that these scritps can be not required and maybe Bacula can do
>> this mount/umount actions besides you.
>>
>> You can read official Bacula documentation where all this type
>> directives are described (Device section):
>>
>>
>> http://www.bacula.org/7.4.x-manuals/en/main/Storage_Daemon_Configuratio.html#SECTION00193
>>
>> Could you also tell my what is reason that you use mount.sh and umount.sh
>> ?
>>
>> Best regards.
>> Marcin Haba (gani)
>>
>>
>>
>> On 23 September 2016 at 13:39, Gi Dot  wrote:
>> > Yes, I'm planning to add the suggested parameters as well. Will also try
>> > out
>> > the mt-st command.
>> >
>> > I am pretty sure that the error occurred due to the mount and unmount
>> > scripts that I included in each run of the backup job, it would be
>> > interesting to see if the error still appear with the new config.
>> > Actually I
>> > don't even need to use the scripts anymore, but maybe I'll just make a
>> > test
>> > for the fun of it.
>> >
>> > Will let you know on how it goes. Thanks a lot for your help and advice.
>> >
>> >
>> > On 23 Sep 2016 18:57, "Marcin Haba"  wrote:
>> >>
>> >> 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  wrote:
>> >> > Oh ya btw I'm using the mt command.
>> >> >
>> >> > On Fri, Sep 23, 2016 at 5:51 PM, Gi Dot  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 

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

2016-09-23 Thread Gi Dot
Hi,

I don't use the mount and umount scripts anymore by setting the following
parameters:

AlwaysOpen = no
AutomaticMount = yes

Previously I had AlwaysOpen set to yes and therefore I had to manually
unmount it so that the tape is ready to be ejected by the user.
AutomaticMount was not set as well and that's why I needed the mount
script.

Thanks.

On 23 Sep 2016 19:54, "Marcin Haba"  wrote:

> Hello Gi Dot,
>
> OK, fine.
>
> Please note that mount and umount scripts that you mentioned are
> defined on Director side, not on Storage Daemon side. You also
> mentioned that you removed mount.sh and umount.sh after some tests.
>
> To btape you use bacula-sd.conf as a param in which you don't use
> mount.sh and umount.sh.
>
> I think that these scritps can be not required and maybe Bacula can do
> this mount/umount actions besides you.
>
> You can read official Bacula documentation where all this type
> directives are described (Device section):
>
> http://www.bacula.org/7.4.x-manuals/en/main/Storage_
> Daemon_Configuratio.html#SECTION00193
>
> Could you also tell my what is reason that you use mount.sh and umount.sh ?
>
> Best regards.
> Marcin Haba (gani)
>
>
>
> On 23 September 2016 at 13:39, Gi Dot  wrote:
> > Yes, I'm planning to add the suggested parameters as well. Will also try
> out
> > the mt-st command.
> >
> > I am pretty sure that the error occurred due to the mount and unmount
> > scripts that I included in each run of the backup job, it would be
> > interesting to see if the error still appear with the new config.
> Actually I
> > don't even need to use the scripts anymore, but maybe I'll just make a
> test
> > for the fun of it.
> >
> > Will let you know on how it goes. Thanks a lot for your help and advice.
> >
> >
> > On 23 Sep 2016 18:57, "Marcin Haba"  wrote:
> >>
> >> 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  wrote:
> >> > Oh ya btw I'm using the mt command.
> >> >
> >> > On Fri, Sep 23, 2016 at 5:51 PM, Gi Dot  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 (4101):
> >> >>  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
> >> >> 

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

2016-09-23 Thread Marcin Haba
Hello Gi Dot,

OK, fine.

Please note that mount and umount scripts that you mentioned are
defined on Director side, not on Storage Daemon side. You also
mentioned that you removed mount.sh and umount.sh after some tests.

To btape you use bacula-sd.conf as a param in which you don't use
mount.sh and umount.sh.

I think that these scritps can be not required and maybe Bacula can do
this mount/umount actions besides you.

You can read official Bacula documentation where all this type
directives are described (Device section):

http://www.bacula.org/7.4.x-manuals/en/main/Storage_Daemon_Configuratio.html#SECTION00193

Could you also tell my what is reason that you use mount.sh and umount.sh ?

Best regards.
Marcin Haba (gani)



On 23 September 2016 at 13:39, Gi Dot  wrote:
> Yes, I'm planning to add the suggested parameters as well. Will also try out
> the mt-st command.
>
> I am pretty sure that the error occurred due to the mount and unmount
> scripts that I included in each run of the backup job, it would be
> interesting to see if the error still appear with the new config. Actually I
> don't even need to use the scripts anymore, but maybe I'll just make a test
> for the fun of it.
>
> Will let you know on how it goes. Thanks a lot for your help and advice.
>
>
> On 23 Sep 2016 18:57, "Marcin Haba"  wrote:
>>
>> 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  wrote:
>> > Oh ya btw I'm using the mt command.
>> >
>> > On Fri, Sep 23, 2016 at 5:51 PM, Gi Dot  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 (4101):
>> >>  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 
>> >> 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

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

2016-09-23 Thread Gi Dot
Yes, I'm planning to add the suggested parameters as well. Will also try
out the mt-st command.

I am pretty sure that the error occurred due to the mount and unmount
scripts that I included in each run of the backup job, it would be
interesting to see if the error still appear with the new config. Actually
I don't even need to use the scripts anymore, but maybe I'll just make a
test for the fun of it.

Will let you know on how it goes. Thanks a lot for your help and advice.

On 23 Sep 2016 18:57, "Marcin Haba"  wrote:

> 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  wrote:
> > Oh ya btw I'm using the mt command.
> >
> > On Fri, Sep 23, 2016 at 5:51 PM, Gi Dot  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 (4101):
> >>  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 
> 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  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 

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

2016-09-23 Thread Marcin Haba
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  wrote:
> Oh ya btw I'm using the mt command.
>
> On Fri, Sep 23, 2016 at 5:51 PM, Gi Dot  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 (4101):
>>  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  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  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 

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

2016-09-23 Thread Gi Dot
Oh ya btw I'm using the mt command.

On Fri, Sep 23, 2016 at 5:51 PM, Gi Dot  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 (4101):
>  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  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  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 (4101):
>> >  BOT ONLINE IM_REP_E
>> >
>> >
>> > # bacula-sd.conf:

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

2016-09-23 Thread Gi Dot
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 (4101):
 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  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  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 (4101):
> >  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
> > 

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

2016-09-22 Thread Marcin Haba
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  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 (4101):
>  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 < mount storage=TapeDrive
> EOF
>
>
> # cat umount.sh
> #!/bin/sh
>
> /bin/sleep 60
>
> /usr/sbin/bconsole -c /etc/bacula/bconsole.conf < umount storage=TapeDrive
> EOF
>
> More from bacula.log:
> https://dpaste.de/uAYF/raw
>
>
>
>
>
> --
>
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.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

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