Learn Solaris OS Device Naming conventions

In Solaris operating systems all the devices are identified with the three different names, Let us see what all are the  types of names available

1.Logical device name or Block disk devices

2.Physical device name or Character disk devices.

3.Instance name

Logical Device Name:

A user can access the hardware or device with this logical names, after login to the operating system if a user needs to access the system devices he/she has to access  the device with the logical name.So a logical device name is used to refer to a device when you are entering the commands on the command line

All Logical device names are kept in the directory path /dev and these logical device names are symbolically linked to the physical device names under the path /devices directory.So all the devices have an entry inside the /dev/dsk (logical device name path)and /dev/rdsk (physical device name path).

rdsk means RAW DISK

The logical device name contains the controller number, target number, disk number and slice number i.e c#t#d#s#

To check all the logical device names run the following command

# ls /dev/dsk
c0t0d0s0 c0t0d0s4 c0t2d0s0 c0t2d0s4 c1t1d0s0 c1t1d0s4
c0t0d0s1 c0t0d0s5 c0t2d0s1 c0t2d0s5 c1t1d0s1 c1t1d0s5
c0t0d0s2 c0t0d0s6 c0t2d0s2 c0t2d0s6 c1t1d0s2 c1t1d0s6
c0t0d0s3 c0t0d0s7 c0t2d0s3 c0t2d0s7 c1t1d0s3 c1t1d0s7

c0t0d0s0 to c0t0d0s7  = Represent the device name for the disk slice0 to slice 7 for a disk that is attached to the controller 0 at target 0, on disk unit 0.

c0t2d0s0 to c0t2d0s7 = Represent the device name for the disk slice0 to slice 7 for a disk that is attached to the controller 0 at target 2, on disk unit 0.

c1t1d0s0 to c1t1d0s7 = Represent the device name for the disk slice0 to slice 7 for a disk that is attached to the controller 1 at target 1, on disk unit 0.

Note: On X86 hardware you will not find target, target shows only on SPARC hardware.

Physical Device Names:

The physical device name is nothing but it has the device hardware location i.e the complete PCI address of a device, the physical addresses contain the series of nodes which is separated by slashes, that indicates the path to the devices.All the physical devie names are kept under the /devices directory.

To check all the physical device name details

#ls  -l  /dev/rdsk

To list a individual disk hardware path details

#ls -l /dev/dsk/c0d0s0

Note: Am running the Solaris server fromX86 hardware that is why from the above output it is not showing the target id.

3.Instance Names:

Kernel will assign a shorten name for all the available devices  that are connected to the server that is called as an instance name or we can say like it is a shortened name for the physical device name

Let me show you this with one example:

1.sdn = which means here sd is the disk name and n is the number, such as sd0 for the first SCSI disk  device

2.dadn = which means here dad is the disk name and n is the number, such as dad0 for the first IDE disk  device

for example run the ls -l  /dev/rdsk command to get the physical path details from that output you can find the instance name as below

 

As you can see from the above screenshot sd shows it is an SCSCI disk and the disk number is 0.

How to List the system devie details?

In solaris operating system there are several ways avaiable to list the device physical path information.Let us see that one by one

1./etc/path_to_inst_file

As I explained above the instance name for the devices, For each and every devices the  system stores its physical name and instance name inside the /etc/path_to_inst file.These names are used by the kernel to identify the devices.This file is maintained by the kernel and it is not recommed to edit this file for any purpose

Let me show the entires inside the /etc/path_to_inst file below

Note: Different system have different physical device paths

The following is  a /etc/path_to_inst file from a system that has a diffrent bus architecture, here in this case it is an example of an system that has  onboard sun system bus(SBus)

# cat /etc/path_to_inst
#
# Caution! This file contains critical kernel state
#
“/sbus@1f,0” 0 “sbus”
“/sbus@1f,0/espdma@e,8400000” 0 “dma”
“/sbus@1f,0/espdma@e,8400000/esp@e,8800000” 0 “esp”
“/sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@3,0” 3 “sd”
“/sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@2,0” 2 “sd”
“/sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@1,0” 1 “sd”
“/sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@0,0” 0 “sd”
“/sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@6,0” 6 “sd”
“/sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@5,0” 5 “sd”

2. The prtconf command

prtconf means Print configuration  to get all the system configuration details like Total memory installed, configuration of the peripheral  which is formatted as device tree.The main adavantage of prtconf is it will display all possible instances of devices, wherether the device is attached to the system or not.

#prtconf

This command display all possible instances of devices, wherether the device is attached to the system or not.

If you dont want to see the devices which are not attached you can use the option -v with the prtconf command.

#prtconf   |grep  -v not

 

3.With “format” command

By using the format command you can get the physical name as well the logical names of the disks that are connected to your server and also you can check how many harddisk connected to the server by using this command (In Linux we use fdisk command to list all the disk details the same like here in solaris we use the format command)

#format

Note: Press Control+d to exit  the format command without selecting the disk.

 

If you found this article useful, Kindly Subscribe here  👉🏿 Click this link to Subscribe
Never miss an article Do like my official  FB page 👉🏿Learn Linux in an easier way

About Author:

Hello readers! Let me introduce my self first. My name is Vasanth Nirmal Singh J S having 9+ years of experience in IT on all flavours of Unix operating systems ,Storage's and many more .. I would like to share my technical experience i have come across - can be help to other people. So in this blog, I'll post my thoughts related to ITIS. I'll share experiences that I've had while working in different environments. You can expect content related to Unix,Solaris,Linux,EMC Storeages,HP-UX and many others. I hope this blog can be useful for you! Your comments will be appreciated!

Leave a Reply

Your email address will not be published. Required fields are marked *