Solaris disk naming conventions

For every hard drive known in the Solaris operating environment there is a logical device in the /dev/dsk directory that is used to access that drive. The convention used to name these logical names is /dev/dsk/c#t#d0s# (where c#t#d0s# is different for each hard drive).

  • /dev is the the devices directory.
  • /dev/dsk is the subdirectory containing files that represent all hard drives and slices on a Solaris system.
  • c# represents the controller. For example:
    • c0 the first IDE/SCSI controller
    • c1 the second IDE/SCSI controller (if exists)
    • c2 the third IDE/SCSI controller (if exists)
  • t# is the target drive.
    • With an IDE system the disks are identified by:
      • t0 the primary IDE controller, master drive
      • t1 primary IDE controller, slave drive
      • t2 secondary IDE controller, master drive
      • t3 secondary IDE controller, slave drive
    • With a SCSI system, this references the SCSI id:
      • t0 first SCSI device
      • t1 second SCSI device
      • t2 third SCSI device
      • t3 fourth SCSI device
      • t4 fifth SCSI device
      • t5 sixth SCSI device
      • t6 seventh SCSI device
      • t7 the SCSI controller (yes, it also has a SCSI id )
  • d# is the device number, used with disk arrays.
    • On IDE controllers this number is always zero (0).
    • Also known as the LUN (Logical Unit Number) on SCSI devices, used with disk storage devices. The manufacturer will specify this. It is usually zero (0) by default.
  • s# is the slice (partition) number to be accessed
    • s0 — slice0
    • s1 — slice1
    • s2 — slice2 (unused - Usually associated with the entire disk)
    • s3 — slice3
    • s4 — slice4
    • s5 — slice5
    • s6 — slice6
    • s7 — slice7

Logical and Physical device names

The /dev/dsk/c#t#d#s# naming convention is known as the logical device name. The /devices directory also has a very complex naming convention known as the physical device name. A physical device name looks something like:

/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100002037bde864,0:a

Every file in the /dev directory (logical device names) has a corresponding file in the /devices directory (physical device names). The kernel likes to work with the /devices names. But sysadmins find it easier to work with logical device names such as /dev/dsk/c0t0d0s0. Imagine if a system administrator would have to type a physical device name such as /pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100002037bde864,0:a every time they wanted to connect to a disk!

Basically the /dev directory has human friendly files and the /devices directory has files the kernel likes to use. The /dev directory files are linked to /devices files.

The kernel also likes to use a shorthand name for devices. This is known as the instance name. The instance name is stored in the /etc/path_to_inst file.

Note: This file should not be modified by the system administrator. There are commands within the Solaris OE that detect and modify this file. These utilities should be used to update the system when new hardware is installed.

Examples

To access the root slice 0 on the master hard drive attached to the first IDE interface the system, an administrator would use the device /dev/dsk/c0t0d0s0
To access the fifth slice on the slave drive attached to the second IDE controller, an administrator would use the device /dev/dsk/c1t4d0s5
To access the fifth slice on the second SCSI disk on the third controller, an administrator would use the device /dev/dsk/c2t1d0s5
To access the third slice on the first controller on the fifth SCSI disk, an administrator would use the device /dev/dsk/c0t4d0s3

To summarise

Every device has three names that correspond to it:

  1. Logical device names -- saved under the /dev directory, for example: /dev/dsk/c1t2d0s7
  2. Physical device names -- saved under the /devices directory, for example: /pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100002037bde864,0:a
  3. Instance names -- saved in the file /etc/path_to_inst