cpio problem

cpio problem

Post by Edward C. Laughto » Fri, 28 Jun 2002 03:17:12



All,

I have come across a strange problem. The cpio utility is used to
archive data to tapes. This usually worked well until recently. Now,
every time the process starts writing to the third tape I get an error
'cpio: cannot open "/dev/rmt/0cn", errno 16, device busy'. Please note
that there are files with sizes greater than 8 GB to be archived. I have
been told that the '-H odc' option would overcome the limitation of cpio
with files greater than 8 GB. I also have been told that the '-c' & '-H
odc' options are mutually exclusive and should not be used together. I
notice however that I get no error even though that may be so. Any
comment on this?

The command used is shown below.

cat ${BKUPF} | cpio -ocvB -H odc -O ${BKDEV} -M "Insert Tape %d and
Press
[ENTER]"

The variable ${BKUPF} expands to a fully qualified filename containing
the
list of files to be backed up.  And ${BKDEV} expands to /dev/rmt/0cn.

Thanks.

 
 
 

cpio problem

Post by Joerg Schilli » Fri, 28 Jun 2002 05:21:38




Quote:>All,

>I have come across a strange problem. The cpio utility is used to
>archive data to tapes. This usually worked well until recently. Now,
>every time the process starts writing to the third tape I get an error
>'cpio: cannot open "/dev/rmt/0cn", errno 16, device busy'. Please note
>that there are files with sizes greater than 8 GB to be archived. I have
>been told that the '-H odc' option would overcome the limitation of cpio
>with files greater than 8 GB. I also have been told that the '-c' & '-H
>odc' options are mutually exclusive and should not be used together. I
>notice however that I get no error even though that may be so. Any
>comment on this?

Cpio cannot ever handle more than 8 GB. This is the reason why it has
been withdrawn from the POSIX standard!

If you like to archive files > 8 GB in a standard conforming archive format
you need to use star

ftp://ftp.fokus.gmd.de/pub/unix/star

It supports the new POSIX.1-2001 TAR format.

--



URL:  http://www.fokus.gmd.de/usr/schilling    ftp://ftp.fokus.gmd.de/pub/unix

 
 
 

1. CPIO problems

: I have date backup from UNIX sys V to tape using commands

:        find / -print | cpio -oucvdB > /dev/rmt0   (SVR 4)
:    or
:        find / -print | cpio -oucvdB > /dev/ctape  (on UNIXWARE 2.0)

: I am trying to restore the tape on SUN OS 4.1.3 using command            

:        cpio -itB < /dev/rst0 or (/dev/rst8) Check for the contents of tape.
:        cpio -it  < /dev/rst0 or (/dev/rst8)

: Both commands give me the error:  
:        cpio : this is not a cpio file: bad  magic number.

: I am not sure what wrong with it. Is it other options that I need to turn on.
: Have anyone had backup on SVR4 and restore on SUN OS ????

: Thanks for any comment or suggestions.

Without knowing too much about either machine, I guess that you failed because:
* you didn't supply the appropriate "c" option to the cpio restore.

* or that the data bytes have been swapped. The "magic number" for cpio is
  the character string "070707" at the very beginning of the archive file,
  and if cpio doesn't see this, it will not recognize the archive as its own.
  To determine: grab a few raw records from the tape:
  $ dd if=/dev/rst8 count=1 | more
  if the data look "weird", investigate the "swab" option of "dd" to reorder.

* If memory serves, the "blocking factor" for a /dev/rmt8 device on a Sparc
  is 20. The blocking number has to match between the source and destination
  machines, I believe. Again, use "dd" to grab the data, and let "cpio" have
  at it from the *file* created, not the *tape device*.

send me e-mail to tell me if any one of these methods have brought you success.

2. Q: +57600 on Solaris ?

3. cpio problems

4. lpr and lpd for Sys V

5. hpux cpio problem

6. Redirecting output (stderr?)

7. CPIO problem

8. Personal web server messed up Apache!

9. CPIO problems

10. cpio problems

11. cpio problem

12. GNU CPIO problems

13. Restoring the root fs with cpio problem