Get files from sdlt tapes

Hi everybody,

I'm new using unix/linux and I have a sdlt tape wich has 2 segy files. I realise the tape isn't tar so when I use dd if=/dev/rmt/bn of=filename bs=100000 to get the files after 10 Gb for file 1 an error message appear I/O error and I'm sure that I didn't get completly the first file also I'm using mt ../ rew and mt ../*n fsf no rewind to navigate through the tape. Is there any command to get the files without error message? I need your help, please.

Ps: I have a list of tape content with ebcdic header, binary header,.. like this:

FileNum: 0 RecordNum:1 Long:3200
C01
C02
C03
.
.
.
.
Lecture ok FileNum:0 RecordNum:2 Long:400
.
.
.
FileNum:0 RecordNum:3 Long:8240
.
.
.
EOF recontre FileNum 0 RecordNum 3
saut arriere de 2 blocs
Lecture ok FileNum:0 RecordNum:999999999 Long:8240
FileNum: 0 RecordNum:999999999 Long:8240
.
.
.
FileNum: 0 RecordNum:1000000000
.
.
.
EOF recontre FileNum: 0 RecordNum:1000000000

then start the same sequence for second segy file

I'll appreciate some tips

The only other way I know of to get files to tape is to (1) use tar (2) use cpio (3) write blocks using dd. Utilities like dump build some kind of internal archive and write in blocks like dd does. So it maybe that one of these tools was used to write to the tape.

By the way, that's a strange blocksize. (bs=100000) that you have. Do you know it's correct? It could be the I/O error occurs because the blocksize is incorrect. Usually blocksizes are in multiples of megabytes or gigabytes. (SDLT drives can have up to 1 gb block sizes). There may also be variable block sizes, bu t I'm not sure how to deal with that, other than each file takes up one block (up to 1GB).

How do you know tar doesn't work? Did you try setting different blocksizes with tar?

Thanks for your help.

Yes I've used different blocksizes with tar, like testing with tar tvf .... and to extract tar xvf.....256 (in case SDLT) and the error message is:

tar: tape block size error

Ps: I've tested many tar option it doesn't work

Did you try blocksize of 0? This (I think) tells it to use variable blocksizing, which might be what your data is stored in.

Hi again,

this is what I've found using tcopy command to scan the tape:

mt -t /dev/rmt/6 rew
tcopy /dev/rmt/6n

file 1: record 1: size 3200
file 1: record 2: size 400
file 1: record 3 to 53964: size 8240
file 1: eof after 53964 records: 444650480 bytes
eot
total length: 444650480 bytes

tcopy ...../6n once more

file 1: record 1: size 3200
file 1: record 2: size 400
file 1: record 3 to 500424: size 8240
file1: eof after 500424 records: 4123480880 bytes
eot
total length: 4123480880 bytes

tcopy..../6n once more
file1 : eof after 0 records: 0 bytes
eot
total length: 0 bytes

Thanks in advance for your help

Well, look, it's clear you have variable block sizes, or a very small block size. Use the data from tcopy to use dd to save the contents of the records onto disk, like this:

dd if=/dev/rmt/6n ibs=3200 count=1 of=/tmp/record1
dd if=/dev/rmt/6n ibs=400 count=1 of=/tmp/record2
dd if=/dev/rmt/6n ibs=8240 count=53961 of=/tmp/record4

Then run "file record*" to see file can determine what type of file each record is in. You might try:

cat record* >record-tmp
file record-tmp

to see if maybe the whole file together is a different thing.

At least now you have a template for getting all the records off the tape. Whether you can do anything with them or not is a different problem.