[Next] [Previous] [Up] [Top] [Contents]

3.2 Disk Partitioning

3.2.2 SunOS 5.X

For SunOS 5.X the device naming convention has been changed considerably from that of SunOS 4.1.X. The new convention includes some of the devices' characteristics in the name. Sun's convention is slightly different from the SysV.4 naming convention, because SunOS 5.X limits disk partitions to eight per disk. If you install the binary compatibility package links are created with the old style names to the new device names, so you should be able to use either scheme.

Device names are split into three name spaces:

In the physical name space devices have names consistent with the ones used by the Open Boot PROM. These are kept in the /devices directory. Devices that control other devices, such as the bus controller, have a subdirectory under this hierarchy.

The physical device name now contains the hardware information within the name. What was formerly known as /dev/sd0a might now be:

/devices/sbus@1,f8000000/esp@0,800000/sd@0,0:a or


Similarly, at the Open Boot PROM the first example device would be known as:


This name uniquely identifies the physical location of the hardware device to the system. It has a series of node names, each separated by a slash (/) of the form



name is a text string that usually has a mnemonic value, e.g. sbus, esp, sd

@ precedes the address parameter

address text string, usually in the form hex_number, hex_number

: precedes the arguments parameter

arguments text string intended to pass additional information to the device driver

So in the examples above:

sbus@1,f8000000 represents the address on the main system bus occupied by the SBus,

esp@0,800000 represents the SBus slot number and offset within the slot (slot 0, offset 80000) for the SCSI controller, esp

sd@0 represents a SCSI disk, sd, attached to the SCSI bus with Target Number 0

0 is the SCSI Logical Unit Number of sd, and

a is the disk Partition.

The logical device names are kept in /dev and are symbolic links to the physical device names in /devices. The logical names are what you will generally use. The logical disk names contain the controller number, target number if the disk is on a device bus, disk number, and slice (formerly partition) number. Every disk device has an entry in both the /dev/dsk and /dev/rdsk directories, for the block and raw disk devices, respectively.

So the logical device name for what was known under SunOS 4.1.X as /dev/sd0a would be:



c0 Controller Number
t0 Target Number
d0 Disk Number
s0 Slice (Partition) Number

and this is a symbolic link to:


For disks that are directly attached you would drop the target number entry, e.g. something similar to:


The dkinfo command is not available for examining disks under SunOS 5.X. You can check disk information with the new command prtvtoc, but this must be run with root permissions. Here's an example of the output you might see:

# prtvtoc /dev/rdsk/c0t3d0s2
* /dev/rdsk/c0t3d0s2 partition map
* Dimensions:
* 512 bytes/sector
* 80 sectors/track
* 9 tracks/cylinder
* 720 sectors/cylinder
* 2500 cylinders
* 1151 accessible cylinders
* Flags:
* 1: unmountable
* 10: read-only
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 0 37440 37439 /
1 3 01 37440 66240 103679
2 5 00 0 828720 828719
5 6 00 103680 348480 452159 /opt
6 4 00 452160 287280 739439 /usr
7 8 00 739440 89280 828719 /home

where some of the Tag codes are:

Boot 1

Root 2

Swap 3

Usr 4

and the Flags are:

Mountable, read/write 00

Not Mountable 01

Mountable, read only 10

Unix System Administration - 8 AUG 1996
[Next] [Previous] [Up] [Top] [Contents]