LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   error "tar (child): /dev/st0: Wrote only 0 of 10240 bytes? (https://www.linuxquestions.org/questions/linux-newbie-8/error-tar-child-dev-st0-wrote-only-0-of-10240-bytes-618214/)

hocheetiong 02-02-2008 02:46 PM

error "tar (child): /dev/st0: Wrote only 0 of 10240 bytes?
 
Hi, i am using DLT tape 20GB to backup my data, than have one file *.iso is around 3gb, when i want to backup this file using command: # tar -cvf /dev/st0 *.iso than will having this error: error "tar (child): /dev/st0: Wrote only 0 of 10240 bytes. If i backup not large file like 3gb file size, than ok, like many file but each file not bigger than 1gb than ok no any errors.

Thank you reply me...

Ya, i try to using command:
# tar -zcvf /dev/st0 *.iso
still have same errors.

than i try to using command:
# tar -jcvf /dev/st0 *.iso
Than ok not error.

why?


but, i actually not very sure how to check the total capacity on this DLT TAPE. I have one question about, i already backup # tar -jcvf /dev/st0 *.iso just now, and done the job, than when i want to check is it all what i want to backup is it inside my DLT tape, i use command # tar -tjvf /dev/st0 , but need to wait until finish are very slow, any method just quick check what inside this DTL tape, and any command to direct when perform backup #tar -jcvf /dev/st0 will automatic check whether the tape have error or not, because very important, if during backup than the tape drive can check if the tape have error than prompt out message, than i can change a new tape. Thank you.

gankoji 02-02-2008 06:58 PM

Perhaps this has something to do with the amount of space left on your tape drive? When you say that you can get it to work with tar -jcvf, that means that you were creating a tarred archive that was compressed using bzip2, which more often than not results in smaller files than gzip (which corresponds with the tar-zcvf command). Thus if you were only successful using the bzip2 compressed archive, that maybe means that you are just about out of space on your tape. Have you checked that?

hocheetiong 02-03-2008 06:45 AM

tar -jcvf /dev/st0 *.iso still having errors?
 
After i backup: # tar -jcvf /dev/st0 *.iso than i check my backup file inside tape drive. comamnd: # tar -tjvf /dev/st0 ..... run until half way the apper this errors:

bzip2: Compressed file ends unexpectedly;
perhaps it is corrupted? *Possible* reason follows.
bzip2: Invalid argument
Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now


Why???

gankoji 02-03-2008 05:25 PM

Well, this means that in fact your bzip2 compressed archive wasn't successfully created. I'm not sure what you're trying to do with the rest of the tar -jcvf command. /dev/st0 is your tape drive? And if it is, it seems that your command is actually creating an archive of all the .iso files on your tape drive, which would create lots of problems unless you've only used up half of your tape's space :-P. Try taking the .iso files you want to back up and creating the compressed archive on your HDD first, and then moving it to the tape drive. Also, try mounting your tape drive to somewhere like /mnt/tape and then moving the archive to that directory.

Please repost and let us know if you make any progress!


All times are GMT -5. The time now is 07:44 AM.