Managing Devices in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Logical Disk Device Names

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

  • Add a new disk to the system.

  • Move a disk from one system to another system.

  • Access or mount a file system residing on a local disk.

  • Back up a local file system.

Names of logical devices use the format /dev/[r]dsk/cntndn[sn,pn].

dev

Devices directory

[r]dsk

Raw disk device subdirectory

cn

Logical controller number

tn

Physical bus target number

dn

Drive number

[sn,pn]

Slice number (s0 to s7) or fdisk partition number (p0 to p4).

The following sections explain some of these name components in detail.

Disk Subdirectory

Some disk and file administration commands require the use of either a raw (or character) device interface, or a block device interface. 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.

The disk subdirectory you specify depends on the device interface required by the command.

  • When a command requires the raw device interface, specify the /dev/rdsk subdirectory. (The “r” in rdsk stands for “raw.”)

  • When a command requires the block device interface, specify the /dev/dsk subdirectory.

  • When you are not sure whether a command requires use of /dev/dsk or /dev/rdsk, check the man page for that command.

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

Table 1-2  Device Interface Type Required by Some Frequently Used Commands
Command Reference
Interface Type
Example of Use
Block
dumpadm -d /dev/zvol/dsk/rpool/dump
Raw
prtvtoc /dev/rdsk/c0t0d0s0
Block
swap -a /dev/zvol/dsk/rpool/swap

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.


Note -  Controller numbers are assigned automatically during system initialization. The numbers are strictly logical and imply no direct mapping to physical controllers.
  • To specify a slice on a disk with an IDE controller, use the naming convention cndn[sn,pn].

    cn

    Logical controller number

    dn

    Drive number

    [sn,pn

    Slice number (s0 to s7) or fdisk partition number (p0 to p4)

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

  • To specify a slice on a disk with a bus-oriented controller, SCSI for instance, use the naming convention cntndn[sn,pn].

    cn

    Logical controller number

    wn

    Physical bus target number

    dn

    Drive number

    [sn,pn

    Slice number (s0 to s7) or fdisk partition number (p0 to p4)

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