need help with multi-reel cpio

Tony O'Hagan tony at uqcspe.OZ
Thu May 15 16:23:21 AEST 1986


	What we did was write a filter to handle output from any program
(e.g. cpio/tar/cat etc.) to write on several volumes. (e.g. floppies/tapes)
It has been tested under V7 & Sys 3 and for several tapes and floppies.

	The doc follows :-

MULTIVOL(8)         UNIX Programmer's Manual          MULTIVOL(8)

NAME
     multivol - handle multivolume files

SYNOPSIS
     multivol -o [-vtw] [-b blocksize] [-n count] [-l label] [device]

     multivol -i [-vtw] [device]

     multivol -t [device]

DESCRIPTION
     Multivol allows for the convenient use of multivolume  files
     such as when backing up to several floppy disks.

     With the -o option, multivol reads the standard input  file,
     breaks  it into volumes and writes them to the device.  With
     -i, it reads volumes from the device, concatenates them  and
     writes  the  resultant file to standard output.  You may not
     specify both -i and -o.

     The device to use  is  given  by  the  device  argument,  or
     /dev/multivol if none is specified.  Normally this will be a
     character special file corresponding to a raw disk  or  tape
     unit.   It  does not have to be a random access device: mul-
     tivol only accesses it sequentially.  However, multivol  may
     re-open a volume in order to rewind devices such as magnetic
     tape.

     The -b blocksize argument specifies the physical block  size
     to be used.  This number may end with k or b to specify mul-
     tiplication by 1024 or 512 respectively.  With a floppy disk
     it  can usefully be made the size of one track.  The default
     physical block size is 512 bytes.   If  the  device  or  its
     driver  does not allow successful writing all the way to the
     end of a physical volume, such as with magnetic tape, the -n
     count  options  should be used to specify the maximum number
     of physical blocks to be written on one volume.

     The -l label option allows the user to supply a short string
     to be written onto the volume for identification purposes.

     Before reading or writing a new volume, multivol prompts  on
     the   controlling  terminal  for  the  user  to  insert  the
     appropriate volume into the physical device and waits for  a
     new-line  to  be  typed.  With -i, if the volume inserted is
     not an multivol volume, is not the next volume  in  sequence
     or  does not have the same date stamp as the previous volume
     multivol asks you whether you really want to  try  and  read
     it.

Printed 15/5/86               local                             1

MULTIVOL(8)         UNIX Programmer's Manual          MULTIVOL(8)

     Multivol puts some extra information on each volume.  It  is
     in  ASCII  so  that  it  is  machine independent.  Hence the
     actual amount of data stored on each volume will be slightly
     less  than  its physical size.  The -t option prints some of
     this information on standard error.  It includes:

     o    the date that the volume was written

     o    the sequence number of the volume

     o    any label string supplied at the time  the  volume  was
          written

     If you specify -w with -i or  -o  multivol  assumes  the  -t
     option  also  and asks you to verify that each volume really
     is the required one.

     The -v option tells multivol to write various other  verbose
     information  on  standard error such as an indication of how
     many blocks it has read or written.

EXAMPLES
     Tell me what you know about this volume:
          multivol -t

     Backup a directory to the default device:
          tar cf - mydir | multivol -o

     and retrieve it again:
          cd mydir
          multivol -i | tar xf -

     Backup to tape all files changed since last time:
          touch /etc/multivoldate1
          find / -newer /etc/multivoldate2 -print | cpio -ov |
               multivol -o -l WEEKLY -b 20k -n 1000 /dev/rmt0
          mv /etc/multivoldate1 /etc/multivoldate2

     Retrieve a file from that backup:
          cd /
          multivol -i /dev/rmt0 | cpio -idmv usr/myname/myfile

FILES
     /dev/tty     where prompt is written and response is read
     /dev/multivolthe default device

SEE ALSO
     tar(1), cpio(1), dd(1), dump(8), ``your device''(4)

DIAGNOSTICS
     A message is written on standard  error  and  multivol  ter-
     minates in the event of

Printed 15/5/86               local                             2

MULTIVOL(8)         UNIX Programmer's Manual          MULTIVOL(8)

     o    incorrect usage

     o    not being able to open the device

     o    not being able to open the controlling terminal

     o    an I/O error on the device

BUGS
     In the event of an I/O error you may  have  to  start  again
     with  the  first  volume depending on the nature of the file
     and the program which produced it.  In many cases it  simply
     means  the  end  of the volume has been reached, and no more
     can be read/written.  If a block limit has been set multivol
     will indicate this condition.

     When reading, multivol attempts to determine the block  size
     from the volume header, however some raw devices will return
     an I/O error if the block size used  for  reading  does  not
     match  that used for writing, hence the volume header cannot
     be read unless the original block size is also specified.

     Volume labels may not contain white space and are limited to
     14 characters.

     Many tape device drivers cannot handle a read/write  request
     while  the tape is rewinding, for such drivers the -w switch
     is recommended in place of just -t

Printed 15/5/86               local                             3

Tony O'Hagan		Australia: (07) 3774125  International: +61 7 3774125
University of Queensland	CSNET:	tony at uqcspe.oz	ACSnet:	tony at uqcspe.oz
Dept. of Computer Science	UUCP:	...!seismo!munnari!uqcspe.oz!tony
St. Lucia, Brisbane, 		ARPA:	tony%uqcspe.oz at seismo.css.gov
AUSTRALIA	4067		JANET:	uqcspe.oz!tony at ukc



More information about the Comp.unix.wizards mailing list