Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

vol(1) [minix man page]

VOL(1)							      General Commands Manual							    VOL(1)

NAME
vol - split input on or combine output from several volumes SYNOPSIS
vol [-rw1] [-b blocksize] [-m multiple] [size] device DESCRIPTION
Vol either reads a large input stream from standard input and distributes it over several volumes or combines volumes and sends them to standard output. The size of the volumes is determined automatically if the device supports this, but may be specified before the argument naming the device if automated detection is not possible or if only part of the physical volume is used. The direction of the data is automatically determined by checking whether the input or output of vol is a file or pipe. Use the -r or -w flag if you want to specify the direction explicitly, in shell scripts for instance. Vol waits for each new volume to be inserted, typing return makes it continue. If no size is explicitely given then the size of the device is determined each time before it is read or written, so it is possible to mix floppies of different sizes. If the size cannot be deter- mined (probably a tape) then the device is assumed to be infinitely big. Vol can be used both for block or character devices. It will buffer the data and use a block size appropriate for fixed or variable block sized tapes. Vol reads or writes 8192 bytes to block devices, usually floppies. Character devices are read or written using a multiple of 512 bytes. This multiple has an upper limit of 32767 bytes (16-bit machine), 64 kb (32-bit), or even 1 Mb (32-bit VM). The last partial write to a character device is padded with zeros to the block size. If a character device is a tape device that responds to the mtio(4) status call then the reported tape block size will be used as the smallest unit. If the tape is a variable block length device then it is read or written like a block device, 8192 bytes at the time, with a minimum unit of one byte. All sizes may be suffixed by the letters M, k, b or w to multiply the number by mega, kilo, block (512), or word (2). The volume size by default in kilobytes if there is no suffix. OPTIONS
-rw Explicitly specify reading or writing. Almost mandatory in scripts. -1 Just one volume, start immediately. -b blocksize Specify the device block size. -m multiple Specify the maximum read or write size of multiple blocks. The -b and -m options allow one to modify the block size assumptions that are made above. These assumptions are -b 1 -m 8192 for block devices or variable length tapes, and -b 512 -m 65536 for charac- ter devices (32 bit machine.) These options will not override the tape block size found out with an mtio(4) call. The multiple may be larger then the default if vol can allocate the memory required. EXAMPLES
To back up a tree to floppies as a compressed tarfile: tar cf - . | compress | vol /dev/fd0 To restore a tree from 720 kb images from possibly bigger floppies: vol 720 /dev/fd0 | uncompress | tar xfp - Read or write a device with 1024 byte blocks: vol -b 1k /dev/rsd15 Read or write a variable block length tape using blocking factor 20 as used by default by many tar(1) commands: vol -m 20b /dev/rst5 Note that -m was used in the last example. It sets the size to use to read or write, -b sets the basic block size that may be written in multiples. SEE ALSO
dd(1), tar(1), mt(1), mtio(4). VOL(1)

Check Out this Related Man Page

scsi_tape(7)						 Miscellaneous Information Manual					      scsi_tape(7)

NAME
scsi_tape - SCSI sequential access device driver DESCRIPTION
SCSI sequential-access (tape) devices store a sequence of data blocks. Data can be read and written using either fixed or variable sized block mode. If supported by the device, variable sized block mode is normally used (even when all blocks are the same size). Fixed sized block mode is generally only used for tape devices which do not support variable sized blocks. Fixed sized block mode can be used on some tape devices which support variable sized blocks to increase I/O performance. Generally SCSI tape devices are controlled through the (see mt(7)) generic tape device interface. This section describes features that are specific to SCSI tape devices. The ioctl (see scsi(7)) can be used to determine remaining tape capacity for some tape devices. The field indicates the "natural" block size of the device. This value may or may not be the current block size of the device. The number of blocks, indicated by the field, is an estimate of how much data can be written on the remaining media. A zero size is returned for devices that do not provide remaining- capacity information. The quantity of data that can actually be written may be higher or lower than indicated, depending on such factors as block size, media defects, data compression, and ability to maintain streaming. To improve performance, most SCSI tape devices have caches. Read-cache use, called "read ahead", causes the tape drive to read data in anticipation of read requests. Read ahead is only apparent to users in the increased performance that it produces. Write-cache use is called "immediate reporting". Immediate reporting increases I/O performance by reporting a completed write status before the data being written is actually committed to media. This allows the application program to supply additional data so that continuous media motion, called "streaming", can be achieved. The ioctl can be used to determine if immediate-reporting functionality is currently being used by the device. The value "1" indicates immediate reporting is enabled. By default, the device driver attempts to enable immediate reporting. The ioctl can be used to explicitly enable or disable immediate reporting. A zero value disables immediate reporting. The value "1" enables immediate reporting. The ioctl command can be used to cause any cached data to be written (committed) to media. Note that the device immediate reporting mode set by the ioctl survives between and calls, but not through system reboot. The ioctl indicates the device's current block size. A block size of zero indicates the device is in variable-sized-block mode. A non- zero block size indicates the device is in fixed-sized-block mode. The ioctl changes the current block size to the specified number of bytes. Setting the block size to zero specifies that variable-sized- block mode should be used. Any non-zero block size specifies that fixed-sized-block mode should be used. By default, the device driver attempts to set the block size to zero during open. If variable-sized-block mode is not supported by the device, the driver selects an appropriate block size for fixed-sized-block mode use. Note that the device block size set by the ioctl survives between and calls, but not through system reboot. The ioctl indicates the device's maximum and minimum fixed block-size limits. The device's minimum fixed block size is indicated by the field. The field contains the smaller of the maximum block size supported by the device and the maximum block size supported by the system This is the largest valid block size for the specific combination of device, driver, and host system being used. The ioctl can be used to determine the current media position for some devices. For devices that support this capability, the resultant value can be used to reposition the media to the same position in the future. The ioctl can be used to cause media repositioning on some devices. For devices that support this capability, media repositioning via this mechanism can generally be completed more quickly than might be similarly accomplished using record, filemark, or setmark spacing. The argument value specified should be the result of a previous for that media volume. The following is included from /* ioctl support for SCSI tape commands */ #define SIOC_GET_IR _IOR('S', 14, int) #define SIOC_SET_IR _IOW('S', 15, int) #define SIOC_GET_BLOCK_SIZE _IOR('S', 30, int) #define SIOC_SET_BLOCK_SIZE _IOW('S', 31, int) #define SIOC_GET_BLOCK_LIMITS _IOW('S', 32, struct scsi_block_limits) #define SIOC_GET_POSITION _IOR('S', 33, int) #define SIOC_SET_POSITION _IOW('S', 34, int) /* structure for SIOC_GET_BLOCK_LIMITS ioctl */ struct scsi_block_limits { unsigned min_blk_size; unsigned max_blk_size; }; WARNINGS
SCSI bus and device resets cause some devices to reposition media to beginning-of-tape (BOT). This unintentional media repositioning can cause loss of data. The driver causes the first subsequent attempt to fail as an indication of potential data loss. The driver does not write filemarks at close if the media has been programmatically repositioned. Applications that reposition the media prior to closing the device should write any required tapemarks. SEE ALSO
mknod(1M), mt(7), scsi(7). scsi_tape(7)
Man Page