System Administration Guide: Devices and File Systems

Logical Disk Device Names

Logical device names are used to access disk devices when you perform the following tasks:

Many administration commands take arguments that refer to a disk slice or file system.

Refer to a disk device by specifying the subdirectory to which it is symbolically linked, either /dev/dsk or /dev/rdsk, followed by a string identifying the particular controller, disk, and slice.

Figure 5–1 Description of Logical Device Names

Diagram of logical device name components: raw disk device
directory, logical controller, physical bus target, drive, and slice or fdisk
partition.

Specifying the Disk Subdirectory

Disk and file administration commands require the use of either a raw (or character) device interface, or a block device interface. The distinction is made by how data is read from the device.

Raw device interfaces transfer only small amounts of data at a time. Block device interfaces include a buffer from which large blocks of data are read at once.

Different commands require different interfaces:

The following table shows which interface is required for some commonly used disk and file system commands.

Table 5–3 Device Interface Type Required by Some Frequently Used Commands

Command Reference 

Interface Type 

Example of Use 

df(1M)

Block 

df /dev/dsk/c0t3d0s6

fsck(1M)

Raw 

fsck -p /dev/rdsk/c0t0d0s0

mount(1M)

Block 

mount /dev/dsk/c1t0d0s7 /export/home

newfs(1M)

Raw 

newfs /dev/rdsk/c0t0d1s1

prtvtoc(1M)

Raw 

prtvtoc /dev/rdsk/c0t0d0s2

Direct and Bus-Oriented Controllers

You might access disk partitions or slices differently depending upon whether the disk device is connected to a direct or bus-oriented controller. Generally, direct controllers do not include a target identifier in the logical device name.

The conventions for both types of controllers are explained in the following subsections.


Note –

Controller numbers are assigned automatically during system initialization. The numbers are strictly logical and imply no direct mapping to physical controllers.


x86: Disks With Direct Controllers

To specify a slice on a disk with an IDE controller on an x86 based system, follow the naming convention shown in the following figure.

Figure 5–2 x86: Disks With Direct Controllers

Diagram of device name for disks with direct controllers
that includes logical controller, drive, and slice or fdisk partition.

To indicate the entire Solaris fdisk partition, specify slice 2 (s2).

If you have only one controller on your system, w is usually 0.

Disks With Bus-Oriented Controllers

To specify a slice on a disk with a bus-oriented controller, SCSI for instance, follow the naming convention shown in the following figure.

Figure 5–3 Disks With Bus-Oriented Controllers

Device name for disks with bus-oriented controllers that
includes logical controller, physical bus target, drive, and slice or fdisk
partition.

On a SPARC based system with directly connected disks such as the IDE disks on an UltraSPARC system, the naming convention is the same as that for systems with bus-oriented controllers.

If you have only one controller on your system, w is usually 0.

For SCSI controllers, x is the target address set by the switch on the back of the unit, and y is the logical unit number (LUN) of the drive attached to the target. If the disk has an embedded controller, y is usually 0. For more information about SCSI addressing on SPARC based systems, see the SunSolve Info Doc 48041 and scsi_address(9S).

To indicate the whole disk, specify slice 2 (s2).