Maybe this is a silly discovery, but I did not find any writing about it anywhere, so I'm sending
you the solution. Maybe would be nice to have a mention on the pdf documentation.
Running Bacula on Solaris : you HAVE to use the "b" device on tapes!
Read the Solaris 10 mtio man page extract:
Read Operation
The read(2) function reads the next record on the tape. The
record size is passed back as the number of bytes read, pro-
vided it is not greater than the number requested. When a
tape mark or end of data is read, a zero byte count is
returned; all successive reads after the zero read will
return an error and errno will be set to EIO. To move to the
next file, an MTFSF ioctl can be issued before or after the
read causing the error. This error handling behavior is dif-
ferent from the older BSD behavior, where another read will
fetch the first record of the next tape file. If the BSD
behavior is required, device names containing the letter b
(for BSD behavior) in the final component should be used. If
persistent error handling was enabled with either the BSD or
SVR4 tape device behavior, all operations after this read
error will return EIO errors until the MTIOCLRERR ioctl is
issued. An MTFSF ioctl can then he issued.
you the solution. Maybe would be nice to have a mention on the pdf documentation.
Running Bacula on Solaris : you HAVE to use the "b" device on tapes!
Read the Solaris 10 mtio man page extract:
Read Operation
The read(2) function reads the next record on the tape. The
record size is passed back as the number of bytes read, pro-
vided it is not greater than the number requested. When a
tape mark or end of data is read, a zero byte count is
returned; all successive reads after the zero read will
return an error and errno will be set to EIO. To move to the
next file, an MTFSF ioctl can be issued before or after the
read causing the error. This error handling behavior is dif-
ferent from the older BSD behavior, where another read will
fetch the first record of the next tape file. If the BSD
behavior is required, device names containing the letter b
(for BSD behavior) in the final component should be used. If
persistent error handling was enabled with either the BSD or
SVR4 tape device behavior, all operations after this read
error will return EIO errors until the MTIOCLRERR ioctl is
issued. An MTFSF ioctl can then he issued.
Now, using /dev/rmt/0b will run the tests perfectly.
If you use /dev/rmt/0 :
- Test will not work
- Bacula will correctly write
- bconsole will correctly read, because it knows exactly the file number to reach, and ask the device to skip there before reading
- command line utilities won't work, beacuse they will fail discovery of content after reaching the end of file=1
Previous tapes that I have written using /dev/rmt/0 can be read through /dev/rmt/0b, but may mislead you.
Trying an "bls -j -v -V ..." on the old tape will show the first start of job, and then come out with a lot of:
11-Apr 13:03 bls: Got EOF at file 1 on device /dev/rmt/0b, Volume "THURSDAY2"
11-Apr 13:03 bls: Got EOF at file 2 on device /dev/rmt/0b, Volume "THURSDAY2"
....
....
You just have to wait. The rest of data has been written into later files.
Then you can create your bootstrap file and suggest bextract where to position.
Hope this helps,
Gabriele.
If you use /dev/rmt/0 :
- Test will not work
- Bacula will correctly write
- bconsole will correctly read, because it knows exactly the file number to reach, and ask the device to skip there before reading
- command line utilities won't work, beacuse they will fail discovery of content after reaching the end of file=1
Previous tapes that I have written using /dev/rmt/0 can be read through /dev/rmt/0b, but may mislead you.
Trying an "bls -j -v -V ..." on the old tape will show the first start of job, and then come out with a lot of:
11-Apr 13:03 bls: Got EOF at file 1 on device /dev/rmt/0b, Volume "THURSDAY2"
11-Apr 13:03 bls: Got EOF at file 2 on device /dev/rmt/0b, Volume "THURSDAY2"
....
....
You just have to wait. The rest of data has been written into later files.
Then you can create your bootstrap file and suggest bextract where to position.
Hope this helps,
Gabriele.
|
Gabriele Bulfon - Sonicle S.r.l. Tel +39 028246016 Int. 30 - Fax +39 028243880 Via Felice Cavallotti 16 - 20089, Rozzano - Milano - ITALY http://www.sonicle.com |