ioconfig.4 (2010 09)
i
ioconfig(4) ioconfig(4)
NAME
ioconfig - ioconfig entry format
SYNOPSIS
#include <sys/ioparams.h>
DESCRIPTION
The ioconfig file is used to retain information on a system’s I/O configuration across reboots. It con-
tains two types of information:
• Mappings of dynamically allocated major numbers to drivers.
• Mappings of instance numbers to hardware paths.
At boot time this file is read and the information is stored in the
io_tree kernel data structure. The
ioconfig file is created by insf at install time and is modified by
insf, rmsf, and ioscan when
devices are added or removed (see insf(1M), rmsf(1M), and ioscan (1M)). The only purpose of the
ioconfig file to maintain configuration information when the system is not running. While the system
is running, all accesses are made directly to the kernel
io_tree structure, although any tools that
change the kernel structures must also keep
ioconfig
consistent.
There will be two copies of
ioconfig
maintained: /etc/ioconfig and /stand/ioconfig
.A
second copy is placed in
/stand because NFS diskless clients are not guaranteed to have a reliable
/etc directory at boot time.
The
ioconfig file begins with the ioconfig magic number.
#define IOCONFIG_MAGIC 0x21224941 /* magic number */
Following the magic number is an array of ioconfig_record
structures, which logically form a tree
structure defining the connectivity of the various levels of software modules and managers, the device
class and hardware address of each element, and the logical unit associated with each leaf node. The root
of the tree is array element 0.
Each
ioconfig_record
contains the following fields as defined in <sys/ioparams.h>:
#define IOCONFIG_FILE "/etc/ioconfig"
#define MAX_NAME_LEN 16
union ioconfig_record {
char rec_name[MAX_NAME_LEN]; /* record type */
ioconfig_t ioc;
dyn_major_t dm;
} ioconfig_record;
The definitions of each element are as follows:
rec_name
Each record must have a character string as its first entry which is used to identify the record
type. The default record is the ioconfig_t. If the string begins with an underscore (_)
character then it is one of the variants.
ioc This is the default record entry for the ioconfig file. The rec_name must not begin with an
underscore (_) character to distinguish record from other record type.
The
ioconfig_t element is a structure that contains following elements.
typedef struct ioconfig {
char name[MAX_NAME_LEN]; /* Node name: disc4, scsi_disk */
char class[MAX_NAME_LEN]; /* Node class: disk, tape, etc */
hw_path_t hw_path; /* Path to this node */
int instance; /* Instance number within class*/
} ioconfig_t;
dm This record stores information about major numbers dynamically assigned to drivers. It is
used to allow major number assignments to persist across boots. The rec_name must begin
with _ (underscore) character to distinguish record from other record type.
The
dyn_major_t contains following elements.
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1