LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 30
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 .

Thanks.
 
Old 11-16-2011, 01:41 AM   #2
Jerre Cope
Member
 
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.

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


Reply


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 05:10 AM
about cpio jokerking Linux - General 3 10-01-2010 06:32 AM
help me with CPIO deli007 Linux - General 2 03-05-2007 07:40 PM
How to use cpio to extract a cpio archive? linx win Debian 4 06-17-2005 02:53 PM
why bootsplash can't work with cpio-typed initrd kyven zhang Linux - Software 0 01-13-2005 08:47 AM


All times are GMT -5. The time now is 02:47 PM.

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