3.2 Disk Partitioning
Device names are split into three name spaces:
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
/devices/iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000/sd@0,0:a
Similarly, at the Open Boot PROM the first example device would be known as:
/sbus@1,f8000000/esp@0,800000/sd@0,0:a
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@address:arguments
where
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:
/dev/dsk/c0t0d0s0
where
c0 Controller Number
t0 Target Number
d0 Disk Number
s0 Slice (Partition) Number
and this is a symbolic link to:
/devices/sbus@1,f8000000/esp@0,800000/sd@0,0:a
For disks that are directly attached you would drop the target number entry, e.g. something similar to:
/dev/dsk/c0d0s0.
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