SCO tape backups won't restore in Ubuntu Linux environment

Hello folks. I have the following problem:

I'm trying to create a tape backup of a list of files on a 10 year old server, running SCO Openserver 5.0.5 (the tape drive is a Seagate STD224000N, connected as a SCSI drive).

I then want to restore the contents of this tape onto a new server running Ubuntu Server 11.04 (the tape drive is a Quantum (Seagate) CD72LWH-SST, connected as SCSI).

The tape I'm using is a DDS3 tape (brand new) as it is the only tape which will work in both drives.

So I'm using tar to send some stuff to the tape on the old server, using this command to do so:

tar cvf /dev/rStp0 /pecas/scripts/*

It seems happy to do this, and if I list what I just did on the tape using 'tar tvf /dev/rStp0', it shows me a list of the files.

So now I insert the tape into the new server, and I try to restore the tape's contents to the new drive with the command:

sudo tar xvf /dev/st0

Doing so results in the following errors:

tar: /dev/st0: Cannot read: Input/output error
tar: At beginning of tape, quitting now
tar: Error is not recoverable: exiting now

If I try typing sudo mt -f /dev/st0 status I get the following:

drive type = 114
drive status = 620757504
sense key error = 0
residue count = 0
file number = 0
block number = 0

Also, not sure if this helps or means anything but if I type 'dmesg', some messages
seemingly related to sense errors appear towards the end of the file:

[  171.781113] st0: Block limits 1 - 16777215 bytes.
[  342.356086] st0: Sense Key : Medium Error [current] 
[  342.356091] st0: ASC=0x3b <<vendor>> ASCQ=0xbf
[  397.977708] st0: Sense Key : Medium Error [current]

I've tried cpio as well, with the same results, whereby it seems to work fine
and list fine on the old server, but encounters read errors on the new server.
I'd be tempted to blame the tape, but it is brand new, and also that DDS2's
from the old server (which work fine on the old server) have similar input/output/'sense key' errors in a completely different server.

Apologies if this is seems rambling, I'm pretty much at a loss at where to go from here!
I read something about setting the
block size to something sensible, but I must admit I'm not great with tape-related stuff
and I couldn't figure it out. If anyone has any pointers, it would be great! :wall:

The default block size on SCO is 128K
You can change it in scoadmin->kernel_parameters->tune_kernel, 18
You could also try downloading cdrecord from here ftp://ftp2.sco.com/pub/skunkware/osr5/vols/
and installing a dvd writer.

Thanks.. what should I change to it to though?

I've determined that it is in fact 128K on the old SCO server, so presumably that's what the tape has backed up as.

On the Ubuntu side, I tried the following variations of setting the block size to 128k, followed by trying to read with tar (had to install mt-st to get the 'setblk' thing working with mt):

sudo mt -f /dev/st0 setblk 0

(variable mode I think)

sudo mt -f /dev/st0 setblk 131072

(128k * 1024 to get byte value)

..but tar -tvf still threw the same error.

I also tried the following tar statement to try read it with 128k block size:

sudo tar -t --blocking-factor=128 -f /dev/st0

but same error.

Should I set the blocksize on the SCO side to something else then? And if so what should I set it to?

I take it that you have the host version of SCO (no tcp).
How many GB of data do you have to move?
Can you write a tape on the Ubuntu machine, and read it on the SCO machine?

The SCO box has no network cards, basically everything runs over serial connection (I tried transferring the data with Kermit, Zmodem etc.) but I kept getting some sort of data transfer error.

It's not too huge, a 2GB database.

Hmm, thanks I will try your suggestion and let you know what happened! I think I might also try putting the tape drive from the new server into the old box, doing a backup, and transferring the tape drive back to the new box. (Problem is I'm doing this through another tech guy as the server is 1000km away! :slight_smile: )

Thanks for your help.

You could also add a hard drive to the SCO machine, and set its file system type as one of the following : HTFS (default) EAFS AFS XENIX DOS. Pick one that Ubuntu can read, then mount the drive in the Ubuntu machine.
If you use an IDE drive, make sure that the old system will boot from the SCSI drive if an IDE drive is installed.

1 Like

Ok never mind.. managed to solve it by putting the new tape drive in the old server, had to change a few jumpers and switches but it worked. :slight_smile: Thanks very much for all your help!