Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ disks(1M) — SunOS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

devlinks(1M)

drvconfig(1M)

ports(1M)

tapes(1M)

disks(1M)

NAME

disks − adds /dev entries for hard disks attached to the system

SYNOPSIS

/usr/sbin/disks [ −r rootdir ]

AVAILABILITY

SUNWcsu

DESCRIPTION

disks creates symbolic links in the /dev/dsk and /dev/rdsk directories pointing to the actual disk device nodes under the /devices directory tree.  It performs the following steps:

1.  disks searches the kernel devinfo structure to see what hard disks are attached to the system.  It notes the /devices pathnames for the partitions on the drive and determines the physical component of the corresponding /dev/dsk or /dev/rdsk name. 

2.  The /dev/dsk and /dev/rdsk directories are checked for disk partition entries − that is, symbolic links with names of the form cN [tN] dN sN , where N represents a decimal number.  cN is the logical controller number, an arbitrary number assigned by this program to designate a particular disk controller.  The first controller found  on the first occasion this program is run on a system, is assigned number 0.  tN is the bus-address number of a subsidiary controller attached to a peripheral bus such as SCSI or IPI (the target number for SCSI, and the facility number for IPI controllers).  dN is the number of the disk attached to the controller, and sN is the partition, or slice, number of the entry.

3.  If only some of the disk partition entries are found in /dev/dsk for a disk that has been found under the /devices directory tree, disks creates the missing symbolic links.  If none of the partition entries for a particular disk are found in /dev/dsk, disks checks to see if any entries exist for other disks attached to the same controller, and if so, creates new entries using the same controller number as used for other disks on the same controller.  If no other /dev/dsk entries are found for partitions of disks belonging to the same physical controller as the current disk, disks assigns the lowest-unused controller number and creates entries for the disk partitions using this newly-assigned controller number. 

disks is called each time the system is reconfiguration-booted.  disks can only be run after drvconfig(1M) is run, since drvconfig(1M) builds the kernel data structures and the /devices tree. 

OPTIONS

−r rootdir Cause disks to presume that the /dev/dsk, /dev/rdsk and /devices directory trees are found under rootdir, not directly under /. 

ERRORS

If disks finds entries of a particular logical controller linked to different physical controllers, it prints an error message and exits without making any changes to the /dev directory, since it cannot determine which of the two alternative logical-to-physical mappings is correct.  The links should be manually corrected or removed before another reconfiguration-boot is performed. 

FILES

/dev/dsk/∗ entries for the hard disk for general use

/dev/rdsk/∗

/devices/∗ device nodes

SEE ALSO

devlinks(1M), drvconfig(1M), ports(1M), tapes(1M)

SunOS 5.1  —  Last change: 14 Sep 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026