|Skip Navigation Links|
|Exit Print View|
|System Administration Guide: Devices and File Systems Oracle Solaris 10 1/13 Information Library|
You need to know how to specify device names when using commands to manage disks, file systems, and other devices. In most cases, you can use logical device names to represent devices that are connected to the system. Both logical and physical device names are represented on the system by logical and physical device files.
When a system is booted for the first time, a device hierarchy is created to represent all the devices connected to the system. The kernel uses the device hierarchy information to associate drivers with their appropriate devices. The kernel also provides a set of pointers to the drivers that perform specific operations.
The devfs file system manages the /devices directory, which is the name space of all devices on the system. This directory represents the physical devices that consists of actual bus and device addresses.
The dev file system manages the /dev directory, which is the name space of logical device names.
By default, the devfsadm command attempts to load every driver in the system and attach to all possible device instances. Then, devfsadm creates the device files in the /devices directory and the logical links in the /dev directory. The devfsadm command also maintains the path_to_inst instance database.
Updates to the /dev and /devices directories in response to dynamic reconfiguration events or file system accesses are handled by devfsadmd, the daemon version of the devfsadm command. This daemon is started by the service management facility when a system is booted.
Because the devfsadmd daemon automatically detects device configuration changes generated by any reconfiguration event, there is no need to run this command interactively.
For more information, see the following references:
Devices are referenced in one of three ways in Oracle Solaris:
Physical device name – Represents the full device path name in the device information hierarchy. The physical device name is created by when the device is first added to the system. Physical device files are found in the /devices directory.
Instance name – Represents the kernel's abbreviation name for every possible device on the system. For example, sd0 and sd1 represent the instance names of two disk devices. Instance names are mapped in the /etc/path_to_inst file.
Logical device name – The logical device name is created by when the device is first added to the system. Logical device names are used with most file system commands to refer to devices. For a list of file commands that use logical device names, see Table 3-3. Logical device files in the /dev directory are symbolically linked to physical device files in the /devices directory.
The preceding device name information is displayed with the following commands:
Add a new disk to the system.
Move a disk from one system to another system.
Access or mount a file system residing on a local disk.
Back up a local file system.
Many administration commands take arguments that refer to a disk slice or file system.
Figure 3-1 Description of Logical Device Names
Raw device interfaces transfer only small amounts of data at a time. Block device interfaces include a buffer from which large blocks of data are read at once.
Different commands require different interfaces:
When a command requires the raw device interface, specify the /dev/rdsk subdirectory. (The “r” in rdsk stands for “raw.”)
When a command requires the block device interface, specify the /dev/dsk subdirectory.
When you are not sure whether a command requires use of /dev/dsk or /dev/rdsk, check the man page for that command.
Table 3-3 Device Interface Type Required by Some Frequently Used Commands
You might access disk partitions or slices differently depending upon whether the disk device is connected to a direct or bus-oriented controller. Generally, direct controllers do not include a target identifier in the logical device name.
The conventions for both types of controllers are explained in the following subsections.
Note - Controller numbers are assigned automatically during system initialization. The numbers are strictly logical and imply no direct mapping to physical controllers.
To specify a slice on a disk with an IDE controller, follow the naming convention that is shown in the following figure.
Figure 3-2 Disks With Direct Controllers
To indicate the entire fdisk partition, specify slice 2 (s2).
Figure 3-3 Disks With Bus-Oriented Controllers
To indicate the whole disk, specify slice 2 (s2).
Figure 3-4 Logical Tape Device Names
The first tape device connected to the system is 0 (/dev/rmt/0). Tape density values (l, m, h, c, and u) are described in Chapter 22, Managing Tape Drives (Tasks).
Since removable media is managed by removable media management services, the logical device name is usually not used unless you want to mount the media manually.
The logical device name that represents the removable media devices on a system are described in Accessing Removable Media.