SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to do a backup on my tape drive. I am playing on about two weeks with tar on /dev/st0 but still not managed to do a successfull backup. I use DDS-3 tapes (12/24 GB).
The problem seems to be (I guess) that somehow the system (mt?) cannot see when the tape ends, and it tries to continue copying data, ending in an input/output error.
I managed to take a backup once, using also multiple volumes mode, but it only finished without errors by specifying file sizes with the -L option and giving file chunks of 11GB instead of 12GB just to be sure. But never get to restore that. trying to restore with the same options from backup or not, ends up with also an input/output error.
an example of what I am trying to do with tar:
tar -cMv -L 11000000 -f /dev/st0 /home/backup
where backup is a directory where I first copy what I need to get on tapes (also tried without -L).
I am using Slackware 10.2 with a 2.6.15.3 kernel now, and tried also with some 2.6.11.xx kernels and the default 2.4.31 that comes by default with slackware 10.2.
My tape device is a scsi Compaq SDT-9000.
My mt -f /dev/st0 status (with a loaded tape) is:
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x25 (DDS-3).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN
After searching the net it seems that people do backups/restores fine using tar and with multiple volumes, without the need specify file chunks, which either way didn't work for me.
Just to note, I cleaned the tape head using a clean cartridge. Also the tape device works perfect on a windows NT 4,2000 and xp where I tested it, and completed avery backup/restore 100% successfull.
Just to be sure that the device is working, its head is clean and my tapes are in good condition.
Tried also bacula and tapeware with similar failure results.
Any help? I tried everything I could play with and everything I found from net. Always get the same input/output error under Linux.
Hi,
I use a tape backup and it works good just at times it seems if there is to much to copy I get the error messages like you get. It seems to me that there is not enough tape to copy all the data. here are examples off my website as what I use hope it helps out somewhat. tar -f /dev/st0 erase this will erase your tape.
tar -xvf /dev/st0 this will get all the files off the tape to which ever directory you are in.
tar -cjvjpf /dev/st0 /boot /root /etc /usr .... will copy the four directory's and do it in a bzip2 copy, to your tape.
tar -xvf filename.tar will recover a file from your tape, you need to know the right file name here.
tar -tvf /dev/st0 will check the tape list it out for you.
About the tape sizes, as I said, are DDS-3, which means 12GB uncompressed. I seems I cannot backup more than 4GB if I won't set a file chunk size on tar (as explained on the thread start).
I got some new DDS-3 tapes to do some tests. I create a tar file just a bit bigger than 2GB. the backup finished successfull and I was able to restore it also with success. Then I tried backing up a tar file a little bigger than 4GB. After some time I had that known well input/output error. I thought There was a problem with the 4GB file sizes, although there is no such limit on my system for a long time. So just to be sure, I had a few iso cd images in my disc and tried to backup the directory they where in, directly to my tape. The directory's total size was 4.6GB, having iso images no more than 600MB each. But after about some time during the backup process I had again that input/output error!!!
Because the tape device is of variable block size I will now try setting a specific block size to the tape and see what will happen. I will let you know of the results.
Did you have tried with another program ? What about "dd if=/dev/zero of=/dev/st0" ? May be you get a different error message which could help you to point where the problem is....just an idea.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.