17.3 SCSI Device File Naming Convention

   

SCSI device files in HP-UX follow a common naming convention, although it is possible to assign other names to these files. The general format of device file naming is shown in Figure 17-1.

Figure 17-1. Device file naming convention.

graphics/17fig01.gif

The first letter of the device file name is " c " followed by a digit that represents an instance number. This part shows the interface card and the instance number assigned to that card. Instance numbers are automatically assigned by the kernel and can be listed using the ioscan command as explained earlier in this chapter.

The character " t " is followed by the SCSI target address. The target address shows the device number on the SCSI bus. These target addresses may be from 0 to 6 for single-ended or differential SCSI adapters, and from 0 to 15 (excluding 7) for Fast/Wide SCSI adapters. Usually target addresses are set through dipswitches or jumpers on the devices. For example, you can set a particular address for a disk by selecting a jumper setting before it is connected to the SCSI adapter. All target addresses for a particular SCSI adapter must be unique.

The device number or logical unit number (LUN) is represented by " d# ". It is usually the number 0.

After that, there may be other optional device-dependent information. This part may or may not be present in the device name depending on the type of the device.

As an example, we consider a device name c0t1d0 . It shows that the SCSI adapter to which the device is attached has an instance number of 0. The device target ID is 1, and it has a logical unit number 0.

Disk Naming

Every disk drive has two device files attached to it. The character-type device file is stored in the /dev/rdsk directory and is also called the raw device file. The block-type device file is stored in the /dev/dsk directory.

For example, if a disk is attached to an SCSI adapter having instance number 2 and a target ID of 4, the character device file for the disk will be /dev/rdsk/c2t4d0 and the block device file will be /dev/dsk/c2t4d0 .

Tape Devices

The tape devices also follow the same naming convention as used for disk devices. However, depending on the type of tape cartridge and its format, a number of other optional features are also included in the device name. Consider the output of ioscan -funC tape command.

 Class I  H/W Path Driver  S/W State H/W Type  Description ========================================================= tape  1  10/8.1.0 stape   CLAIMED   DEVICE    QUANTUM DLT           /dev/rmt/1m            /dev/rmt/c4t1d0BEST           /dev/rmt/1mb           /dev/rmt/c4t1d0BESTb           /dev/rmt/1mn           /dev/rmt/c4t1d0BESTn           /dev/rmt/1mnb          /dev/rmt/c4t1d0BESTnb 

This list shows the device names for a tape device. The name /dev/rmt/c4t1d0BESTnb shows that the tape device is attached to an adapter having instance number 4. The device target number is 1 and the logical unit number is 0. The word " BEST " indicates that with this device file, the highest possible capacity format will be used. This will also include data compression if it is supported by the device. The character " n " shows that the tape will not be rewound at the end of the operation. The " b " character shows that the tape drive will follow the Berkley style instead of AT&T.

Prior to HP-UX version 10.x, a different naming convention was used for tape devices. The tape device names were, for example, /dev/rmt/0m , /dev/rmt/1m , and so on. In this scheme, an arbitrary number (such as 0 and 1) followed by the letter " m " was used for tape devices. This number was followed by additional characters showing the properties of the device. For example, /dev/rmt/c4t1d0BEST was represented by /dev/rmt/1m , and /dev/rmt/c4t1d0BESTn was represented by /dev/rmt/1mn . This naming convention is still used for backward compatibility. The output of the ioscan -funC tape command shows both types of devices.

Options used with tape drive devices are listed in Table 17-2.

Table 17-2. Tape Drive Device File Options
Option Description
Density Use one of the four: BEST , NOMOD , DDS , or D . The BEST option uses the highest capacity, including compression. The NOMOD option can be used on DDS and 8-mm devices only, and it maintains the density of previously written data. DDS shows the number of the DDS standard used, i.e., DDS2 or DDS3. The D option followed by a number defines the density of the tape as a numeric value.
C Compress. The optional number following C shows the compression algorithm.
n No rewind at the end of the operation.
b Berkley-style tape behavior.
w Wait for the physical completion of the operation before returning the status.

   
Top


HP Certified
HP Certified: HP-UX System Administration
ISBN: 0130183741
EAN: 2147483647
Year: 2000
Pages: 390
Authors: Rafeeq Rehman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net