TigerLogic.com
Products    |    Solutions    |    Support & Services    |    Education    |    Partners    |    Corporate    |    Events    |    Contact Us

Tech Tip:
Defining Tape in D3 AIX

D3 supports seven different types of tape devices. Usually, the D3_setup procedure automatically detects what tape drives are available to the system and define them appropriately in the configuration file (/usr/lib/pick/pick0). Here are sample in pick0 tape definitions:

tape  /dev/rfd0h  500  f  lq 3.5" floppy 1.44Mb high density floppy
tape  /dev/rfd0l  500  f  ld 3.5" floppy 720K low density floppy
tape  /dev/rfd1.15  500  f  lh 5.25" floppy 1.2Mb high density floppy
tape  /dev/rfd1.9 500  f  ls 5.25" floppy 360K low density floppy
tape  /dev/rmt0.1  16384  v  ll 8mm tape
tape  /dev/rmt1.1  16384  d  ll 4mm DAT tape
tape  /dev/rmt2.1  16384  q  lh SCT Density Setting #1
tape  /dev/rmt2.5  16384  q  ls SCT Density Setting #2
tape  /dev/rmt3.1  1000  h  lh Half-inch (9-track) 6250 bpi
tape  /dev/rmt3.5  1000  h  ls Half-inch (9-track) 1600 bpi
tape  /tmp/floppy  500  f  lx
Pseudo floppy
tape  /tmp/pseudo 10000  p  lx Compressed pseudo floppy

A tape definition in the configuration file consists of the keyword tape, the device name, and the default block size in D3, the tape type, and the density setting.

Device Name
The device name can be any valid device in Unix. To list the valid tape devices available on a system, use lsdev -Cc tape from AIX. Device names should use the no rewind on close suffix (.1, .3, .5, etc) in order for proper backups to be performed.

Default Block Size
The default block size is only relevant for compressed pseudo floppy devices. In dealing with compressed pseudo floppies, the default block size becomes the volume size (volsz) and controls the amount of data that is saved to the device before the device will cascade to another file. The volume size is the amount of data in kilobytes that will be saved before compression. If the volume size for a compressed pseudo floppy device is 1000 or greater, then the capacity of the compressed pseudo device is only limited to the capacity of the file system in which the compressed pseudo floppy file resides. When the compressed pseudo device reaches the volume size, it will create another file in the Unix file system and the save will continue, or cascade, on to the new file. If the volume size is less than 1000, then the compressed pseudo device will have a capacity of up to 1 GB due to the AIX compression utility. However, if over a gigabyte of data is saved to a compressed pseudo device with a volume size less than 1000, then the device will write over itself.

Tape Types and Density Settings
The fourth and fifth parameters define the type of device and the read/write capacity of the device. They also provide information about the density of the device to tape commands within the virtual machine such as list-device and set-device. The density settings are dependent on the device type and are only valid with certain types, so they will be discussed together.

f - floppy diskette drive
This is used for defining a floppy diskette drive to the D3 virtual machine. The capacity of the floppy device depends on the density setting used. Valid density settings for floppy diskettes are:

lq - 3.5" floppy 1.44Mb high density floppy
ld - 3.5" floppy 720K low density floppy
lh - 5.25" floppy 1.2Mb high density floppy
ls - 5.25" floppy 360K low density floppy

f - pseudo floppy drive
If the f type is used with a device name which is a Unix file this is a pseudo floppy device with a capacity of up to 2 GB. The Unix file must exist before attaching to the device. The density setting must be lx or the pseudo floppy will prompt for the next reel when the capacity reaches 1.44 MB. No compression is done on this device.

q - quarter inch drive (SCT)
This is used for defining a quarter inch SCT drive to the D3 virtual machine. When using a quarter inch tape with D3, the blocking factor in AIX must be set to 512. The capacity of the device depends on the device name used. Using the .1 extension on the device refers to no rewind on close; density setting #1 in smit and the .5 extension refers to no rewind on close, density setting #2 in smit. The density setting must be either lh for high density or ls for low density. This density setting does not control the capacity of the device but is used to better distinguish the high and low density devices in list-device or set-device. The D3 label size for quarter inch tape is always 512 bytes.

v - 8mm drive
This is used for defining an 8mm drive to the D3 virtual machine. When using an 8mm tape with D3 the blocking factor in AIX must be set to 0. The capacity of the device depends on the device name used. Using the .1 extension on the device refers to no rewind on close; density setting #1 in smit and the .5 extension refers to no rewind on close, density setting #2 in smit. The density setting for 8mm tape indicates what type of label to use on the tape. To read and write tapes with a label size of 512 bytes, the density setting should be ll or l. This is the default for D3 7.1. To read and write tapes with a label size of 80 bytes, the density setting should be ls. This is the default for releases prior to D3 7.1.

NOTE: If a save was done prior to 7.1with the blocking factor in AIX set to 512, then the blocking factor must be set to 512 and the tape type set to quarter inch on the device before the data can be properly restored on D3 7.1.

d - 4mm DAT drive
This is used for defining a 4mm DAT drive to the D3 virtual machine. When using a 4mm DAT tape with D3 the blocking factor in AIX must be set to 0. The density setting for 4mm tape indicates what type of label to use on the tape. To read and write tapes with a label size of 512 bytes, the density setting should be ll or l. This is the default for D3 7.1. To read and write tapes with a label size of 80 bytes, the density setting should be ls. This is the default for releases prior to D3 7.1.

h - half-inch drive
This is used for defining a half-inch (9-track) drive to the D3 virtual machine. When using a half-inch tape with D3 the blocking factor in AIX must be set to 0. The capacity of the device depends on the device name used. Using the .1 extension on the device refers to no rewind on close; density setting #1 in smit and the .5 extension refers to no rewind on close, density setting #2 in smit. The density setting must be either lh for 6250 bpi, lm for 3200 bpi, or ls or ld for 1600 bpi. As in the case of quarter inch tape, this density setting does not control the capacity of the device but is used to better distinguish the different density settings in list-device or set-device.

p - compressed pseudo floppy drive
This is used for defining a compressed pseudo floppy device to the D3 virtual machine. Data is written compressed and read uncompressed using standard Unix compress and uncompress utilities. At user specified limits (before compression) defined by the volume size, the Unix file name changes and cascades the pseudo floppy device to the new file name. Take, for example, the following tape definition in the D3 configuration file tape /tmp/pseudo 10000 p lx. If a data save has more data than the volume size specified (10,000 1024 bytes blocks or 10 MB), then the device /tmp/pseudo is closed and the save cascades to /tmp/pseudo-1 which is created automatically. After the second 10 MB is saved, /tmp/pseudo-1 is closed and the save cascades to /tmp/pseudo-2. This process will continue until the save is finished. There must be enough space in the Unix file system to store the compressed files; otherwise, an error will occur. The density setting for a compressed pseudo floppy device must be lx.

The tape definitions that are defined in the D3 configuration file can be modified with the chg-device verb. See the documentation on chg-device for more information.

The AIX command to set the blocking factor for a tape device to 0, as in the case of 8mm, 4mm, and half-inch, is:

chdev -l 'rmtX' -a block_size='0'

where rmtX is the device name in AIX.

To set the blocking factor to 512, as in the case of quarter-inch SCT, is:

chdev -l 'rmtX' -a block_size='512'

where rmtX is the name of the quarter-inch device in AIX.

December 20, 2007
September 7, 2006
Volume 1, 2005
Volume 1, 2004
Spring/Summer, 2003
Winter, 2003
Fall, 2002
Summer, 2002
Spring, 2002
Tech Tips
   
Copyright 2009. TigerLogic. All Rights Reserved