Re: [Bacula-users] Odp: Another problem with TS3310

2007-05-09 Thread Kern Sibbald
On Wednesday 09 May 2007 11:12, Mariusz Czulada wrote:
> Hi,
> 
> Primo: I checked out the SVN repository with no problem.
> Will try to use it as a reference in the future.
> 
> Secundo: Forgot to tell about configuration. This is an IBM
> xSeries host with CentOS 4.3. DDS-5 internal drive (working
> perfectly), and IBM TS3310 tape library, with two LTO-3
> drives connected directly (i mean without FC switch) to
> two QLogic QLA2460 HBA. IBM tape drivers taken from
> IBM site. Catalog is created in PostgreSQL 8.1.5.
> Bacula 2.0.2. Both pg and bacula compiled from
> sources.

Be very careful with the Fibre Channel.  They have a tendency to cache writing 
to the tape drive, which *must* be turned off for Bacula to work correctly.

Don't be content with just running the "test" command -- you should also run 
the "fill" command, to verify that your FC is not caching the end of tape 
status and creating bad volumes when they fill !

> 
> Ad rem:
> I didn't give up with 2.0.2 yesterday. After btape failed
> in second test. The error I got was:
> 
> 
> 
> btape: dev.c:2405 dev_get_os_pos
> 
> 
> 
> I took at the code. Near line 2405 (ver. 2.0.2) found:
> 
> 
> 
>   stat = tape_ioctl(fd, MTIOCTOP, (char *)&mt_com);
>   if (stat < 0 || !dev_get_os_pos(this, &mt_stat)) {
>  berrno be;

Yes, I saw that and believe that I have fixed it in 2.1.8.

> 
> 
> 
> So, I made a "bad" change:
> 
> 
> 
>   stat = tape_ioctl(fd, MTIOCTOP, (char *)&mt_com);
> ! dev_get_os_pos(this, &mt_stat);
> ! if (stat < 0) {
>  berrno be;
> 
> 
> 
> Awful, but it works. Precisely, it still failed this test,
> but btape continued with other ones. And the rest of tests
> gave me hints how to correct my "Device" entries in
> SD config. I got:
> 
> 
> 
>   Hardware End of Medium = No
>   Fast Forward Space File = No
>   BSF at EOM = yes

When you are sure that this works, please send me your complete Device 
resource reminding me of exactly what system and tape drive you have, and I 
will add it to the default bacula-sd.conf file so that others may benefit 
from your testing.

By the way, if the above directives apply to your DDS-3 tape, OK, but they do 
not at all seem appropriate for an LTO-3 tape, which is a modern drive.  
Something seems way less than optimal here.  You might check FC caching (it 
is on by default for HP manufactured FCs) and check how IBM sets up the 
default drive parameters -- see the manual.

> 
> 
> 
> Now, original btape works correctly. So, my little suggestion
> about modifying btape util is to allow (query about) to
> continue the tests even if one of the tests fails. Hints
> are useful and help to correctly configure the drive...
> unless you see them :-)
> 
> 
> --
> 
> Summa:
> 
> The bad news is I still cannot use my TS3310. The problem
> occurs when tape is reinserted into drive. Bacula cannot
> add another job to the tape. The volume is marked with
> "error" and the new one (from "Scratch" in my case)
> is used. Everything works fine, jobs are stored correctly,
> until newly used tape is removed from drive by changer.

If Bacula cannot add another file after writing the tape (after 
removing/reinserting the tape, or stopping and restarting the SD) then 99% 
likely it is a problem with tape drive vs Bacula not agreeing on how many EOF 
marks to put at the end of a file.

> 
> Will tell more/ask later, plan to do more tests to get
> more information which, I hope, could help you to help me :-)

Regards, 

Kern

> 
> 
> Regards
> 
> Mariusz
> 
> 
> Dnia 8-05-2007 o godz. 21:34 Kern Sibbald napisał(a):
> > Hello,
> > 
> > One of your ioctl() calls seems to be broken or always returning
> > a bad status.
> > 
> > Try using the btape in the trunk of the SVN.  It has a number
> > of little fixes that could clarify your problem.  If you don't
> > know how to use the SVN, the list can probably help you or
> > wait until 2.1.8 is released in BETA later this week.
> > 
> > 
> > >Date: Tue, 08 May 2007 09:30:56 +0200
> > >From: "Mariusz Czulada" <[EMAIL PROTECTED]>
> > >Subject: [Bacula-users] Odp:  Another problem with TS3310
> > >To: "bacula-users" 
> > >Message-ID: <[EMAIL PROTECTED]>
> > >Content-Type: text/plain; charset=iso-8859-2
> > 
> >

[Bacula-users] Odp: Another problem with TS3310

2007-05-09 Thread Mariusz Czulada
Hi,

Primo: I checked out the SVN repository with no problem.
Will try to use it as a reference in the future.

Secundo: Forgot to tell about configuration. This is an IBM
xSeries host with CentOS 4.3. DDS-5 internal drive (working
perfectly), and IBM TS3310 tape library, with two LTO-3
drives connected directly (i mean without FC switch) to
two QLogic QLA2460 HBA. IBM tape drivers taken from
IBM site. Catalog is created in PostgreSQL 8.1.5.
Bacula 2.0.2. Both pg and bacula compiled from
sources.

Ad rem:
I didn't give up with 2.0.2 yesterday. After btape failed
in second test. The error I got was:



btape: dev.c:2405 dev_get_os_pos



I took at the code. Near line 2405 (ver. 2.0.2) found:



  stat = tape_ioctl(fd, MTIOCTOP, (char *)&mt_com);
  if (stat < 0 || !dev_get_os_pos(this, &mt_stat)) {
 berrno be;



So, I made a "bad" change:



  stat = tape_ioctl(fd, MTIOCTOP, (char *)&mt_com);
! dev_get_os_pos(this, &mt_stat);
! if (stat < 0) {
 berrno be;



Awful, but it works. Precisely, it still failed this test,
but btape continued with other ones. And the rest of tests
gave me hints how to correct my "Device" entries in
SD config. I got:



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



Now, original btape works correctly. So, my little suggestion
about modifying btape util is to allow (query about) to
continue the tests even if one of the tests fails. Hints
are useful and help to correctly configure the drive...
unless you see them :-)


--

Summa:

The bad news is I still cannot use my TS3310. The problem
occurs when tape is reinserted into drive. Bacula cannot
add another job to the tape. The volume is marked with
"error" and the new one (from "Scratch" in my case)
is used. Everything works fine, jobs are stored correctly,
until newly used tape is removed from drive by changer.

Will tell more/ask later, plan to do more tests to get
more information which, I hope, could help you to help me :-)


Regards

Mariusz


Dnia 8-05-2007 o godz. 21:34 Kern Sibbald napisał(a):
> Hello,
> 
> One of your ioctl() calls seems to be broken or always returning
> a bad status.
> 
> Try using the btape in the trunk of the SVN.  It has a number
> of little fixes that could clarify your problem.  If you don't
> know how to use the SVN, the list can probably help you or
> wait until 2.1.8 is released in BETA later this week.
> 
> 
> >Date: Tue, 08 May 2007 09:30:56 +0200
> >From: "Mariusz Czulada" <[EMAIL PROTECTED]>
> >Subject: [Bacula-users] Odp:  Another problem with TS3310
> >To: "bacula-users" 
> >Message-ID: <[EMAIL PROTECTED]>
> >Content-Type: text/plain; charset=iso-8859-2
> 
> >Hi again,
> 
> >I tried one more thing with btape, and this is the result:
> 
> >==
> 
> >*rewind
> >btape: btape.c:469 Rewound "Dev:TS3310-drv0" (/dev/IBMtape1n)
> >*status
> > Bacula status: file=0 block=0
> > Device status: BOT ONLINE file=-1 block=0
> >btape: btape.c:1799 Device status: 133. ERR=dev.c:1298 ioctl MTFSF error
> >on "Dev:TS3310-drv0" (/dev/IBMtape1n). ERR=Success.
> 
> >*fsf
> >btape: dev.c:2405 dev_get_os_pos
> >btape: btape.c:1497 Bad status from fsf. ERR=dev.c:1298 ioctl MTFSF
> >error on "Dev:TS3310-drv0" (/dev/IBMtape1n). ERR=Success.
> 
> >*status
> > EOD Bacula status: file=0 block=0
> > Device status: ONLINE file=-1 block=1001
> >btape: btape.c:1799 Device status: 161. ERR=dev.c:1298 ioctl MTFSF error
> >on "Dev:TS3310-drv0" (/dev/IBMtape1n). ERR=Success.
> 
> >==
> 
> >Can this be more helpful? This is a critical issue for me, because the
> >main hardware component of this backup subsystem is currently useless.
> 
> >Dnia 7-05-2007 o godz. 14:46 Mariusz Czulada napisa?(a):
> >> Hi all,
> >> 
> >> I have another, more serious problem with my IBM library. Here is an
> >> output from btape:
> >> 
> >> -
> >> 
> >> [EMAIL PROTECTED] sbin]# ../sbin/btape -c bacula-sd.conf -d 99
> >> /dev/IBMtape1n
> >> Tape block granularity is 1024 bytes.
> >> 
> >> [...]
> >> 
> >> btape: btape.c:368 open device "Dev:TS3310-drv0" (/dev/IBMtape1n): OK
> >> *test
> >> === Write, rewind, and re-read test ==

[Bacula-users] Odp: Another problem with TS3310

2007-05-08 Thread Kern Sibbald
Hello,

One of your ioctl() calls seems to be broken or always returning a bad status.

Try using the btape in the trunk of the SVN.  It has a number of little fixes 
that could clarify your problem.  If you don't know how to use the SVN, the 
list can probably help you or wait until 2.1.8 is released in BETA later this 
week.


>Date: Tue, 08 May 2007 09:30:56 +0200
>From: "Mariusz Czulada" <[EMAIL PROTECTED]>
>Subject: [Bacula-users] Odp:  Another problem with TS3310
>To: "bacula-users" 
>Message-ID: <[EMAIL PROTECTED]>
>Content-Type: text/plain; charset=iso-8859-2

>Hi again,

>I tried one more thing with btape, and this is the result:

>==

>*rewind
>btape: btape.c:469 Rewound "Dev:TS3310-drv0" (/dev/IBMtape1n)
>*status
> Bacula status: file=0 block=0
> Device status: BOT ONLINE file=-1 block=0
>btape: btape.c:1799 Device status: 133. ERR=dev.c:1298 ioctl MTFSF error 
>on "Dev:TS3310-drv0" (/dev/IBMtape1n). ERR=Success.

>*fsf
>btape: dev.c:2405 dev_get_os_pos
>btape: btape.c:1497 Bad status from fsf. ERR=dev.c:1298 ioctl MTFSF 
>error on "Dev:TS3310-drv0" (/dev/IBMtape1n). ERR=Success.

>*status
> EOD Bacula status: file=0 block=0
> Device status: ONLINE file=-1 block=1001
>btape: btape.c:1799 Device status: 161. ERR=dev.c:1298 ioctl MTFSF error 
>on "Dev:TS3310-drv0" (/dev/IBMtape1n). ERR=Success.

>==

>Can this be more helpful? This is a critical issue for me, because the 
>main hardware component of this backup subsystem is currently useless.

>Dnia 7-05-2007 o godz. 14:46 Mariusz Czulada napisa?(a):
>> Hi all,
>> 
>> I have another, more serious problem with my IBM library. Here is an
>> output from btape:
>> 
>> -
>> 
>> [EMAIL PROTECTED] sbin]# ../sbin/btape -c bacula-sd.conf -d 99
>> /dev/IBMtape1n
>> Tape block granularity is 1024 bytes.
>> 
>> [...]
>> 
>> btape: btape.c:368 open device "Dev:TS3310-drv0" (/dev/IBMtape1n): OK
>> *test
>> === Write, rewind, and re-read test ===
>> 
>> [...]
>> 
>> === Test Succeeded. End Write, rewind, and re-read test ===
>> === Write, rewind, and position test ===
>> 
>> [...]
>> > btape: btape.c:962 Rewind OK.
>> Reposition to file:block 0:4
>> btape: dev.c:1477 fsr 4
>> Block 5 re-read correctly.
>> Reposition to file:block 0:200
>> btape: dev.c:1477 fsr 195
>> Block 201 re-read correctly.
>> Reposition to file:block 0:999
>> btape: dev.c:1477 fsr 798
>> Block 1000 re-read correctly.
>> Reposition to file:block 1:0
>> btape: dev.c:2405 dev_get_os_pos
>> btape: btape.c:1004 Reposition error.
>> 
>> -
>> [...]
>> -
>> 
>> [EMAIL PROTECTED] sbin]# mt -f /dev/IBMtape1n tell
>> At block 1001.
>> 
>> -
>> 

>Reagards,

>Mariusz

>
>Zobacz, jak? walk? stoczy superbohater, by ocali? siebie
>i swych bliskich. A najwi?ksza bitwa rozegra si? w jego duszy.
>SPIDER-MAN 3 w kinach od 4 maja.
>http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%2Fspiderman3.html&sid=1122

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Odp: Another problem with TS3310

2007-05-08 Thread Mariusz Czulada
Hi again,

I tried one more thing with btape, and this is the result:

==

*rewind
btape: btape.c:469 Rewound "Dev:TS3310-drv0" (/dev/IBMtape1n)
*status
 Bacula status: file=0 block=0
 Device status: BOT ONLINE file=-1 block=0
btape: btape.c:1799 Device status: 133. ERR=dev.c:1298 ioctl MTFSF error 
on "Dev:TS3310-drv0" (/dev/IBMtape1n). ERR=Success.

*fsf
btape: dev.c:2405 dev_get_os_pos
btape: btape.c:1497 Bad status from fsf. ERR=dev.c:1298 ioctl MTFSF 
error on "Dev:TS3310-drv0" (/dev/IBMtape1n). ERR=Success.

*status
 EOD Bacula status: file=0 block=0
 Device status: ONLINE file=-1 block=1001
btape: btape.c:1799 Device status: 161. ERR=dev.c:1298 ioctl MTFSF error 
on "Dev:TS3310-drv0" (/dev/IBMtape1n). ERR=Success.

==

Can this be more helpful? This is a critical issue for me, because the 
main hardware component of this backup subsystem is currently useless.

Dnia 7-05-2007 o godz. 14:46 Mariusz Czulada napisał(a):
> Hi all,
> 
> I have another, more serious problem with my IBM library. Here is an
> output from btape:
> 
> -
> 
> [EMAIL PROTECTED] sbin]# ../sbin/btape -c bacula-sd.conf -d 99
> /dev/IBMtape1n
> Tape block granularity is 1024 bytes.
> 
> [...]
> 
> btape: btape.c:368 open device "Dev:TS3310-drv0" (/dev/IBMtape1n): OK
> *test
> === Write, rewind, and re-read test ===
> 
> [...]
> 
> === Test Succeeded. End Write, rewind, and re-read test ===
> === Write, rewind, and position test ===
> 
> [...]
> > btape: btape.c:962 Rewind OK.
> Reposition to file:block 0:4
> btape: dev.c:1477 fsr 4
> Block 5 re-read correctly.
> Reposition to file:block 0:200
> btape: dev.c:1477 fsr 195
> Block 201 re-read correctly.
> Reposition to file:block 0:999
> btape: dev.c:1477 fsr 798
> Block 1000 re-read correctly.
> Reposition to file:block 1:0
> btape: dev.c:2405 dev_get_os_pos
> btape: btape.c:1004 Reposition error.
> 
> -
> [...]
> -
> 
> [EMAIL PROTECTED] sbin]# mt -f /dev/IBMtape1n tell
> At block 1001.
> 
> -
> 

Reagards,

Mariusz


Zobacz, jaką walkę stoczy superbohater, by ocalić siebie
i swych bliskich. A największa bitwa rozegra się w jego duszy.
SPIDER-MAN 3 w kinach od 4 maja.
http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%2Fspiderman3.html&sid=1122



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Odp: Another problem with TS3310

2007-05-07 Thread Mariusz Czulada
Forgot to add, that production effect of this problem is harmful - 
backups are stored correctly, unless tape does not leave the drive. When 
tape is reinserted, bacula cannot rewind it and marks the tape as 
"error".

Dnia 7-05-2007 o godz. 14:46 Mariusz Czulada napisał(a):
> Hi all,
> 
> I have another, more serious problem with my IBM library. Here is an
> output from btape:
> 
> -
> 
> [EMAIL PROTECTED] sbin]# ../sbin/btape -c bacula-sd.conf -d 99
> /dev/IBMtape1n
> Tape block granularity is 1024 bytes.
> btape: stored_conf.c:674 Inserting device res: Dev:LocalTapeDrive
> btape: stored_conf.c:674 Inserting device res: Dev:TS3310-drv0
> btape: stored_conf.c:674 Inserting device res: Dev:TS3310-drv1
> btape: butil.c:286 Using device: "/dev/IBMtape1n" for writing.
> btape: dev.c:254 init_dev: tape=1 dev_name=/dev/IBMtape1n
> btape: dev.c:295 open dev: type=2 dev_name="Dev:TS3310-drv0"
> (/dev/IBMtape1n) vol= mode=OPEN_READ_ONLY
> btape: dev.c:345 Open dev: device is tape
> 07-May 14:25 btape: 3301 Issuing autochanger "loaded? drive 0" command.
> 07-May 14:26 btape: 3302 Autochanger "loaded? drive 0", result is Slot 22.
> btape: dev.c:382 Rewind after open
> btape: dev.c:2310 In set_os_device_parameters
> btape: dev.c:2316 Set block size to zero
> btape: dev.c:433 open dev: tape 3 opened
> btape: dev.c:295 open dev: type=2 dev_name="Dev:TS3310-drv0"
> (/dev/IBMtape1n) vol= mode=OPEN_READ_WRITE
> btape: dev.c:345 Open dev: device is tape
> 07-May 14:26 btape: 3301 Issuing autochanger "loaded? drive 0" command.
> 07-May 14:26 btape: 3302 Autochanger "loaded? drive 0", result is Slot 22.
> btape: dev.c:382 Rewind after open
> btape: dev.c:2310 In set_os_device_parameters
> btape: dev.c:2316 Set block size to zero
> btape: dev.c:433 open dev: tape 3 opened
> btape: btape.c:368 open device "Dev:TS3310-drv0" (/dev/IBMtape1n): OK
> *test
> === Write, rewind, and re-read test ===
> I'm going to write 1000 records and an EOF
> then write 1000 records and an EOF, then rewind,
> and re-read the data to verify that it is correct.
> This is an *essential* feature ...
> btape: btape.c:825 Wrote 1000 blocks of 64412 bytes.
> btape: btape.c:499 Wrote 1 EOF to "Dev:TS3310-drv0" (/dev/IBMtape1n)
> btape: btape.c:841 Wrote 1000 blocks of 64412 bytes.
> btape: btape.c:499 Wrote 1 EOF to "Dev:TS3310-drv0" (/dev/IBMtape1n)
> btape: btape.c:850 Rewind OK.
> 1000 blocks re-read correctly.
> Got EOF on tape.
> 1000 blocks re-read correctly.
> === Test Succeeded. End Write, rewind, and re-read test ===
> === Write, rewind, and position test ===
> I'm going to write 1000 records and an EOF
> then write 1000 records and an EOF, then rewind,
> and position to a few blocks and verify that it is correct.
> This is an *essential* feature ...
> btape: btape.c:937 Wrote 1000 blocks of 64412 bytes.
> btape: btape.c:499 Wrote 1 EOF to "Dev:TS3310-drv0" (/dev/IBMtape1n)
> btape: btape.c:953 Wrote 1000 blocks of 64412 bytes.
> btape: btape.c:499 Wrote 1 EOF to "Dev:TS3310-drv0" (/dev/IBMtape1n)
> btape: btape.c:962 Rewind OK.
> Reposition to file:block 0:4
> btape: dev.c:1477 fsr 4
> Block 5 re-read correctly.
> Reposition to file:block 0:200
> btape: dev.c:1477 fsr 195
> Block 201 re-read correctly.
> Reposition to file:block 0:999
> btape: dev.c:1477 fsr 798
> Block 1000 re-read correctly.
> Reposition to file:block 1:0
> btape: dev.c:2405 dev_get_os_pos
> btape: btape.c:1004 Reposition error.
> *Pool   Maxsize  Maxused  Inuse
> NoPool  2567  0
> NAME1300  0
> FNAME   2569  0
> MSG   645124  0
> EMSG   10242  0
> 
> -
> 
> It looks like there is a positioning problem. But, after quitting btape
> I tried:
> 
> -
> 
> [EMAIL PROTECTED] sbin]# mt -f /dev/IBMtape1n tell
> At block 1001.
> 
> -
> 
> And got confused. IHMO blok 1:0 from btape *should* be blok 1001 of
> tape, shouldn't it? So what is the reason for this? Is the information
> returned form system different then expected? Is it because different
> handling of IBM device drivers?
> 
> Any help greately appreciated.
> 
> Mariusz
> 
> 
> Po raz pierwszy w Polsce - Redman - jeden z największych
> raperów świata - 13 maja katowicki Mega Club od 19.00
> - więcej na Www.megaclub.pl
> http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%2Fred.html&sid=1130
> 
> 
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforg