Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-15-2011, 08:45 PM   #1
Senior Member
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 31
cpio is not work

y server suddenly have the problem to use tar , cpio to backup file to /dev/st0, the error is as below

"kernel: st0: Write not multiple of tape block size"

Then I use the below command to fix it

"mt -f /dev/st0 setblk 10240"

Now , I can use tar to backup file but cpio still have the same problem , I am strange that they use the same drive , but tar can do but cpio can't , ?

Please advsie .

Old 11-16-2011, 12:41 AM   #2
Jerre Cope
Registered: Oct 2003
Location: Texas (central)
Distribution: ubuntu,Slackware,knoppix
Posts: 323

Rep: Reputation: 37
I suppose you've tried retensioning the tape already. Often a tightly wound tape will give some weird errors. Your tape drive may be going bad. It may be that tar is working inside the giant block range just because the tar command may be more compact.

I had a problem with one version of Unix where I had to fudge the block size with dd.

Here's an shell snippit of some code which also compresses to tape as well. Hope this helps.

export BSTATUS
cat tapelist | cpio -ouBdc 2>>bakerrlog | \
   gzip -c9999999 | \
   dd ibs=512 obs=512 conv=sync of=$TAPE 2>>bakerrlog || BSTATUS="N"


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
cpio -idcmv command hanged while extracting .cpio command ravindra.atre Linux - General 2 08-22-2011 04:10 AM
about cpio jokerking Linux - General 3 10-01-2010 05:32 AM
help me with CPIO deli007 Linux - General 2 03-05-2007 06:40 PM
How to use cpio to extract a cpio archive? linx win Debian 4 06-17-2005 01:53 PM
why bootsplash can't work with cpio-typed initrd kyven zhang Linux - Software 0 01-13-2005 07:47 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:59 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration