Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uwm.edu!ogicse!littlei!sumac.hf.intel.com!seckin From: seckin@sumac.hf.intel.com.ogi.edu Newsgroups: comp.unix.i386 Subject: Re: Archive Tapes Summary: cpio works Message-ID: <1060@gandalf.littlei.UUCP> Date: 25 May 90 23:59:36 GMT References: <29490@cup.portal.com> <1990May2.113532.26951@msuinfo.cl.msu.edu> <7804@dmshq.mn.org> <299@zds-ux.UUCP> <1990May4.224058.4271@eci386.uucp> Sender: news@littlei.UUCP Reply-To: seckin@sumac.hf.intel.com (Seckin Unlu) Organization: Intel Corp., IMSO UNIX Development, Hillsboro, OR Lines: 36 In article <1990May4.224058.4271@eci386.uucp> clewis@eci386.UUCP (Chris Lewis) writes: >I've yet to see a version of cpio that doesn't "handle" end of media... Same here. I routinely do multi-volume tape backups on my system, an Intel 386 AT running UNIX V/386 Release 3.2 Version 2.1. >The problem is that cpio considers *any* read or write error to >be end of tape and prompts for the next tape. ... cpio handles ENOSPC, "end of media" for tapes. The tape driver has to handle "end of media" correctly, that is it should stop writing data, write a file mark, and return the correct residual count and the correct error number (ENOSPC). For i/o errors the driver should report EIO, etc. >I wish that there was an end of media errno. (Though some tape drivers >apparently do something slightly different on EOM versus true errors) There is, ENOSPC. Standard System V/386 tape drivers handle end-of-tape properly, so multi-volume archives are good. Just use cpio! Also, note that cpio tries to allocate 10 buffers of specified size. For example "cpio -oB .." tries to allocate 10*5K, will issue 50K i/o requests with a n*5K final write. Using "cpio -oC 1024000 .." the cpio will try to allocate 10MB of memory, and it will succeed grabbing that much virtual memory, but you might end up paging/swapping a lot. Also again, the cpio buffer is contiguous in virtual memory, but the tape controller deals with real addresses, so the VM/driver usually end up issuing the i/o requests in chunks of 4K (pagesize). If the hardware/software is fast enough, and the tape controller/drive can handle a little delay, the tape streams. >Chris Lewis, Elegant Communications Inc, {uunet!attcan,utzoo}!lsuc!eci386!clewis >Ferret mailing list: eci386!ferret-list, psroff mailing list: eci386!psroff-list Seckin Unlu seckin@littlei.intel.com Software Engineer uunet!littlei!seckin Intel Corporation [Only my personal opinions]