[Previous] [Contents] [Next]

vol

Manage multi-volume archives (QNX)

Syntax:

vol -r|-w [-b blocking] [-s blks_num] block_special_device

Options:

-b blocking
Use the specified blocking factor (default is 30720 bytes). A suffix of b or k may be added to the number specifying units of 512-byte blocks or kbytes, respectively.
-r
Read from the block special device.
-s blks_num
Skip this number of blocks at the start of each volume (default is 1).
-v
Disable delayed writes to the block special device.
-w
Write to the block special device.

Description:

You use the vol utility primarily with removable media, particularly floppy diskettes. At the beginning of each volume, vol writes a header containing the creation time and sequence number of the volume -- this helps you detect out-of-sequence diskettes.

A media descriptor is located on the first block of a floppy diskette. For this reason, vol by default skips the first block of each volume it writes to. If you don't want it to skip the first block, you can specify the -s option with a value of zero. When the disk is read on a QNX system, the (overwritten) media descriptor can confuse the Fsys.floppy driver, which is set up to automatically switch the drive parameters for media size (360k vs 1.2M, 720k vs 1.4M etc.) based on the contents of the first block of the disk. The lockfd utility may be used to override this behavior and lock the floppy disk drive to a specific media type.


Note: If you specify -s 0, no blocks will be skipped and no header will be written at the beginning of each volume. If you specify the -s option when writing an archive, remember that you must also specify the same number of blocks when the archive is retrieved.

If you want to save files larger than a single volume, specify the -w option. The vol utility will read the standard input and write it onto a block special device (usually diskettes), pausing at the start of each one.

To reassemble and extract archives split across several volumes, specify the -r option. The vol utility will read from a block special device and write the output in a single stream to standard output.

Examples:

Use pax to archive everything under the current directory and let vol split the data across as many (already-formatted) diskettes (/dev/fd0) as required:

    pax -w . | vol -w /dev/fd0

Restore the archive from /dev/fd0:

    vol -r /dev/fd0 | pax -r

Caveats:

If you don't tell the vol utility to skip zero blocks on a floppy (-s 0), the floppy driver might not be able to determine the media characteristics on retrieval (when the archive is written it can overwrite the media descriptor stored in the first block with data from the archive). The lockfd utility can be used to lock the floppy to a specific media type thus avoiding the problem.

The vol utility does not format media. See the fdformat utility for instructions on formatting floppy diskettes.

See also:

cpio, lockfd, pax, tar


[Previous] [Contents] [Next]