[Previous Section] [Back to Table of Contents] [Next Section]

IRIX Advanced Site and Server Administration Guide


Chapter 7
Disks and Tape Drives

This chapter covers what you need to know about the disk devices and tape drives on your workstation or server. All system software and user files are kept on the hard disk device(s). The cartridge tape device is used primarily for file system backups and data transfer.

Topics covered in this chapter are:

For information on creating and administering file systems, see Chapter 8, "File System Administration." For information on backing up data onto tapes, see Chapter 6, "Backing Up and Restoring Files." If you are installing a hard disk or tape drive, see the installation instructions furnished with the hardware.


Identifying Devices to IRIX

Before a disk or tape device can be used with IRIX, it must be made known to the system. For equipment that comes with your computer, the process of identifying devices is part of configuration and is done automatically as the system is booted.

The standard method of handling the identification is through an entry in the /dev directory of the root file system. Since an entry in a directory is a file (or another directory), conceptually a disk or tape device is treated as if it were a file. In practice, there are differences between standard files and device files, so the latter are referred to as special files.

The following output is the result of the ls -l command invoked on a user's ordinary file and the /dev directory. It shows the difference in structure between regular and device files. This is a regular file:

-rw-r----- 1 ralph raccoons 1050 Apr 23 08:14 scheme.notes 

These are device files:

brw------- 2 root sys 22,32 Apr 15 10:59 /dev/dsk/dks0d1s01 
brw------- 2 root sys 22,32 Apr 15 10:59 /dev/root 
brw------- 2 root sys 22,38 Apr 12 13:51 /dev/dsk/dks0d1s1 
brw------- 2 root sys 22,38 Apr 12 13:51 /dev/usr 
crw------- 2 root sys 22,32 Apr 15 10:58 /dev/rdsk/dks0d1s0 
crw------- 2 root sys 22,32 Apr 15 10:58 /dev/rroot 
crw------- 2 root sys 22,38 Apr 12 13:51 /dev/rdsk/dks0d1s1 
crw------- 2 root sys 22,38 Apr 12 13:51 /dev/rusr 

The above listing shows that the file scheme.notes is a regular file (indicated by the dash ``-'' in the first position of the line) with these characteristics:

The device file listing has some similar information to the listing of a normal file, but also contains additional information. In the field of a long listing where a regular file shows the byte count of the file, a device file displays two numerals called the major and minordevice numbers.

Table 7-1 displays the parts of a device filename in bold face to illustrate its construction.

Table 7-1 : Device Name Construction

Device Name Component
/dev/dsk/dks0d1s0 /dev = device files directory
/dev/dsk/dks0d1s0 dsk = subdirectory for hard disk files
/dev/dsk/dks0d1s0 dks = SCSI device
ips = ESDI device
xyl = SMD device
ipi = IPI device

jag = VME SCSI device (Jaguar disk)

/dev/dsk/dks0d1s0 0 = disk controller 0
/dev/dsk/dks0d1s0 d0 = main hard disk (d1 for SCSI)
d1 = second hard disk (d2 for SCSI)
/dev/dsk/dks0d1s0 s0 = partition 0



The device files shown have the following characteristics:

Block and Character Devices

Block devices or character devices are identified by the way in which they are accessed. Block devices are accessed through the integrated page cache, and character devices are accessed directly. The integrated page cache holds input to the block device until a predetermined amount of data has accumulated. Then the data is transmitted all at once. Similarly, only blocks of data of a certain size are read from a block device. The size of the block is generally configurable in the kernel. For more information on changing block sizes and on changing kernel parameters in general, see Chapter 5, "Tuning System Performance" and Appendix A, "IRIX Kernel Tunable Parameters."

When the device is read from or written to in blocks of varying sizes, a character device name is used. For example, some file maintenance routines do I/O in this manner. Character devices are also referred to as raw devices. The device file directory listing in "Identifying Devices to IRIX" gives an example of the naming difference: the raw device name of the disk drive is in directory /dev/rdsk, where the r indicates raw.


Hard Disks under IRIX

IRIX offers a choice of five disk interfaces: SMD, ESDI, SCSI, JAG, and IPI. These drives provide maximum flexibility in meeting mass storage requirements.

Each kind of disk drive is managed by a controller. Each type of controller can support a fixed number of drives. Your workstation can support a fixed number of controllers. (For the number and type of controllers supported by your model of workstation, see your hardware owner's guide.) The different types of controllers support the following number of disks per controller:

Table 8-2 provides a look at the relative, best-case characteristics of each interface.

Table 7-2 : Disk Drive Performance

Disk Form Factor Avg. Seek Transfer Rate Raw Data Rate
SCSI 5-1/4'' or 3.5'' 16 ms .5-1.5MB/sec 1.25-2.50MB/sec
VME/SCSI 5-1/4'' 16 ms .5-1.5MB/sec 1.25-2.50MB/sec
VME/ESDI 5-1/4'' 16 ms .9-1.7MB/sec 1.25-2.50MB/sec
VME/SMD 8'' 16 ms 2.0-2.1MB/sec 3.0MB/sec
VME/IPI 8'' 16 ms 3.6MB/sec 6.0MB/sec



Note: Average seek time may vary, and the Transfer Rate column indicates sustained data transfer through the file system measured for sequential reads. Your perceived performance will probably not match these figures.

Rates vary for different types of drives within each class. Larger drives tend to be faster. Other drives and some types of systems will be slower.


Adding a Hard Disk

The process of adding a hard disk to your system does not end when the disk hardware has been installed and the system powered up again. There are software operations that must be performed to allow IRIX to see the new disk.

Configuring SCSI Disks With Add_disk(1M)

The Add_disk(1M) command performs all the necessary software operations to configure your system to use your new SCSI disk on your integral SCSI controllers. Add_disk cannot be used on VME bus SCSI controllers. For Jaguar disks attached to VME controllers, use MAKEDEV(1M) and mknod(1M). Most systems have only integral SCSI controllers, and are eligible to use Add_disk. If you are not sure if your SCSI controllers are eligible, use the hinv(1M) command to check your SCSI controller. You can use Add_disk if the entry for your SCSI controller indicates an integral controller, such as the following:

Integral SCSI controller 0: Version WD33C93A, revision 9

The syntax of the command is:

Add_disk [controller number] [disk number]

If you are adding a second disk on controller 0 to your system, you do not have to specify the disk or controller number, as adding disk 2 on controller 0 is the default. If you are adding a third (or greater) disk, or if you are adding a disk on a controller other than controller 0, you must specify the disk and controller.

Add_disk checks for valid file systems on the disk, and if any file systems are present, you are warned and asked for permission before the existing file systems are destroyed and a new file system is made.

The Add_disk command performs the following tasks:

Configuring Disks With MAKEDEV(1M)

If you need to create hard disk or other device files, use the MAKEDEV(1M) command:

/dev/MAKEDEV 

MAKEDEV with no arguments creates the standard set of device files in the /dev directory. You can create specific types of device files by supplying the appropriate arguments to MAKEDEV. This is a list of the disk devices that MAKEDEV can create:

ips

Creates special files for ESDI disks connected to an Interphase ESDI disk controller. See ips(7M) for details.

ipi

Creates special files for IPI disks connected to a Xylogics IPI disk controller. See ipi(7M) for details.

dks

Creates special files for SCSI disks. See dksc(7M) for details.

jag

Creates special files for Jaguar VME/SCSI disks. See jag(7M) for details.

xyl

Creates special files for SMD disks connected to a Xylogics SMD disk controller. See xyl(7M) for details.

disk

Creates all the disk device special files for the dks, ips, ipi, and xyl drives, and then creates links by which you can conveniently reference them without knowing the configuration of the particular workstation.

The links root, rroot, swap, rswap, usr, rusr, vh and rvh are created to reference the current root, swap, usr, and volume header partitions. Note that if you have changed the partitions, for example by extending them using logical volumes, these links will not be correct for your system and you must make them by hand. Use the link(1M) command to link the disk partitions to the appropriate names.

links

Creates both disk and tape devices.

For a complete list of MAKEDEV options, see the MAKEDEV reference page. For a list of tape device options, see "Tape Devices".

You may need to create specific files that are not created by MAKEDEV; for example, if you have extended a partition using a logical volume, use the mknod(1M) command.

The general format of the mknod command is:

mknod  name b | c major minor 
mknod  name p 

The options of mknod are:

name

Specifies the name of the special file.

b

Specifies a block device.

c

Specifies a character device. The OR sign ( | ) indicates that you must specify one or the other.

major

The major number indicates a device type that corresponds to the appropriate entry in the block or character device switch tables.

minor

The minor number indicates a unit of the device. It distinguishes peripheral devices from each other.

p

Specifies the special file as a first-in, first-out device. This is also known as a named pipe.

When you format a disk you write basic address information and timing marks, and you identify bad areas on the disk (called bad blocks). This type of formatting should never be performed on SCSI disks. When you partition the disk, you divide the disk into various logical units. Partitioning can be done on any disk.


Formatting Disks Using fx

Many drive manufacturers ship their drives preformatted, and no further formatting is necessary. This is true of virtually all SCSI disks. However, if you must format a disk, use the fx(1M) command with the -x option to allow it to write to the disk. For disks, fx formats both sides of the disk into tracks and sectors that can be addressed by the disk controller. A portion of the disk called the disk label is reserved for data associated with the disk layout. For complete information on disk labels and their contents and management, see the fx(1M) reference page. The volume table of contents (vtoc) resides in the disk label. The vtoc (also called the volume header) shows how the partitions on the disk are allocated. On a hard disk, labels also map portions of the disk that may not be usable. Formatting a previously used disk, in addition to redefining the tracks, erases any data that may be there.

The utility prtvtoc(1) is used to print out the current vtoc.

Formatting a New Disk

From time to time, you may find that you must install a new disk completely from scratch. The new disk may have no formatting or partitioning information on it at all. To format the disk and create partitions and file systems, perform the following steps:

    Bring the system up into the System Maintenance Menu. Choose option 5 to enter the Command Monitor.

    Once in the Command Monitor, give the hinv command and determine the correct piece of hardware from which you will boot fx. For example, a system with an IP19 (ARCS) processor and a single CD-ROM drive on SCSI address 4 would use the device dksc(0,4). For the remainder of this example, we will use that device, although your device may be different. If your device is different, use your device information where applicable. See Appendix A of the Software Installation Administrator's Guide for a complete listing of all appropriate commands to boot fx from CD-ROM.

    Insert a CD containing the installation tools into your system's CD-ROM drive. (If you have a tape drive, insert a tape with installation tools. If you are installing over a network connection, have the network address of the workstation with the installation tools available. For detailed information on installations, see the Software Installation Administrator's Guide.)

    Give the following command in the Command Monitor:

    boot -f dksc(0,4,8)sashARCS dksc(0,4,7)stand/fx.ARCS --x 

    You see the following messages and prompts. Your expected responses are in bold face type. These responses (and the default prompts) select the first disk:

    SGI Version 5.1 ARCS Nov 19, 1993
    fx: "device-name" = (dksc) <Enter>
    fx:  ctlr# = (0) <Enter>
    fx: drive# = (1) <Enter>
    ...opening dksc(0,1)
    ...controller test...OK
    Scsi drive type == CDC   94171-9 0184
    ---please choose one(? for help) .. to quit this menu)---
    [exi]t         [d]ebug       [l]abel         [a]uto
    [b]adblock     [exe]rcise    [r]epartition   [f]ormat

    Select the auto command, and your disk will be prepared for file systems with a default set of partitions. To perform custom formatting, please refer to the fx(1M) reference page for complete instructions.

    Once the formatting and partitioning is complete, exit fx and choose the option "Install System Software" from the System Maintenance Menu. The Install System Software option brings up inst(1M).

    Once in inst, choose option 10, the admin option, from the inst main menu.

    When you see the Administrative Commands Menu, choose option 10, the mkfs option, to make file systems on the disk you previously formatted with fx.

    When the file systems have been made, you may proceed with your installation.

Complete information on using inst(1M) and on booting inst from a variety of media (local and remote CD-ROM network distribution directories) is available in the Software Installation Administrator's Guide and the inst(1M) reference page.


Repartitioning a Hard Disk

Partitions on the hard disk devices on your workstation are allocated in a standard arrangement. The arrangement varies according to the number of disk drives that you have and the size of those drives.

The first disk is typically partitioned to accommodate the root, swap, and /usr partitions. Other disks may be partitioned to add additional space to the file systems based on the first disk, or may be partitioned into entirely new file systems.

The default partitions are generic in nature and should be evaluated by the system administrator. After your system has been in operation for a few months, you may decide that a different arrangement would better serve your users' needs.

Changing Hard Disk Partitions

This section describes how to change disk drive partitions. Once disks have been formatted and partitioned, these partitions may be used as file systems, parts of a logical volume, or as raw disk space.

Follow these steps before changing any partition:

    If there is any valuable data on the disk to be repartitioned, make a complete backup using either the System Manager or the Backup(1) utility. The System Manager is the preferred utility and is described completely in the Personal System Administration Guide. Only backups made with Backup(1) or the System Manager will be available to the system from the System Recovery menu of the System Maintenance Menu. Other utilities require a full system installation to operate correctly. Repartitioning will make the current data on your disk inaccessible.

    Make sure that the disk drive to be partitioned is not in use. That is, make sure that no file systems are mounted and no programs are accessing the drive.

The disk should be partitioned according to the use of the drive. Many users use the disk just as a single shared file system. Other users may want to have a smaller partition for private work. Before starting the partitioning process, determine how much space is available on the drive, and then decide how to divide up that space.

You can partition the disk into as many as 16 sections, each one of any size. The size of a partition is measured in 512-byte blocks. Partitions are numbered starting at 0. Partition numbers 8, 9, and 10 are reserved for internal information.

As an example, you will repartition a 380MB SCSI drive to raise the size of the root partition. First, use prtvtoc(1) to print out the current information about the drive:

prtvtoc /dev/dks/dks0d1vh 

The output looks like this:

* /dev/dsk/dks0d1vh (bootfile "/unix") 
*     512 bytes/sector 
*      45 sectors/track 
*       9 tracks/cylinder 
*    1558 cylinders 
*       7 cylinders occupied by header 
*    1551 accessible cylinders 
* 
* No space unallocated to partitions 

Partition Type Fs   Start:sec (cyl) Size:sec  (cyl) Mount Dir
 0        efs  yes  2835      (7)   32400     (80)   /       
 1        raw       35235     (87)  81810     (202)          
 6        efs  yes  117045    (289) 513945    (1269) /usr    
 7        efs       2835      (7)   628155    (1551)         
 8        volhdr    0         (0)   2835      (7)            
10        volume    0         (0)   630990    (1558)         

If prtvtoc fails, use hinv(1) to make sure that you are examining the correct drive, or use fx(1) to make sure that the drive is formatted.

Look at the size column for partitions 0, 1, and 6. In this example, you have 32400 + 81810 + 513945 = 628155 sectors to use. (Recall that a sector is a 512-byte block.) Look at the start sector numbers, and notice that partition 7 overlaps 0, 1, and 6. Partition 0 is your root file system, and is mounted on the system's root directory (/). Partition 1 is your system's swap space, and is used by the IRIX kernel. Partition 6 is your /usr file system, and it is mounted on the /usr directory. In this example, you will take space from the /usr file system and expand the root file system. Remember to back up any data you wish to preserve.

Now bring the system down and boot fx from the Command Monitor. Choose option 5 from the System Maintenance Menu. You see the Command Monitor prompt:

>>

Enter the following command at the Command Monitor prompt:

boot stand/fx --x 

Next you see the initial fx prompts:

fx: "device-name" = (dksc)

fx prompts you for each part of the disk name. You are offered a default option for each part of the disk name. The default option is dksc, which indicates a SCSI disk. To choose the default option, simply press <Return> at the prompt. To specify another disk type, enter the appropriate part of the disk name at the prompt. For example, at the first prompt, you might want to enter ipi if you are repartitioning an ipi disk, as opposed to a SCSI disk.

You see several other prompts of the type shown above before you see the first fx menu. The prompts ask you to specify the disk controller number and drive number. The default values at these prompts always specify the root disk of the workstation or server. Once you have specified the controller and disk number, you see the fx main menu:

---- please choose one (? for help. .. to quit this menu)----
[exi]t               [d]ebug/                [l]abel/
[b]adblock/          [exe]rcise/             [r]epartition/
fx>

The exit option quits fx, while the other commands take you to sub-menus. (The slash [/] character after a menu option indicates that choosing that option leads to a sub-menu.) For complete information on all fx options, see the fx reference page. To partition the drive, choose the [r]epartition option by entering r and then pressing <Return>. Next you see the volume table of contents for the root disk, or the disk you specified when fx was started, followed by the repartition menu:

----- partitions-----
part   type      cyls     blocks        Megabytes(base+size)
0:     efs       7+80     2835+32400    1+16
1:     rawdata   87+202   35235+81810   17+40
6:     efs       289+1269 117045+513945 57+251
7:     efs       7+1551   2835+628155   1+307
8:     volhdr    0+7      0+2835        0+1
10:    entire    0+1550   0 + 630990    0+308
capacity is 631017 blocks
---- please choose one (?for help .. to quit this menu)----
[ro]otdrive      [o]ptiondrive      [re]size      [e]xpert
fx/repartition> 

Choose the resize option to change the size of partitions on the disk. You see the following warning message:

Warning: you will need to re-install all software and restore use data from backups after changing the partition layout. Changing partitions will cause all data on the drive to be lost. Be sure you have the drive backed up if it contains any user data. Continue?

Answer y to continue with the repartition. You see the next warning message:

After changing the partition, the other partitions will be adjusted around it to fit the change. The result will be displayed and you will be asked whether it is OK, before the change is committed to disk. Only the standard partitions may be changed with this function. Type ? at prompts for a list of possible choices.
fx/repartition/resize: partition to change = (swap)

The prompt after the warning message offers the swap space partition as the default partition to change, but in this example we will designate the root partition to be resized. Enter root and press <Return> at the prompt. You see the current information for the root partition:

current:  type efs   base: 7 cyls,   2835 blks   1 Mb
                    len: 80 cyls,   32400 blks  16 Mb
fx/repartition/resize: partitioning method = (megabytes)

Press <Return> to use megabytes as the method of repartitioning. Other

options are to use percentages of total disk space, numbers of disk blocks, or numbers of disk cylinders. Megabytes and percentages are the easiest methods to use to partition your disk. Next you see the following prompt:

fx/repartition/resize: size in megabytes (max 307) = (16)

Now you must select the new size of the root partition. The default option presented to you is to retain the current size of 16MB. For this example, we will increase the size to 20MB. Enter 20 at the prompt and press <Return>. Next, the new partition map is displayed:

-----partitions-----
part     type     cyls      blocks           Megabytes
0        efs      7+101     2835+40960       1+20
1        rawdata  108+180   43795+73250      21+36
6        efs      289+1269  117045+513945    57+251
8        volhdr   0+7       0+2835           0+1
10       entire   0+1558    0+630990         0+308

Use the new partition layout? (no)

Note that the 4 megabytes that you added to your root partition were taken from the swap partition. Ultimately, we want those megabytes to come from the /usr partition, but for the moment, accept the new partition layout. Enter yes at the prompt and press <Return>. The new partition table is printed again, along with the total disk capacity. Then you are returned to the repartition menu. Select resize again to transfer space from the /usr partition to the swap area.

fx/repartition>resize

You see the same warning messages again, followed by the prompt:

fx/repartition/resize: partition to change = (swap)

This time press <Return> to change the size of the swap partition. You see:

current: type rawdata  base:108 cyls, 43795 blks   21 Mb
                       len: 180 cyls, 73250 blks   36 Mb
fx/repartition/resize: partitioning method = (megabytes)

Press <Return> again to use megabytes as the method of repartition. You see the following prompt:

fx/repartition/resize: size in megabytes (max 307) = (36)

Since we added 4 megabytes to expand the root file system from 16 to 20 megabytes, enter 40 at this prompt to expand the swap space to its original size. (If your system is chronically short of swap space, you can take this opportunity to add some space by entering a higher number.) Press <Return> after you enter the new size of the partition. You see the new partition table:

-----partitions-----
part     type     cyls      blocks         Megabytes
0        efs      7+101     2835+40960     1+20
1        rawdata  108+202   43795+81920    21+40
6        efs      310+1247  125715+505275  61+247
8        volhdr   0+7       0+2835         0+1
10       entire   0+1558    0+630990       0+308

Use the new partition layout? (no)

Note that the partition table now reflects that 4 megabytes have been taken from partition 6 (/usr) and placed in the swap partition. Enter yes to accept the new partition table and press <Return>. The new partition table is displayed again. Enter .. at the prompt to move back to the fx main menu. Once you see the main menu, enter exit to quit fx.

Your disk is now repartitioned, but new file systems must be made on the partitions. Boot inst(1M) from your distribution media or over the network and choose the admin option from the main menu. From the admin menu, choose the mkfs option to make new file systems on your root and /usr file systems before you reinstall your software and user files. The commands you use are similar to these:

mkfs /dev/dsk/dks0d1s0 
mkfs /dev/dsk/dks0d1s6 

When this is done, boot your system and enter the System Recovery menu of the System Maintenance Menu. From this menu, you should be able to recover your system using the Backup(1) or System Manager backup tape you made earlier. If you did not back up your system using one of those two options, you must reinstall the operating system on your disk and then use the utility you used to make the tape to restore your files.


Swap Space

The IRIX operating system uses a portion of the disk as swap space for temporarily saving part or all of a user's program when there is not enough physical memory to contain all of the running programs. If you run many very large programs, you might run out of swap space.

Use swap -l to monitor swap space use. If you find that you are running out of swap space, two solutions are available: you can add more memory, or you can add more swap space. Adding swap space does not improve the performance of large programs, but it permits them to run successfully.

IRIX allows programs occupying more space than the system limit to run, since each program is only partially loaded into memory at any given time. One of the effects of this policy is that IRIX has to preallocate swap space based on likely future usage, and sometimes this prediction is incorrect. When the swap space is actually needed, IRIX allocates the most convenient available space, not the actual space allocated. So the physical allocation is separate from the accounting allocation.

If your system preallocates all your swap space, but the space has not yet been used, it may appear that your system is running out of swap space when it is not. It is possible that your system has simply preallocated the rights to future swap space to existing processes, and no new processes can allocate space due to the strict swap space accounting in this version of IRIX.

In previous versions of IRIX, available swap space accounting was collected, but ignored by default. If a system actually ran out of physical swap space and more swap space was immediately needed, the system made the space available by terminating processes with low priority (such as batch jobs). This strategy is call ``lazy'' accounting. The kernel tunable parameter availsmem_accounting could be set to enforce strict swap space accounting. The drawback of lazy accounting is that when IRIX runs out of physical swap space, processes are terminated before they are complete.

In the current version of IRIX, strict swap space accounting is always in effect, but the ability to add both physical and virtual swap space through ordinary system files allows the administrator to add swap space or to effectively turn off strict swap space accounting, without having to either repartition the disk or reconfigure and reboot the system.

If your system is experiencing processes being denied stack growth or new processes due to a stated lack of swap space, and you believe that there is adequate physical space, add the following entry to your /etc/fstab file:

/usr/swap swap swap pri=4,vlength=204800 0 0 

Then give the command:

mkfile -v 0b /usr/swap 

The file (/usr/swap) will be zero-length, so you have added only virtual swap space, and no real swap area. Your kernel should then allow more processes to execute. However, when an attempt is made to access more than the system limit, IRIX swaps the largest running program out of memory.

To determine how much swap space is already configured in your workstation, use the swap(1M) command:

swap -l 

If you are running applications that require the system to swap out programs frequently, you may also want to fine-tune the swap area of the disk used by the operating system. For more information on this process, see Chapter 5, "Tuning System Performance."

Swap -s command

The swap -s command is a very useful tool for determining if you need to add swap space of some sort. The output of the swap -s command looks something like:

total: 0 allocated + 64248 reserved = 64248 blocks used, 17400 blocks available

Where the fields displayed are as follows (see the swap(1M) reference page for more details):

allocated

The number of 512 bytes blocks allocated to private pages (for example, pages that contain data that is in use.)

reserved

The number of 512 byte blocks currently allocated but not yet marked as private pages (the space has been claimed, but is not yet being used.)

blocks used

The number of 512 byte blocks either allocated or reserved (the total number of allocated and reserved blocks)

blocks available


The number of 512 byte blocks available for future reservation and allocation (the total swap shown by the swap -l command less the number of blocks used)

Given the following sample swap -s output:

total: 0 allocated + 34200 reserved = 34200 blocks used, 47448 blocks available

It can be seen that 0 swap blocks are in use, 34200 have been reserved, but not used, which leaves 47448 blocks available for reservation. So, at this point in time, the system above is not swapping, but the programs running on the system have requested approximately 17 Megabytes of swap space, just in case they will need to grow.

Note: 10000 blocks is approximately equal to 5 Megabytes

Many applications reserve what is known as virtual swap space. That is, they request more memory than they will ever need to grow into. The actual size of the application is the amount of physical system resources that the application is utilizing. The virtual size of the application is the amount of system resources it is utilizing plus the amount of extra resources requested but not in use. This is the case in the above example; space has been reserved, but is not in use.

Negative swap space

Let's look at another example of swap -s output:

total: 41920 allocated + 58736 reserved = 100656 blocks used, -19400 blocks available

It may seem worrisome that the swap space available is a negative number. What this means, though, is that some of the allocated/in use pages are located in main memory (RAM). The swap -s output does not take main memory into account. The data that is shown in the negative is actually data that is contained in system memory.

It appears that approximately 20 Megabytes of physical swap space is in use, as shown by the amount of allocated space. Therefore, the system is not out of physical swap space. If there was no more physical swap space, the number of allocated blocks would be very close/the same as to the number of blocks reported by the swap -l command. Approximately 30 additional Megabytes of swap space has been requested, shown by the requested field, giving a total of 50 Megabytes requested and/or in use. This appears to leave us with an overrun of 10 Megabytes.

Another way to think of that negative number is that the negative number is the amount of physical swap space minus the number of blocks used (allocated + requested). So, as long as this total is less negative than approximately the amount of physical memory (obtained from the hinv command) that you have, you have not overrun your system.

The following example shows swap -s output of a system that has most likely come to its swapping limit:

total: 76920 allocated + 23736 reserved = 100656 blocks used, -19400 blocks available

Notice that the total numbers are the same, but the number of allocated blocks is much higher. If the swap -l in this example were to report 81000 blocks of physical swap space on the system, it is easy to see that there are only 4000 physical blocks that are not in use.

If swap -s reports a negative number, increase virtual swap when your system is not near its physical limits. This will allow your system to allocate space to those applications that grab more space than they actually need. To do this you can turn on virtual swapping by executing the following commands:

su 
chkconfig vswap on 
/etc/init.d/swap start 

This will allocate more swap space, or space that can be reserved, but not allocated. Please see the /etc/init.d/swap file and the swap(1M) reference page for more information.

If virtual swapping is already chkconfig'd on or if the number of allocated blocks is approaching the number of blocks reported by the swap -l command, the only way to remedy the situation would be to add more physical memory or swap space. Please see the swap(1M) reference page for more information regarding adding swap space (whether through another disk partition or a swap file).

Increasing Swap Space on a One-Disk System

Suppose you don't have the luxury of a multiple-disk system. This section explains how to increase the size of the swap partition on a single disk. You can increase your available swap space by repartitioning your disk, as described earlier in this chapter, or you can add space with the swap(1M) command.

The swap(1M) command allows you to designate a portion of any disk partition as additional swap space. You can add swap space at any time and delete the new swap space when you no longer need it. There are several options available with this command, and the command is described completely in the swap(1M) reference page, but the most convenient method to use is to specify a normal system file as additional swap space.

To specify a file as additional swap space, you first create an empty file of appropriate size with the mkfile(1M) command. For example, if you wish to add 10 megabytes of swap space to your system, and you wish that space to be taken from the /usr file system, use the following mkfile command:

mkfile -v 10m /usr/tmp.O/moreswap 

In this command, the -v option directs mkfile to be verbose in its output to you, which means that you see the following message as a confirmation that the file has been created:

/usr/tmp.O/moreswap 10485760 bytes

If you do not specify the -v option, mkfile does its work silently. The second field in the mkfile command is the size of the file. In this case, 10m specifies a file that is 10 megabytes in size. You can use b, k, or m as a suffix to the size argument to indicate that the size number is in bytes, kilobytes, or megabytes, respectively. For example, the following commands all produce files of 10 megabytes:

mkfile -v 10485760b /usr/tmp.O/moreswap 
mkfile -v 10240k /usr/tmp.O/moreswap
mkfile -v 10m /usr/tmp.O/moreswap

Once your file is created, you can use the swap command to add it as additional swap space on the system. When you make your file, be certain that the file resides in the file system from which you wish to take the space. The /usr/tmp.O directory is a good place to use if you wish to use space from the /usr file system. Typically /usr will have more available space than the root file system (/). Note, however, that you can also use file systems mounted remotely via NFS. Complete information on using remote mounted file systems for swap space is available in the swap(1M) reference page.

To begin using your new file as swap space, give the following command:

/sbin/swap -a /usr/tmp.O/moreswap

The -a option indicates that the named file is to be added as swap space immediately. To check your new swap space, use the command:

swap -l 

This command lists all current swap spaces and their status.

To make your new swap file permanent (automatically added at boot time), add the following line to your /etc/fstab file:

/usr/tmp.O/moreswap    swap    swap   pri=3  0  0

Note that if you create a swap file in the /tmp directory of your root file system, the file is removed when the system is booted. The /usr/tmp.O directory of the /usr file system is not cleaned at boot time, and is therefore a better choice for the location of swap files. If you wish to create your swap files in the root file system, first create a /swap directory, and then create your swap files within that directory.

Increasing Swap Space on a Multidisk System

Adding more swap space to a multidisk system can be done just as if you were adding space on a single disk system. You can always use the mkfile(1) and swap(1M) commands to add a swap file to your system. However, if you wish to add dedicated swap space in a new disk partition, follow the instructions below.

To double the default amount of swap space, you can use another disk drive as follows:

Partition/slice 
    0        Temporary space (mount as /tmp) 
    1        Swap space 
    6        usr2 

Note that the operating system continually writes onto the partition that is used as swap space, completely destroying any data that might exist there. Be sure that the swap partition does not overlap any user file system partitions. Verify the size of the swap partition in blocks.

Once you choose a partition, create the file /etc/init.d/addswap to add this partition permanently as a swap partition. Place a line of the following form in the file:

swap -a /dev/dsk/devicename 0 length 

The argument devicename is the device name where the swap partition is located (such as ips0d1s1), and length is on blocks. Once you create this file, use the chmod(1) command to enable execute permission on the file. The command is:

chmod +x addswap 

Next, create a symbolic link to the new file with the command:

ln -s ./addswap ../rc2.d/S59addswap 

The /etc/rc2.d directory controls the system activities that take place when the system boots into multiuser mode (run level 2). The ``S'' at the beginning of the symbolic linkfile that you created indicates that the commands in the file should be started when the system initiates this run level. Symbolic link files that begin with the letter ``K'' indicate that the commands described in the file should be killed. The number following the S or K at the beginning of the linkfile name indicates the sequence in which the commands are executed.

You can also modify the file /etc/fstab to document (in the form of a comment) that the chosen partition is being used as a swap partition.


Logical Volumes and Disk Striping

The previous section discussed the use of partitions, which cause one disk drive to behave as if it were several smaller drives. Several partitions may be built up into one logical disk drive through the use of logical volumes. A logical volume might include partitions from several physical disk drives and, thus, be larger than any of your physical disks.

These logical volumes behave like regular disk partitions. File systems can be created on them just as on a regular disk, and then mounted and used in the normal way. The only difference is that they can be built from several partitions and across more than one physical disk device. A logical volume disk driver, referred to as lv, maps requests on logical volume devices onto the underlying physical devices, in a manner transparent to the user.

The drawback to logical volumes is that all disks must function correctly at all times. If you have a logical volume set up over three disks and one disk goes bad, the information on the other two disks will be unavailable, and must be restored from backups.

The exception is that the root partition must never be a logical volume, since the utilities required for logical volume initialization must reside on it. Also, swap space cannot be configured as a logical volume, since the disk is used as raw space with no file system. Use the swap -a command to increase your swap space on a second disk. This procedure is documented above in "Increasing Swap Space on a Multidisk System".

You can use logical volumes to extend an existing file system onto a new disk drive, using the growfs(1M) command. The growfs command is also discussed in "Changing File System Size".

IRIX allows for the creation of striped logical volumes. Disk storage on a striped volume is allocated alternately among partitions. The granularity, or width, of the stripes may optionally be set.

The concept of logical volumes thus adds a layer of abstraction to the concept of the physical disk drive and allows more efficient disk use.

Logical volumes are administered by means of a file defining the volumes known to the system (/etc/lvtab) and three utilities: mklv, lvinit, and lvck. These are described in more detail below.

You can create a logical volume by adding an entry to /etc/lvtab and then running mklv. Existing logical volumes are ``connected'' to the system at boot time by lvinit; it is not necessary to run lvinit explicitly.

The lvck program is a diagnostic tool. You need to run this only if there are problems.

The /etc/lvtab File

The file /etc/lvtab contains a table of the logical volumes used by IRIX. It is read by the utilities that create, install, and check the consistency of logical volumes. You can modify it with a text editor to add new logical volumes or to change existing ones.

The entries have the form:

volume_device_name:[volume_name]:[options]:devs=device_pathnames 

The volume_device_name is of the form lvn, where n is an integer by default between 0 and 9. The logical volume is accessed through the device special files /dev/dsk/lvn and /dev/rdsk/lvn.

The volume_name is an arbitrary identifying name for the logical volume. This name is included in the logical volume labels on each of the partitions making up the logical volume. It is then used by utilities to verify that the logical volume on the disks is actually the volume expected by /etc/lvtab. Any name of up to 80 characters can be used; you should probably choose something that other users can identify. You can leave this field blank, but this is not recommended.

The options are specified with the syntax option_name=number, with no spaces surrounding the equal sign. You may specify more than one option, separated by colons. Currently recognized options are stripes and step.

The stripes option creates a logical volume that is striped across its constituent devices. The number of device pathnames must be a multiple of this parameter. This specifies the number of ways the volume storage is striped across its constituent devices. For example, suppose you have a logical volume with 6 constituent devices and a stripes parameter of 3. The logical volume is set up to stripe across the first three devices until they are filled, then to stripe across the second three.

The step option further specifies the granularity, or step size, with which the storage is distributed across the components of a striped volume. Granularity is measured in disk blocks. The default step is the device tracksize, which is generally a good value to use.

The device pathnames are listed following any options. They are the block special file pathnames of the devices constituting the logical volume. Device pathnames must be separated by commas. The partitions named must be legal for use as normal data storage, and not as dedicated partitions, such as swap.

The mklv(1M) Command

The mklv(1M) utility constructs the logical volumes by writing labels for the devices that will make up the volume. The general format of the mklv(1M) command is:

/etc/mklv [-f] volume_device_name 

mklv reads the entry in /etc/lvtab identified by volume_device_name and constructs the logical volume described. It labels the devices appropriately, then initializes the logical volume device for use.

An existing logical volume can be extended by adding device pathnames to the /etc/lvtab entry, then running mklv on that entry.

Normally, mklv checks all the named devices to see if they are already part of a logical volume or contain a file system. The option -f forces mklv to skip those checks.

Various errors can arise when trying to create a logical volume. For example, one of the specified disks might be missing, or the new lvtab entry might have a typographical error. The man page for mklv describes the possible error messages and their meanings.

The lvinit(1M) Command

/etc/lvinit(1M) initializes the logical volume device driver that allows access to disk storage as logical volumes. It works from entries in /etc/lvtab, as does mklv. Its form is:

lvinit [volume_device_names] 

Without arguments, lvinit initializes every logical volume with an entry in /etc/lvtab. With arguments, it initializes only those named in the argument list. The component devices of the logical volumes to be initialized must have been previously labeled as members of the volume by mklv.

lvinit is run automatically at system boot time. It is not normally necessary to invoke it explicitly. It performs sanity checks when initializing the volumes and prints messages describing any error conditions.

If error messages from lvinit are seen during system boot, you will want to run lvck to obtain more information about the problem.

The lvck(1M) Command

The lvck(1M) command checks the consistency of logical volumes by examining the logical volume labels of devices constituting the volumes. Possible errors and the messages from lvck that describe them are detailed in the lvck man page.

Invoked without parameters, lvck checks every logical volume for which there is an entry in /etc/lvtab.

Invoked with the name of a logical volume device, for example, lv0, lvck checks only that entry in /etc/lvtab.

Invoked with the -d flag, lvck ignores /etc/lvtab and searches through all disks connected to the system in order to locate all logical volumes present. lvck prints a description of each logical volume found in a form resembling an lvtab entry. This option facilitates recreation of an lvtab for the system, if necessary. You might use this option if, for example, /etc/lvtab became corrupted or if you somehow lost track of which disks were connected during a system reconfiguration.

Invoked with the device block special file name of a disk device, lvck prints any logical volume label that exists for that device, again in a form resembling an lvtab entry. Note that this mode of lvck is purely informational; no checks are made of any other devices mentioned in the label.

lvck has some repair capabilities. If it determines that the only inconsistency in a logical volume is that a minority of devices have missing or corrupt labels, it is able to restore a consistent logical volume by rewriting good labels. lvck queries the user before attempting any repairs on a volume.

Examples of Logical Volumes

Logical volumes can be used to:

The following sections give examples of the above listed uses.

Creating a New File System on Newly Added Disks

Suppose that new disks are added to your system in order to provide storage for a new file system. You can assume that they are connected and initialized correctly.

Decide which partitions of these new disks you want to use for the new file system. (Normally, when adding a new file system like this, you will want to use the whole of all the disks, that is, partition 7 of each disk.)

Decide if you want to make a striped volume. The benefit of striping is improved throughput; however, it does impose some minor restrictions. If you want to stripe, all the drives (or to be exact, the partitions on them that you are using) must be exactly the same size. If you later want to add more drives to the volume, you must add them in units of the striping. That is, if you want to add disks to a 3-way striped volume, you must add them three at a time.

Also, to obtain the best performance benefits of striping, you should arrange to connect the disks you are striping across on different controllers. In this arrangement, there are independent data paths between each disk and the system. However, a performance improvement of up to 20% can be obtained using SCSI disks striped on the same controller.

Add an entry to /etc/lvtab containing the pathnames of the new disks that are to be part of the new volume. (See the lvtab man page for details of the syntax of lvtab entries.) For example:

lv0:proj:stripes=2:devs=/dev/dsk/dks0d2s7,/dev/dsk/dks1d0s7 

In this example, the logical volume named proj consists of two partitions from two separate disks. Storage is striped across the two disks. (Note that it is not normally necessary to specify the step parameter. An appropriate value will be used automatically.)

Run mklv to place the labels on the new disks to identify them as parts of a logical volume:

mklv lv0 

Device names /dev/dsk/lv0 and /dev/rdsk/lv0 have been created. These can now be accessed exactly like any regular disk partition.

To create the new file system, run mkfs on /dev/rdsk/lv0 as you would run it on a regular disk:

mkfs /dev/rdsk/lv0 

Then, you can mount /dev/dsk/lv0 exactly as you would mount a file system on a regular disk. You may want to add an entry to /etc/fstab to mount this file system automatically, for example:

/dev/dsk/lv0 /some_directory efs rw,raw=/dev/rdsk/lv0 0 0

When creating a striped volume, all the partitions must be the same size. Unfortunately, the default partitioning for drives of similar sizes but from different manufacturers can be slightly different. If this is the case, you will see an error message similar to this from mklv:

lv0:proj:stripes=2:devs= \ 
        /dev/dsk/dks0d2s7,  \ 
        /dev/dsk/dks1d0s7 <INCORRECT PARTITION SIZE> 

In this case, you need to adjust the partition sizes; see "Changing Hard Disk Partitions" for instructions.

Extending an Existing File System

Suppose you have a file system (on a regular disk) that is full, and you would like to have more space available in it.

You need a new disk (or at least a partition on a disk) that you can dedicate to providing this extra space. This new partition must not, of course, be currently used for anything or contain any valuable data. Perform the following steps:

    Make a backup of the file system you are going to extend.

    Add an entry to /etc/lvtab for a new logical volume. The first device in this volume should be the device on which the existing file system resides. This is followed in the description by the new device you are adding. For example:

    lv2:new development volume:devs=/dev/dsk/ips0d1s7,   /dev/dsk/ips0d2s7 

    In this example, /dev/dsk/ips0d1s7 is the disk on which the existing file system resides, and /dev/dsk/ips0d2s7 is the added disk. When using a logical volume to extend an existing file system, the logical volume may not be striped. Before proceeding further, you must unmount the file system.

    Run mklv to place the labels on the disks that identify them as parts of a logical volume:

    mklv lv2 

    mklv mentions that one of the devices contains a file system and asks if you want to proceed. This is a safety measure to help avoid inadvertently performing logical volume operations on disks that do contain important information: answer y

    You find that device names /dev/dsk/lv2 and /dev/rdsk/lv2 have been created.

    Extend the file system to take advantage of the newly added space. This is done with growfs. For this example, type:

    growfs /dev/rdsk/lv2 

    This expands the file system into the new space while leaving its existing contents intact. From now on, you can access this file system using the logical volume device rather than the original disk device. So you might want to run fsck on /dev/rdsk/lv2 (in the example) to verify that your file system is valid (and has indeed increased in size).

    Mount the logical volume device (/dev/dsk/lv2) rather than the original disk device; you will need to update your /etc/fstab to reflect this. Don't forget to change raw also.

It is worth noting that you can repeat this expansion process indefinitely. You can always add a new disk, add its name to the lvtab entry, and then rerun mklv and growfs to further expand the file system.


The Bad-Block Handling Feature

Through the bad-block handling feature of the fx(1M) command, IRIX provides mechanisms for:

Note that actual bad-block handling is done by the disk controller. The IRIX bad block feature provides a way to tell the controller which blocks are bad and to tell the controller to make use of its bad-block handling capabilities. There is no comparable feature for tapes.

Virtually every disk has bad blocks, many of them detected by the manufacturer with very sensitive analog equipment. These bad blocks are known as the manufacturers bad block list and are also recorded on a sheet of paper attached to the disk or, on SCSI drives, are saved in PROM on the disk. The bad blocks mapped by the manufacturer are not the only bad blocks that will appear on the disk. It is not uncommon for a new defect to appear once a disk is in the field. These new defects are known as growndefects.

As long as you treat a disk drive with care, and do not subject it to excessive vibration and shock, blocks on the drive should seldom go bad. However, if a new bad block does occur, the data stored in the bad block may be lost, and the disk may be unusable in its current state.

The bad-block handling feature lets you work around the bad block and continue to use the good sections of the disk. However, the only way to recover information that is lost if a block goes bad is to retrieve it from a backup.

When Is a Block Bad?

A block is termed `` bad'' when it cannot reliably store data. This is discovered typically when an attempt is made to read data from that block, and the read fails. Note, though, that a read fail does not always indicate a bad block. A read fail might also mean problems in the format of the disk or a failure in the controller or the hardware. One way to make an initial determination is if the failures are frequent and involve large numbers of files or directories, or if the system only occasionally experiences such problems. A major failure of the controller or hardware generally results in immediate and massive errors, while a bad disk block does not affect the operation of other parts of the disk.

Disk write failures are far less common than read failures. A write failure generally signals a problem with the format of the disk or a more basic failure in the disk or disk controller hardware. While all failures are reported to the system console, the bad-block handling feature cannot distinguish actual bad blocks from format problems or hardware problems. To fix format problems or hardware errors, you need to reformat the disk or get the hardware repaired. In either case, you should contact your service representative. Bad blocks, though, can be mapped out of use by fx(1M) without difficulty. Note that you should never need to reformat a SCSI disk. Simply map the bad tracks out using the fx(1M) command.

How to Recognize a Bad Block

Certain error messages indicate bad blocks. The following are examples of some of the error messages you may see in the console window or in the file /usr/adm/SYSLOG:

Bad blocks may also be the cause of file system corruption. If you have a corrupt file system, you may want to run an fx exercise on the disk to see if this file system problem was caused by a problem with the disk media. A corrupt file may (rarely) crash the system with a SEGV (segmentation violation).

A segment of your disk is used as virtual memory or swap space. To the CPU, this section of the disk is seen as part of real memory. A disk error in this partition may also crash the system. The following examples are some of the error messages you may see in the console window or in the file /usr/adm/SYSLOG:

What Makes a Block Unreliable?

A hard disk uses the magnetic properties of the film coating on disk surfaces to record information. The information is recorded by applying a magnetic ``charge'' to each point on the disk. This charge is similar to the physical changes in the groove of a phonograph record. Just as the variations in the groove of a record cause the phonograph needle to vibrate and reproduce sound, so the magnetic fluctuations on the disk surface cause identical fluctuations in the magnetic field of the disk head. This fluctuation is read by the disk hardware and translated into data. The process of writing on a hard disk is similar, but in reverse. The disk head generates a magnetic field as it passes over the disk, applying that magnetic force to the coating on the disk.

The information on your disk is recorded with a very high density. Because of the density, the significance of small variations in the magnetic properties of the disk coating is magnified. The variations mean that a given portion of the coating may store some magnetic patterns better than other magnetic patterns. Normally, these variations are insignificant compared to the amount of data being recorded or retrieved. When the variations get to the point where the internal error checking can no longer guarantee that what is written will match what will be read, the area of disk is unreliable. If the data pattern that has been written in a particular area of disk matches the ``preferences'' of that area of the disk coating, the bad block may escape recognition for a while. If the disk is active, however, the bad block will eventually be discovered.

How Are Bad Blocks Fixed?

A small portion of the disk is set aside from the normally accessible portion of the disk. This portion, called the alternate-track area, cannot be reached by normal IRIX system commands and system calls and is used to provide replacement storage for bad blocks.

Most disks come with a few manufacturing defects. Bad blocks detected in the manufacturer's quality control checks are identified on a label when the unit is delivered. The bad-block handling feature provides special software for remembering bad blocks that have been found and for mapping any additional ones that are found. If a substitute block becomes bad, the software even remaps the original bad block to a new substitute block.

Bad Blocks: Questions and Answers

Bad blocks are detected when input/output disk operations fail for several successive attempts. This means that data being input or output are lost, but the system can restore use of the disk by mapping bad blocks to surrogate blocks that are readable.

The following are some often-asked questions about bad blocks:

Mapping Out Bad Blocks With fx(1M)

Fixing bad blocks with fx(1M) is a fairly simple matter. To begin, prepare your system for complete reinstallation and recovery. Make a complete backup of all your system and user files with your preferred backup tools. Then follow these steps:

    Become superuser and invoke fx(1M). You can either bring the system down and boot fx in standalone mode or you can invoke fx from the command line.

    Once in fx, select the disk you wish to scan as you are prompted. You see the following prompts:

    fx: ``device-name'' = (dksc)
    fx: ctlr# = (0) 
    fx: drive# = (1)

    If you press <Return> at each prompt, you are selecting the default value (displayed in the parentheses) for that prompt. The default values select your root disk. If you wish to select a different disk, for example dksc(0,2) type the correct disk information at the prompt before you press <Return>. For the purposes of this example, we will use the root disk. You see:

    ...opening dksc(0,1,)
    Warning: This disk appears to have mounted file systems
             Don't do anything destructive, unless you are
             sure nothing is really mounted on this disk.
    ...controller test...OK
    Scsi drive type == CDC    94171-9       0104
    ---please choose one (? for help  .. to quit this menu)---
    [exi]t          [d]ebug/        [l]abel/
    [b]adblock/     [exe]rcise/     [r]epartition/
    fx>

    Select the exercise option from this menu. The badblock option is used only to display the current bad block table and to add faulty blocks that are not automatically added by the exercise option.

    The exercise menu gives access to functions intended for surface analysis of the disk to find bad blocks. Only read-only tests are possible in normal (non-expert) mode. Destructive read-write tests are allowed in expert mode. For complete information on expert mode, see the fx(1M) reference page; this example is done on normal mode.

    You see the following menu:

    ---please choose one (? for help  .. to quit this menu)---
    [b]utterfly      [r]andom      [st]op_on_error
    [e]rrlog         [se]quential
    fx/exercise>

    Now you choose how your disk will be scanned for bad blocks. For all choices except random, the scan is done one cylinder at a time, unless an error is found. If an error is found, the scan is repeated one sector at a time to find the actual block that is bad, except for drive types that require the entire disk track to be mapped (such as ESDI drives).

    For each unrecoverable error that is found, the failing block is added to the bad block list automatically. The number of retries performed by fx itself defaults to 3. You can set the number of retries to any number, including 0, using the -r option when you invoke fx. Most disk drivers, and some drives themselves, do retries on their own before reporting an error. For most SCSI drives, the number of retries performed may be set by using the /label/set/param menu of fx.

    The stop_on_error menu item does not begin a scan. Selecting this menu option tells fx that while the scan is happening, fx should stop each time it detects an error and ask you if you want to map the bad block. Whether you answer yes or no, you are then asked if you want to continue exercising. This can be useful when trying to determine how many errors a disk has before you commit yourself to mapping the bad blocks.

    The butterfly option invokes a test pattern in which successive transfers cause seeks to widely separated areas of the disk. This is intended to stress the head positioning system of the drive, and will sometimes find errors that do not show up in a sequential test. It prompts for the range of disk blocks to exercise, number of scans to do, and a test modifier. Each of the available test patterns may be executed in a number of different modes ( read-only, read-cmp, etc) that are described below.

    The errlog option prints the total number of read and write errors that have been detected during a preceding exercise, showing both soft and hard errors. If the -l option is used, the blocks on which errors occurred are also reported. Soft errors are those errors for which a driver reported an error, but fx was able to successfully complete the scan on a retry. Blocks with soft errors are not forwarded to the bad track table automatically, but since a bad block may read successfully and still generate a driver error, it is often useful to compare the soft errors with the hard errors if troubles persist.

    The random option invokes a test pattern in which the disk location of successive transfers is selected randomly. It is intended to simulate a multiuser load. Like the butterfly test, it prompts for range of blocks to exercise, the number of scans, and any modifier you may want. This does random sized scans (from 1 block to the total cylinder size) as well as seeking to random locations on the disk. It is useful for finding problems on drives with seek problems, and for finding errors in the caching logic or hardware.

    The sequential option invokes a test pattern in which the disk surface is scanned sequentially. As with the butterfly test, it prompts for the range of blocks to exercise, the number of scans, and any modifier you may want.

    The stop_on_error option toggles; it determines whether fx proceeds automatically when errors are detected. The default is to proceed automatically. If stop_on_error is set, then you are prompted at each error whether you want to continue or not. If you continue, you are then asked if you want to add the failing block to the bad block list. This can be useful if you want to find all the failing bad blocks but not actually add them to the bad block list.

    The butterfly, random, and sequential tests prompt for a modifier that determines the type of transfer that will occur during the test patterns. Possible modifiers are:

    rd-only 

    Performs reads only. The value of read data is ignored. The test detects only the success or failure of the read operation.

    rd-cmp 

    Causes two reads at each location in the test pattern. The data obtained in the two reads is compared. If there is a difference, the block(s) that differ are considered bad.

    seek 

    Causes each block in the test pattern to be read separately. It is used to verify individual sector addressability. (This operation takes a great deal of time.)

    Select the operation you wish to use and press <Return>. Most bad block scans use the sequential option to scan the entire disk automatically, and do not use the stop_on_error option.

    As the scan progresses, fx displays some numbers and dots on your screen. These can be safely ignored unless you have chosen the stop_on_error option, in which case you may need to respond to prompts and make decisions about logging bad blocks. When the scan is completed, you may exit fx and resume normal system operation.

For complete technical information on the normal and extended modes of fx(1M), see the fx reference page.


Using Floppy Disks Under IRIX

There are a number of SCSI floppy disk drives available for use with your system. To install a floppy disk drive on an IRIX system, follow the hardware documentation that is furnished with your floppy drive to connect it to the computer.

If you are adding a floppy drive to a system that does not have one, the software configuration is taken care of automatically when the system boots. When the system boots, if hinv indicates that a floppy drive is installed, but there is no link to it through the /dev special device files, the MAKEDEV program is automatically invoked to add the proper device files.

If you are installing a floppy disk drive after your initial system installation, perform the following steps:

    Install the hardware.

    Log in as root (the Superuser) and enter these commands:

    cd /dev 
    ./MAKEDEV floppy 

    The MAKEDEV program creates the appropriate device nodes.

If you have removed a floppy drive and are installing one of a different type, follow these steps:

    Install the hardware.

    Log in as the superuser and enter these commands:

    cd /dev/rdsk 
    rm fds* 
    ./MAKEDEV floppy 

    The MAKEDEV program creates the appropriate device nodes according to the SCSI controller and drive number of the floppy drive. For example, a 3.5 inch drive configured as drive 2 on SCSI controller 0 would have the device node:

    /dev/rdsk/fds0d2.3.5 

    There are various options for the various different kinds of floppy devices supported. For example, your device node could have any of the following names, depending on which name suits the hardware you are installing:

    3.5     (720Kb 3.5" Floppy)
    3.5hi   (1.44Mb 3.5" Floppy)
    3.5.20m (20.1Mb Floptical)
    48      (360Kb 5.25" Floppy)
    96      (720Kb 5.25" Floppy)
    96hi    (1.2Mb 5.25" Floppy

    Use the following command to link your floppy disk device node with a convenient filename for access, typically /dev/floppy. Substitute the device node information for your floppy installation for the node name used here:

    ln -s /dev/rdsk/fds0d2.3.5 /dev/floppy 

Using a Floppy Drive With DOS and Macintosh Floppies

The mediad daemon automatically determines the format of a floppy disk inserted in your drive and, if it is a DOS or Macintosh floppy, automatically mounts the file system on your default mount directory. Once mounted, you can use typical IRIX commands such as cd, ls, and pwd with the file system. See the mediad(1M) reference page for complete information.

Using a Floppy Drive For IRIX File Transfer

You can use a floppy disk like a tape drive for IRIX file transfer. You can use the standard tape archive commands to write files to the floppy disk if it is in DOS format. Use the mkfp(1M) command to create the DOS file system on the disk. See the mkfp reference page for complete information. You can also use the command version of fx(1M) to format your floppy for file transfer use.

When you place files on a floppy disk, it is a good idea to write the format used, or the exact command used, to place the files on the disk. This makes it much easier for you (and others) to retrieve the files from the disk. Also, whenever possible, change directories to the directory that contains the file and place the file on the floppy using a relative pathname, rather than specifying the filename completely.

Also, be aware that using a floppy to transfer files to systems made by other manufacturers may mean that the same tools are not available on the receiving system. The tar, cpio, and dd tools are usually available on all UNIX systems, but it is a good idea to check beforehand.

In the following examples, the floppy device is given as /dev/rdsk/fds0d3.3.5. Your actual disk device name may be different.

Floppy File Transfer With tar

To place a copy of the file transfer.file on a floppy disk with the tar command, use the syntax:

tar cvf /dev/rdsk/fds0d3.3.5 transfer.file 

To retrieve the file, use the command:

tar xvf /dev/rdsk/fds0d3.3.5 transfer.file 

To retrieve all files from a tar floppy, use the command:

tar xvf /dev/rdsk/fds0d3.3.5 

or for high density disks:

tar xvf /dev/rdsk/fds0d3.3.5hi 

For complete information on tar and its options, see the tar(1) reference page.

Floppy File Transfer With cpio

To copy files with cpio, use the command:

ls transfer.file | cpio -oc > /dev/rdsk/fds0d3.3.5 

To retrieve the file again, use the command:

cat /dev/rdsk/fds0d3.3.5 | cpio -i 

For complete information on cpio and its options, see the cpio(1) reference page.

Floppy File Transfer With dd

This dd command copies a file to the default floppy device:

dd if=transfer.file of=/dev/rdsk/fds0d3.3.5 conv=sync 

The following command extracts the same file:

dd if=/dev/rdsk/fds0d3.3.5of=transfer.file conv=sync

Note that dd works only with single files. You can use tar or cpio to create an archive file, though, and then use dd to transfer that archive. If you attempt to extract the file on another brand of workstation and you experience an error, try adding the conv=swab statement to your extraction command line. For complete information on dd(1), see the dd reference page.


Tape Devices

Almost all workstations are configured with some sort of tape device for making backup copies of your files. Whether you maintain one system or a network of hundreds of workstations, you will eventually have to use and maintain some form of tape drive.

Adding a Tape Drive

To install a tape drive on an IRIX system, follow the hardware documentation that is furnished with your tape drive. Make sure you carefully follow any instructions regarding drive terminators.

If you are adding a tape drive to a system that does not have one, the software configuration is taken care of automatically when the system boots. When the system boots, if hinv indicates that a tape drive is installed, but there is no link to it through the /dev/tape file, the MAKEDEV program is automatically invoked to add the proper device nodes.

If you are installing a tape drive after your initial system installation, perform the following steps:

    Install the hardware.

    Log in as the superuser and enter these commands:

    cd /dev 
    ./MAKEDEV tape 

The MAKEDEV program creates the appropriate device nodes.

If you have removed a tape drive and are installing one of a different type, follow these steps:

    Install the hardware.

    Log in as the superuser and enter these commands:

    cd /dev 
    rm *tape 
    ./MAKEDEV tape tapelinks

The MAKEDEV program creates the appropriate device nodes and links the correct node for the drive to /dev/tape.

MAKEDEV Commands For Tape Drives

The MAKEDEV program supports these options for tape drives:

tape

Creates all the tps and xmt tape devices, then makes links to tape, nrtape, tapens, and nrtapens for the first tape drive found, if one exists. It first checks for xmt, then for SCSI in reverse target ID order.

qictape

Creates special files for 1/4-inch cartridge tape drives connected to an ISI QIC-O2 tape controller. See ts(7M) for details.

magtape

Creates special files for 1/2-inch tape drives connected to a Xylogics Model 772 tape controller. See xmt(7M) for details.

links

Creates both disk and tape special files.

tps

Creates special files for SCSI tape drives. See tps(7M) for details.

tapelinks

Makes only links to tape, nrtape, tapens, and nrtapens. Examine the target tapelinks in the script /dev/MAKEDEV for more information.

Tape Capacities

Tables 7-3 and 7-4 list the maximum tape capacities in megabytes (MB) for the tape formats IRIX supports. Note that these are maximum, not average capacities.

Table 7-3 : Cartridge Tape and DAT Capacities

Format Capacity (max.)
QIC24 60MB (only reads/writes QIC24)
QIC150 150MB with 600XTD and 6150 tapes (reads QIC24, writes QIC120 and QIC150), 120MB with 600A tapes (writes in QIC120 format) and 250MB with 6250 tapes
DAT 1300MB with 60 meter (1 hour) cartridge, 2000MB with 90 meter (1.5 hour) cartridge Uses the DDS (not DataDAT) format
8mm 2093MB with 112 meter (120 min.) P6 (US) cart 2279MB with 122 meter (90 min.) P5 (European) cart.



Note: Almost all DAT drives use DDS format. 8mm tapes are also available in P6 lengths of 15, 30, 60, and 90 minutes for the U.S., and lengths of 15, 30, and 60 minutes for Europe; the P6 cartridge is for NTSC, and the P5 is for PAL. The drive must be jumpered to match the cartridge type.

Table 7-4 shows maximum capacities for 9-track tapes. Note that 9-track tape capacities vary more than other types because of block size and tape length issues.

Table 7-4 : 9-track Tape Capacities

Length: Reel size: 200 ft.
6''
600 ft.
7''
2400 ft.
10.5''
3600 ft.
10.5''
BPI BLKSZ







800 512 1 3 10 15




8192 1.8 5.5 21




64K 2 6 23












1600 512 1.3 4 15 22




8192 3.5 11 41




64K 4 12 45












6250 512 3.2 10 37 56




8192 12 37 145




64K 15 44 175



Note: 3600-foot tapes use thin tape (1.3 mm). BLKSZ indicates block size in bytes.

Making Tape Drive Links

For more information on making tape drive links, see the ln(1) and mknod(1M) reference pages.

If you suspect that the tape device has not been properly created or that the links between the low level device name (for example, /dev/mt/tps0d3) and the symbolic name (for example, /dev/tape) are not correct, then you may want to run the MAKEDEV script with the following command sequence:

login root 
cd /dev  
rm *tape*  
./MAKEDEV [links or device-type] 

Device types can be:

Normally, the ./MAKEDEV tapelinks command is all that is needed and will create links for the following default device names: nrtape, nrtapens, tape, tapens.

dump(1M) Update for DAT Tapes

The dump command is used to back up all files in a file system, or files changed after a certain date to magnetic tape or files.

If you are using the dump command to perform an incremental file system dump with a DAT tape drive, use the following recommendation to specify the capacity in kilobytes or megabytes of the DAT tape.

Reduce the 4mm tape-length parameter by 40% for the 60-meter tape, and leave as is for the 90-meter tape (2.0 gigabytes). You may want to trim an additional 5% or 10%, if you want to be conservative.

Troubleshooting Inaccessible Tape Drives

Note: This section does not allow for customized installations and does not address complex multiple tape drive issues. You should take care not to violate your maintenance agreements.

Error Indications

The following are some examples of commands and error messages. This is not an exhaustive list.

Checking the Hardware

Use the hinv(1) command to see if the operating system recognized the tape drive at boot time. This is one of the most basic and critical tests to check hardware. (An output similar to the following is returned with the hinv command):

Iris Audio Processor: version A2 revision 4.1.0
1 100 MHZ IP22 Processor
FPU: MIPS R4010 Floating Point Chip Revision: 0.0
CPU: MIPS R4000 Processor Chip Revision: 3.0
On-board serial ports: 2
On-board bi-directional parallel port
Data cache size: 8 Kbytes
Instruction cache size: 8 Kbytes
Secondary unified instruction/data cache size: 1 Mbyte
Main memory size: 64 Mbytes
Integral Ethernet: ec0, version 1
Integral SCSI controller 0: Version WD33C93B, revision D
CDROM: unit 4 on SCSI controller 0
Disk drive: unit 1 on SCSI controller 0
Graphics board: Indy 24-bit
Vino video: unit 0, revision 0, Indycam connected

If hinv does not report an attached tape drive, then your operating system will not be able to use it. You need to check the installation of the hardware. What you can do at this time depends on what you can do with your computer within the confines of your personal ability and your maintenance support agreements.

Simple hardware checks would be:

If nothing that you do here causes hinv(1M) to report the tape drive, then the most likely problem is faulty hardware. Contact your support provider.

Checking the Software

If you are reasonably sure the tape drive is correctly installed on the computer, but your software does not seem to be able to use it, a possible cause for the problem is that the tape device's scsi address changes when other scsi devices are added to your system.

The system assumes that if /dev/nrtape exists and appears to be a tape drive of some kind, then it doesn't need to remake the default tape drive links of /dev/tape, /dev/nrtape, etc. It also assumes that the first tape drive that it finds will be the main tape drive. It searches for devices starting at the highest SCSI id numbers, so the tape device on SCSI ID 7 will get the default links before a tape device on SCSI ID 3.

The default tape drive for most commands is /dev/tape. If the tape drive installation proceeded correctly, you should have at least /dev/tape and /dev/nrtape special device files. You may have several others, depending on the type of tape drive.

A mt command can be used to confirm that /dev/tape exists and that the tape drive is responding. An output similar to the following from the mt status command confirms that:

Controller: SCSI
Device: ARCHIVE: Python 25601-XXX2.63
Status: 0x20262
Drive type: DAT
Media : READY, writable, at BOT

The following output means that you have another process accessing the drive right now:

/dev/nrtape: Device or resource busy

The following output appears when a special device file does not exist:

/dev/nrtape: No such file or directory

The output when a device file exists, but no hardware is responding at that address, is:

/dev/nrtape: No such device

If the hardware appears to be present, but /dev/tape does not appear to be valid, you should confirm the file links. Take the device unit number from hinv output:

Tape drive: unit 3 on SCSI controller 0: DAT

In this example the device unit number is 3 (This is likely to be different on your machine). Use the following ls command to confirm that /dev/tape is linked to the correct device (change the numeral 3 to the correct numeral for your drive):

ls -l /dev/tape /dev/mt/tps0d3* 
crw-rw-rw- 2 root sys 23, 96 Sep 21 11:11 /dev/mt/tps0d3
crw-rw-rw- 2 root sys 23, 97 Jun 20 05:55 /dev/mt/tps0d3nr
crw-rw-rw- 2 root sys 23, 99 Jul 8 09:57 /dev/mt/tps0d3nrns 
crw-rw-rw- 2 root sys 23,103 Jun 20 05:55 /dev/mt/tps0d3nrnsv 
crw-rw-rw- 2 root sys 23,101 Jun 20 05:55 /dev/mt/tps0d3nrv 
crw-rw-rw- 2 root sys 23, 98 Jun 20 05:55 /dev/mt/tps0d3ns
crw-rw-rw- 2 root sys 23,102 Jun 20 05:55 /dev/mt/tps0d3nsv 
crw-rw-rw- 2 root sys 23,100 Jun 20 05:55 /dev/mt/tps0d3v 
crw-rw-rw- 1 root sys 23,102 Jun 23 09:19 /dev/tape

The major and minor device numbers are the key, here. They are the 2 numbers separated by a comma:

crw-rw-rw- 1 root sys 23,102 Jun 23 09:19 /dev/tape

Match these numbers with one of the lines from /dev/mt. In our example, it should match to:

crw-rw-rw- 2 root sys 23,102 Jun 20 05:55 /dev/mt/tps0d3nsv

Compare the major and minor device numbers that are reported with /dev/tape and the ones reported for /dev/mt/tps0dX*. Is there a match? If not, remove /dev/tape and /dev/nrtape and run MAKEDEV as root from the /dev directory. Give the command:

./MAKEDEV tapelinks 

The MAKEDEV command can be very verbose in describing what it is doing. Your output may differ in the number of devices made and the unit number. Once it is complete, go through these same checks again to be sure of success.

The MAKEDEV command does not let you choose which tape device to link to. You will need to make the links by hand if MAKEDEV does not default to the drive that you wish to use.

This covers the basic problems that administrators experience regarding missing tape drives. See the following reference pages for more information on the commands used in this section: mt(1), ls(1), hinv(1M), and for more technical information about tapes, see mtio(7), tps(7M), or xmt(7).

Troubleshooting Tape Read Errors

Often there is a quick and simple fix for an error message that originates either due to a tape drive unit malfunction or the tape itself. Both recoverable and unrecoverable errors can be caused by something as basic as a dirty read/write head, a poorly tensioned tape, or a dropout even which is a physical bad spot on the tape. An EOT message can also mean that there is no data on the tape.

The following information covers some of the basic tape maintenance/performance functions that should be considered as factors that could either prevent future error conditions from occurring or to aid you in recovering from an existing error message:

1/2-inch Tape Drives

The following sections offer information on the two most popular 1/2 inch tape drives used with Silicon Graphics systems.

Switch Settings for the Kennedy 1/2-inch SCSI Tape Drive

There are two DIP switch banks located on the rearmost board in the small card cage at the rear of the Kennedy drive.

ch07.ds1.gif

Figure 7-1 : Kennedy Dipswitch Bank 1

ch07.ds2.gif

Figure 7-2 : Kennedy Dipswitch Bank 2

Note: This applies only to 2 of the 4 SCSI controller boards. The other 2, including the current versions, are configured from the front panel.

1/2-inch Reel-To-Reel Tape Drive Cleaning Process

The purpose of this section is to provide you with a recommended process for cleaning your tape drive and information on how often the drive should be cleaned. The information in this article concerns 1/2-inch reel-to-reel tape drives.

Normal tape drive usage is for system backup and restoration purposes, and the transportation of data using the tape drive device as a common medium. To ensure data integrity, it is important to clean your tape drive on a regular basis. The process of removing the accumulation of oxide and/or dirt from the Erase/Write/Read head surface and transport system will help to provide you with continued trouble-free operation of your equipment.

1/2-inch Tape Drive Types:


Cipher 880/890; Kennedy 9660, 9610

Tools Needed:


Lint-free, nonabrasive cloths or cotton swabs, 90% or higher isopropyl alcohol or Freon-TF, and mild soapy water.

Note: Never clean any plastic or rubber component (for example, the tape guide) in the tape path with 90% or higher isopropyl alcohol. Doing so will degrade the composition of the component.

If Freon-TF has been banned from use in your company, you can use the 90% isopropyl alcohol. However, you must wipe the alcohol residue off with a swab and water.

A cleaning kit for the Cipher 880/890 can be purchased. See your local sales representative for more information.

Cipher Tape Drive Cleaning Process

The drive should be cleaned after every 4 hours of tape movement operation.

The components of the Cipher Tape Drive can be cleaned by placing the drive in the service access position. This is done by extending the unit fully on the mounting slides and opening the top plate casting. To assure safety in the open position, a cover stay pin on the side of the top cover is provided to be inserted in the hole in the chassis.

Silicon Graphics
Warning: If the tape drive is located in a rack, be sure to extend the antitip legs at the base of the rack.

Follow the cleaning method for each part listed:

Tachometer roller



Use a swab moistened with Freon-TF. Gently wipe the entire roller surface. The roller can be rotated by manually turning the take-up hub slowly.

Take-up hub

Use a swab moistened with Freon-TF. Rotate the hub manually while gently wiping the tape wrapping surface.

Roller guides

Use a swab moistened with Freon-TF. Rotate each roller and gently wipe the tape contact surface and flanges or washers.

Reel hub pads

Use a swab moistened with Freon-TF. Wipe the contact surface of each pad and remove any debris around the pad.

Head

Use a swab moistened with Freon-TF. Wipe the entire face of the head, paying particular attention to the recessed areas.

Caution: Rough or abrasive materials can scratch sensitive surfaces of the head resulting in permanent damage. Other cleaners, such as alcohol-based types, can cause read/write errors.


Tape cleaner

Use a swab moistened with Freon-TF. Wipe each blade along its length. Remove accumulated oxides from the recessed area between the blades.

Front panel/door


Use a cloth moistened with mild soapy water.

Top plate casting


Use a cloth moistened with mild soapy water. Wipe away the oxide dust in the tape path area. Be careful not to get dirt on the head, rollers, and other similar parts.

Filter

Locate and remove the filter from inside the air duct opening at the lower left of the front panel. Clean the filter with low-pressure compressed air, or vacuum, in the opposite direction of airflow and reinstall.

Kennedy Tape Drive Cleaning Process

The drive should be cleaned after every 4 hours of operation.

Components of the Kennedy Tape Drive can be cleaned by placing the drive in the service position. This is done by extending the unit fully on the mounting slides and opening the dust cover. To open the dust cover, turn the two holding screws one-fourth of a turn counterclockwise. To secure the dust cover in the open position, position the hole in the autolocking support bar onto the pin located on the side of the chassis. To expose the tape path components, lift the tape path dust cover next to the vacuum hub assembly.

Note: If the tape drive is located in a rack, be sure to extend the anti-tip legs at the base of the rack.

Erase/write/read head - Use a clean lint-free cloth or cotton swab dampened with 90% isopropyl alcohol or Freon-TF. Wipe the head with firm but gentle vertical strokes. Pay particular attention to the recessed areas of the head.

Note: Using non-recommended cleaning fluids or excessive amounts of the recommended cleaning fluid can damage the tape drive. Cleaning fluids allowed to run into the bearings will break down the lubricant.

Tape path cleaning


Clean tape guides, rollers (except capstan roller), and the tape cleaners with a cotton swab dampened with 90% isopropyl alcohol. Clean the capstan roller with a cotton swab dampened with water or, if it is excessively dirty, dampen it with mild soapy water. Dry thoroughly with a clean lint-free cloth.

Silicon Graphics
Warning: Never clean any plastic or rubber component (for example, the tape guide) in the tape path with 90% isopropyl alcohol. Doing so will degrade the composition of the component.

Reel locking fingers


With no tape reel on the supply hub, clean the rubber pads on the fingers with a clean cotton swab or cloth dampened with water or if it is excessively dirty, with mild soapy water.

Caution: Do not lubricate the bearings.

8mm and 4mm Tape Drives

The following section provides useful information for administrators of 8 and 4 millimeter tape drives.

Exabyte 8mm Cartridge Tape Media Specifications

The following table lists the various cartridge sizes and tape lengths available for the Exabyte 8mm tape drive.

Table 7-5 : Exabyte 8mm cartridge tape media specifications

Cartridge Size Tape Length Formatted Capacity
256 15m 291 MB
512 28m 583 MB
1024 54m 1166 MB
1536 80m 1750 MB
2048 106m 2332 MB



Manufacturers: Exabyte; Sony Metal MP 120 P6-120MP

Tape Availability: Exabyte, (303)442-4333; Silicon Graphics

8mm and 4mm Tape Drive Cleaning Process

The purpose of this section is to provide you with a recommended process for cleaning your tape drive, including the frequency in which the drive should be cleaned.

Normal tape drive usage is for system backup, restore purposes, and the transportation of data using the tape drive device as a common medium. In order to ensure reliable data integrity when using your tape drive, it is important to clean your drive on a regular basis. The process of removing the accumulation of oxide and/or dirt from the erase/write/read head surface and transport system will help ensure continued trouble-free operation of your equipment.

Tape Drives:

A cleaning kit for these tape drives should be purchased. See your local sales representative for more information.

The unit should be cleaned when enough data has been written to fill four tapes.

Using the cleaning kit, perform the following steps:

    Prepare the tape drive to be cleaned by applying power to the unit. When the power-up cycle is complete, open the door and remove any data cartridges in the unit. Leave the door open.

    Place the cleaning cartridge into the drive and close the door.

    The remainder of the cleaning process is automatically performed by the tape drive. When the cleaning process is complete, the cleaning cartridge is automatically unloaded and ejected from the drive. The average cleaning cycle is 15 seconds.

    On the cartridge label, record the date the cleaning was performed, then store the cleaning cartridge for future use.

    Do not store the cleaning cartridge if the cleaning dates have filled the cartridge label. Discard the cleaning cartridge and store a new cleaning cartridge for future use.

    If the cleaning cartridge is ejected from the tape drive without performing a cleaning cycle (before 15 seconds), the cleaning cartridge has reached the end of its useful life and should be discarded.

    Do not rewind and reuse the cleaning cartridge.

QIC Tape Drives

The following section provides information useful to the administrators of systems with Quarter-Inch Cartridge (QIC) tape drives.

The following terms are defined for QIC tapes:

QIC

Quarter Inch Cartridge

QIC-02

Host interface standard. (ts(7) driver)

QIC-11

Recording format. Used on Sun Workstations with 60Mb drives. Cannot be read on Silicon Graphics systems.

QIC-24

Recording format: 9 tracks with a typical track width of .0135 inch. Density is 8000 bpi. Typical capacity is 60 megabytes with 6.6 megabytes per track.

QIC-120

Recording format: 15 tracks with a typical track width of .0065 inch. Density is 10,000 bpi (NRZI Recording Mode). Typical capacity is 120 megabytes, with approximately 8+ megabytes per track.

QIC-150

Recording format used on current SGI drives. Uses 18 tracks.

Note: It is important to use actual QIC designations here, since many low density drives can write (and read) in both QIC 24 and QIC11. Typically, none of the QIC150 drives can read QIC11.

QIC150 drives can write in both QIC150 (using DC6150 or DC600XTD; the name changed to the first recently), or in QIC120, if the tape is a 600A-style tape. Typically, QIC150 drives cannot write to QIC24.

Also note that the word format is misleading; there is no formatting on QIC tapes (some variants do require formatting, but Silicon Graphics does not support them). Format actually refers to the pattern of data blocks. Tapes have a cartridge type, and they are written in the format correct for that type. The type is determined by the hole pattern in the tape (preceding Beginning Of Tape, or BOT). To confuse things further, tapes written on QIC150 drives have a reference burst (magnetic pattern) written at the beginning of the drive.

The noise you often hear when you first try to read (on a QIC150 drive) a tape written on a QIC24 drive is the drive trying to figure out how the tape was written, by switching modes and retrying all the possibilities, if it doesn't see BOTH a QIC150 cartridge and the reference burst. Physically, the noise you hear is the serve motor stepping the read/write head over each track.

The difference between a QIC150 and QIC120 (600A) cartridge is in its mechanical tolerances. The QIC150 has tighter tolerances. About the only visible difference is in the pinch roller (next to the rubber drive roller). The QIC150 has a guide slot milled into it, and the 600A does not.

Table 7-6 : Low-density QIC Tape Drive Compatibility

Tapes Read Write
LD Tapes formatted in LDF Yes Yes
LD Tapes formatted in HDF Process not recommended. Process not recommended.
HD Tapes formatted in LDF Yes Yes
HD Tapes formatted in LDF assuming LDF is QIC 24 Yes Yes
HD Tapes formatted in HDF No Yes (rewrite to LDF)



Table 7-7 : High-density QIC Tape Drive Compatibility

Tapes Read Write
HD Tapes formatted in LDF Yes No
LD Tapes formatted in HDF Process not recommended. Process not recommended.
HD Tapes formatted in LDF Yes Yes
HD Tapes formatted in LDF assuming LDF is QIC 24 Yes No
HD Tapes formatted in HDF Yes Yes



Regarding read/write activity for a low density tape formatted in high density, it is not only not recommended, it isn't even possible if the tape is a QIC24 (DC300XL or DC450XL) tape. If the tape is a QIC120 (DC600A) it will work correctly, and there is no reason to recommend against it.


[Previous Section] [Back to Table of Contents] [Next Section]

Send feedback to Technical Publications.

Copyright © 1997, Silicon Graphics, Inc. All Rights Reserved. Trademark Information