[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    disks(1M) manual page Table of Contents

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 special files under the /devices directory tree. It performs the following steps:

    .
  1. disks searches the kernel device tree 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. .
  3. The /dev/dsk and /dev/rdsk directories are checked for disk partition entries - that is, symbolic links with names of the form cN[tN]dNsN, 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.
  4. .
  5. 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.

Of interest to device driver writers are the devices that disks considers disk devices. Device nodes of type DDI_NT_BLOCK, DDI_NT_BLOCK_CHAN, DDI_NT_CD, and DDI_NT_CD_CHAN are considered disk devices (see ddi_create_minor_node(9F) for more information on node types).

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) , ddi_create_minor_node(9F)


Table of Contents