Index Index for
Section 8
Index Alphabetical
listing for D
Index Bottom of
page

dsfmgr(8)

NAME

dsfmgr - Device special file management utility

SYNOPSIS

/sbin/dsfmgr [-QSxV] -a class dir_name [entry_type [mode]] dsfmgr [-QSxV] -a category s_1 s_2 s_3 dev_dir flags node_type mode prefix dsfmgr [-QSxV] -r class dir_name... dsfmgr [-QSxV] -r category s_1 s_2 s_3 dsfmgr [-QSxV] -a | -r cfginfo any_data... dsfmgr [-QSxVF] -c | -d dir_name...... dsfmgr [-QSxVF] -D | -p [dir_name] node_name...... dsfmgr [-QSxVF] -e | -m base_name_1 [base_name_2 | instance] ... ...... dsfmgr [-QSxVF] -n | -o node_name...... dsfmgr [-QSxVF] -C | -k | -K | -O | -v dsfmgr [-QSxV] -N dsfmgr [-xV] -s | -h dsfmgr [-EVx -ff ilename] - | --

OPTIONS

-a Adds an entry to the database files controlled by dsfmgr. This command can be used on three different files as follows: class dir_name[entry_type[mode]] The class option is used to add an entry to the device special file directory definition file. This option requires a directory name to be specified, such as disk or tape. You can optionally specify the full path of the directory such as /dev/sound. If only the directory name is specified, the full path will be the specified directory preceded by dev. The entry_type can be l (the default) or c for local or cluster. The mode is used to specify protection for the directory as a 3 digit octal value. The default protection is 755. category The category option is used to add an entry to the device special file definition file. The following information is required: · Three search strings for s_1 to s_3 that enable a unique device to be selected. · A target device directory, such as /dev/tape · The instance width. A value of 1 to 15 specifies the minimum number of digits for the instance width number. A value of 0 (zero) means that there is no number. cfginfo [Internal Use Only.] The cfginfo option is used to add an entry to the hardware configuration information file. -r Removes an existing entry from one of the database files controlled by dsfmgr. This command can be used on three different files: class When the class option is specified, the entry is removed from the device special file directory definition file. This requires a class name to be specified, such as disk or scanner. category When the category option is specified, the entry is removed from the device special file definition file. Three search strings for s_n must be specified. cfginfo [Internal Use Only.] When the cfginfo option is specified the entry is removed from the hardware configuration information file. -c Creates a device directory such as /sound named by the class entry in the device class directory database file. -d Deletes the named device directory named by the corresponding class entry in the device class directory database file. -D Deletes the device special file for the named node. A directory name, such as /dev/tape may be specified optionally. The node_name may be either specific, such as dsk21b, or have a wildcard suffix such as dsk21*. Note that if the wildcard character is to be interpreted by the command shell, it must be protected. -E Echo commands. This option is useful if the input is redirected to a file on stdin, as described in the -f option. -f Specifies a source from which dsfmgr commands can be read: file_name The specified file containing dsfmgr commands - (single dash) Standard input -- (double dash) The controlling terminal. Using the -E option will echo commands as they are read. -n Creates a new device special file for the named node. The node_name may be either specific, such as dsk21b, or have a wildcard suffix such as dsk21*. -o Creates one device special file in the previous (legacy) format, such as rz* or tz*, for the existing named device. The node_name should be the device special file name in the correct format such as fd0a. Note that this option is not available in a clustered environment. -p Deletes device special files named with the previous (legacy) rz*, or tz* format for the existing named device(s). A directory name, such as /dev may be specified optionally. The node_name may be either specific, such as rz13b have a wildcard in place of the partition letter, such as rz13*. Note that if the wildcard character is to be interpreted by the shell, it must be preceded by the escape character. -e Exchanges the device special files for the named nodes. Use this option to reassign device special files between nodes by exchanging or "swapping" them. The base_name is the device name and instance, such as dsk0. Note that devices must be of the same type and the first named device must be an active (known) device. -m Moves the device special file for one named node to another. Use this option to reassign device special files, such as assigning the device special files from a failed disk device to its replacement. Note that devices must be of the same type. -v Verifies the following: · The device class directory default database · The device category to class directory default database · The /dev directory structure · The /dev nodes -N Set new base names into the kernel, and if -x is specified, old nodenames in the dfsl database. -C Creates all device directories such as /dev/disk or /dev/tape, as specified in the device special file directory definition file, including symbolic links. This command displays a list of all directories created, or a full pathname if verbose mode is specified. -k Create all device special files for newly-added devices. When a device is added to the system, this command is used to initially create the default device special files for that device. -K Create all device special files. This command is used to create all device special files for all devices detected. This command sequence is run automatically at system start up, to create all the device special files known by the system. -O Creates all device special files in the previous (legacy) format, such as rz* or tz*. This option is not available in a clustered environment. -s Displays the following data from the database: · The contents of the database file Device Class Directory Default Database /etc/dcdd.dat, showing scope (local or cluster), mode (protection, in octal), and class name. · The contents of the Category to Class-Directory, Prefix Database in /etc/dccd.dat, showing: -- # - The entry number -- String 1 - The device category, such as disk or tape -- String 2 - The names of the devices found in each category, such as generic or cdrom for disks -- String 3 - Whether the device is block, character, rewind or norewind -- directory - The /dev subdirectory in which the device special files are located -- iw - The instance width (the minimum number of digits for the instance) -- t - The type, which can be block or character -- mode - The current protection on the subdirectory, in octal (such as 755). -- prefix - The device special file prefix, such as dsk, tape or cdrom · Device Directory Tree, a listing of the class directories that exist under dev. · Dev Nodes, a listing of the individual device special files for each device. · Old Device Nodes, a listing of the previous (legacy) format of individual device special files, which will show names using the rz* or tz* format -h Displays information on the command syntax (help). The -h -x option will also display a list of the extended information including: Environment Variables A description of the supported environment variables Default The default setting of the supported environment variables Current The current values of the supported environment variables, if any have been modified from the default value Extended Commands A list of useful extended commands that are currently supported: # dsfmgr -x -d delete_locks # dsfmgr -x -c default_tree The first command removes any dsfmgr locks. The second creates the default directory tree for all files used by dsfmgr (normally only done by installation routines). Optional Options The following flags are supported for some command options as indicated in the syntax section. -F Automatically fixes any problems found in the database on /dev tree. For example, if you use the -v option and it detects missing device special files for a device node, specifying the -F option will cause the files to be created. -Q Quits the utility on error, implementing any changes up to the point of the error. The default is to proceed and ignore all errors that are not fatal. -S Silent mode. The utility displays no information. This option disables the -V option. -x Extended functionality, format and information. Most commands will display more detailed information when the -x option is used. See also the -h option. -V Verbose mode. The utility displays additional detailed information about what it did. (disables -S) Definitions Note the following terms used in the context of dsfmgr: Scope Whether a device is available only locally or to other processors on a cluster. Can be l for local and c for cluster Mode The protection of the directory (See chmod(1)) Class A set of related devices, such as disk, rdisk, tape, or ntape Directory The device directory where a device special file for a class in located. Such as disk, rdisk, tape and ntape under /dev Instance Width or iw A value of 1 to 15 specifies the minimum number of digits for the instance width number. A value of 0 (zero) means that there is no number. # or Instance (number) A sequential decimal number allocated to each device special file basename. Prefix The first part of a base name, such as dsk, cdrom, floppy, tape, tty, lp. The prefix unknown is a reserved prefix used to capture all non-configured devices, which will be created in the directory /dev/none. Basename The base name of a device consists of the prefix and instance, such as dsk21. Nodename Identifies a subdivision of a device such as a disk partition. It may be either specific consisting of the base name and suffix, such as dsk21b or a wildcard node name such as dsk21*. When used with dsfmgr: node_name1 Can be basename[*], such as dsk2* node_name2 Can be [prefix]instance, such as dsk12 or 12.

DESCRIPTION

This utility is used to manage device special files, using the file naming format introduced in Version 5.0. The dsfmgr utility is also used to create and maintain device special files according to the previous (legacy) device naming format (for example, rz* for disks or tz* for tapes. On single systems, previous device special files can coexist with the new device special files, and are located in their traditional directory, /dev. Coexistance is not supported on clustered systems. File Naming Convention The file naming convention specifies device names and device special files as follows: Class A class of devices is grouped according to a common physical feature of the devices, such as disk, ntape, or scanner. This name is used as the subdirectory file name for the group of devices, such as /dev/ntape. Device name A device is a discrete system component such as a disk or tape each of which has a unique name. The device name consists of a prefix, instance, and suffix. A device name exists for each type of device in a class. For example, under the class of disk there are devices named dsk, floppy, and cdrom. Note that the prefix, instance and suffix are optional, but at least one element must exist for every device. These elements are defined as follows: Prefix A single prefix exists for each type of device in a class, such as dsk, floppy, and cdrom Instance The instance number is a decimal number assigned to a specific device, for example cdrom0, cdrom3. The combination of the prefix and the instance make the basename for a device. Suffix The suffix is a string defined by the device driver that is appended to the basename. The suffix varies depending on the type of device as follows: disk device name suffix The suffix is an alphabetic character in the range a to h that identifies the partition being addressed. For example dsk12a refers to partition a on hard disk device instance 12. tape device name suffix The suffix is an underscore followed by the letter _d and a digit character that identifies the storage density of the tape device being addressed. For example tape1_d0 refers to the density entry 0 (zero) on tape device 1. The density suffix conforms to the entries for the device in the DDR database file, /etc/ddr.dbase Basename Every individual device has a base name comprised of its device name, and a sequential (decimal) instance number. For example, dsk12 and cdrom3. These names identify the discrete devices to the system and to any programs that manipulate device names. Device Special Files For each device, one or more device special files exists in one or more class subdirectories. For example /dev/disk/dsk13c. Class directories exist for disk and tape device special files as described in the Directory Hierarchy section. See the System Administration guide for more information on device names and device special files and a definitive list of the supported device names. Usage examples, such as moving devices, are also supplied in this guide. Directory Hierarchy New device special files are located in a directory hierarchy starting at /dev which is a Context-Dependent Symbolic Link (CDSL) directory. Refer to the System Administration guide for information on CDSLs. When the operating system is installed, device special files are created for the existing disk and tape devices as follows: /dev/disk Block disk device special files. Disk device special files have a different prefix for hard disks, floppy diskettes, and CD-ROM devices /dev/rdisk Raw (character) disk device special files. /dev/ntape Non-rewind tape device special files. /dev/tape Rewind tape device special files. Using dsfmgr Normally, dsfmgr runs automatically during system startup. hardware management polls the system for all devices, finding any devices added since the system was last booted. For the purposes of system administration, you may need to run the utility manually to: · Create device special files according to the previous (legacy) naming format. For example, if you have extensive scripts and tools that use the old format, you may want to create the device special files to support the scripts until you can modify them to comply with the revised device naming format. · Recreate or reassign device names, such as when a device fails and must be replaced. · Verify or examine the device special file data, if device files or databases are lost or corrupted. Developers and vendors of device drivers will also use dsfmgr to create an environment for developing and testing a device driver, or for adding new classes of devices to a system. The following additional features are available: · Create and add a new class of devices, or remove an existing device from the database · Create or delete the class directories under /dev · Create or delete device special files according to the revised naming convention, and any required class directories if they do not already exist. · Create device special files according to the legacy (rz*, tz*) naming convention. · Display the contents of the existing database entries and device special file assignments.

ERRORS

Input or fatal errors will cause termination. Errors that are not fatal will cause termination only if the -Q option is set. The following error values and messages will be displayed: EACCES There is a session ID mismatch. This is an internal error, which should be escalated via Technical Support. EBADF An incorrect inode type was specified The database is corrupt. Use the verify and fix options to correct it. EEXIST The target of the operation already exists, specify a different target. EFAULT A kdsreq error occurred. The device node for which the ACK was issued was not found. This is an internal error, which should be escalated via Technical Support. EINVAL An incorrect input value was specified. Specify a correct value. ENODEV The specified device record was not found in the status database ENOENT This general "no entry" error can indicate one of the following problems: · There was a problem accessing the databases, the inode was not found. · During a database lookup the specified entry was not found. · When removing a class, category, or cfginfo the specified entry was not found. · When creating or deleting a directory, the specified entry was not found. ENOLCK This error indicates that a lock is in place, possibly by another instance of dsfmgr. ENOMEM This error occurs during a malloc, indicating a memory problem (no memory). ENOSYS This error occurs during a kdsreq, indicating that the function code is unknown. This is an internal error, which should be escalated via Technical Support. ENXIO This error indicates that there was inconsistent data, or data was not found in the dcc or dcddatabases. If this error is seen when making a device node, it indicates that the new device node was not found after it was made. EROFS The specified file system is read-only. ESTALE The session id is incorrect.

EXAMPLES

1. The following example adds the class disk in verbose mode: # dsfmgr -V -a class disk ADD_ENTRY: " l 0755 disk" The message indicates that a non-clustered device with a default mode of 0755 was added. 2. The following example verifies the current database. # dsfmgr -v dsfmgr: verify all datum for system at / Device Class Directory Default Database: OK. Device Category to Class Directory Database: OK. Dev directory structure: OK. Dev Nodes: Errors: 0 Total errors: 0 3. The following example verifies and fixes errors in the current database: # dsfmgr -V -F -v dsfmgr: verify with fix all datum for system at / Device Class Directory Default Database: OK. Device Category to Class Directory Database: OK. Dev directory structure: OK. Dev Nodes: WARNING: node not found in log: /dev/tty00 WARNING: device node does not exist: /dev/tty01 mknod( "/dev/tty01", 020666, 2300001 ) = 0 WARNING: node not found in log: /dev/lp0 OK. Total warnings: 3 4. The following command displays the current contents of the database: # dsfmgr -s dsfmgr: show all datum for system at /

FILES

/dev Location of the device files and subdirectories. /dev/disk, /dev/ntape, /dev/rdisk, /dev/tape The default device class subdirectories, containing device special files for the named devices. /etc/cfginfo [Internal use only.] The default configuration file. /etc/dccd.dat, /etc/dcdd.dat Device database files. /etc/dfsl.dat, /etc/dfsl.dat Status information.

SEE ALSO

Commands: hwmgr(8), mknod(8) System Administration

Index Index for
Section 8
Index Alphabetical
listing for D
Index Top of
page