Content-type: text/html Man page of emx_data.c

emx_data.c

Section: Devices and Network Interfaces (4)
Index Return to Main Contents
 

NAME

emx_data.c - Configuration file for the emx device driver  

SYNOPSIS

/sys/data/emx_data.c  

DESCRIPTION

Refer to emx(7) for a general overview of the emx device driver.

This file is used to manipulate manipulate the emx driver's Fibre Channel (FC) world wide name to Target Id mappings for each adapter. Device deletion and/or replacement will commonly require modifications to the Target Id mappings. In a cluster, in order to achieve symmetrical configurations, an operator will likely need to modify the Target Id mappings. This file should be modified with extreme caution.  

Target ID Mappings

The table governing the Target Id mappings consists of a series of records, each containing the following elements: This identifies the emx adapter instance whose mapping is to be modified. For example: 0 (zero) refers to emx0. This field contains the CAM Target Id that is to represent the device when seen on the indicated adapter instance (for example, when seen on emx0). The FC world wide names that identify the device.
Note that the 16bit FC Port Name and Node Name values are byte-swapped due to endian-ness of the machine (for example, 0x0050 is actually byte values 50 followed by 00). Thus, when comparing with values with those reported by the HSG80, the following node names are equivalent:
        from HSG80:           5000-1fe1-0000-0770
        from emx.info: { ...  0x0050, 0xe11f, 0x0000, 0x7007 }, For example, the following entry indicates that the device with the world wide portname/nodename of 5000-1fe1-0000-0cb1/5000-1fe1-0000-0cb0, is to be assigned Target Id 3 on the scsi bus attached to emx0: { 0, 3, 0x0050, 0xe11f, 0x0000, 0xb10c, 0x0050, 0xe11f, 0x0000, 0xb00c },
 

Modifying Target ID Mappings

In order to manipulate the Target Id mappings, you must generate an appropriate EMX_FCPID_RECORD record entry to reflect the desired mapping. This procedure requires some care as world wide names are long alphanumeric strings, are difficult to obtain, and difficult to enter. To aid in this, at the time the emx driver assigns a Target Id mapping, it writes a text version of the mappings to the file /etc/emx.info. The values written in this file are formatted such that they can be cut and pasted into the emx_data.c table. Thus, the operator only needs to find the record reflecting the existing Target Id mapping relative to the adapter, copy the entry into emx_data.c, and modify only the cam_tgt_id field to reflect the desired mapping.

For example, to change the Target Id of the device entry above to Target Id 5, the following EMX_FCPID_RECORD would be added to the table:
  { 0, 5, 0x0050, 0xe11f, 0x0000, 0xb10c,  0x0050, 0xe11f, 0x0000, 0xb00c }, To support the deletion of Target id mappings, a negative cam_tgt_id value is used to delete the mapping for the indicated device.

For example, to delete the mapping for the device entries above, the would be added to the table:
  { 0, -1, 0x0050, 0xe11f, 0x0000, 0xb10c,  0x0050, 0xe11f, 0x0000, 0xb00c },  

Making the Mappings Take Effect

Once the desired values are specified in emx_data.c, generate a new kernel (see doconfig(8)). The kernel generation process will compile the modified emx_data.c file into the resulting kernel. You must reboot the system on the new kernel to cause the change in mappings to occur.

As the updated mappings will subsequently be written to the emx drivers on disk data file (/etc/emx.db and /etc/emx.db.bak), there is no need to continue to specify the desired mappings in emx_data.c. The entries in emx_data.c can be removed, a new kernel generated, and all subsequent boots will inherit the values from the on-disk files. If the values are left in, they are an integral part of the kernel they are compiled into. This is useful if the on disk data files were to be lost or corrupted. However, this may be a significant problem if the resulting kernel (containing the emx_data.c table entries)) is copied to a different system.  

Internal Processing

Internally, when the emx driver processes the fcpid table, the following changes take place: If the cam_tgt_id field value matches an entry in the existing Target Id mappings, the existing Target Id mapping is deleted. If the device indicated by the world wide names already exists in the Target Id mappings for the adapter instance, the existing entry for the device is deleted. If the cam_tgt_id field is not negative, the fcpid table entry is then added to the mapping table. After all table entries are process and the root filesystem is writable, the updated Target Id mappings are written to disk.  

Clusters and Symmetry

TruClusters for the V4.0X releases commonly require symmetrical configurations. For FC, in addition to needing each adapter configured into the system symmetrically, the Target Id mappings on each cluster member also need to be symmetrically assigned. If the emx adapters are symmetrically configured such that all members have emx0 attached to the same FC switch, emx1 to the same FC switch, etc then a single emx_data.c file can be generated. The operator can configure the emx_data.c file on a single cluster member and copy the resulting file (as well as the /etc/emx.db and /etc/emx.db.bak files) to the other members in the cluster.  

FILES

The binary file containing the persistent CAM Target Id to Fibre Channel N*_Ports mappings for each emx adapter. A backup copy of the /etc/emx.db file. Text file representing the contents of the /etc/emx.db file. This is a readable form of the persistent CAM Target Id to Fibre Channel N*_Ports mappings for each emx adapter. This file does not reflect current connectivity, as devices may not be present, but their Target Id mappings will continue to persist.  

RELATED INFORMATION

SCSI(7), rz(7), disklabel(8), doconfig(8).  

See Also

emx(7).

delim off


 

Index

NAME
SYNOPSIS
DESCRIPTION
Target ID Mappings
Modifying Target ID Mappings
Making the Mappings Take Effect
Internal Processing
Clusters and Symmetry
FILES
RELATED INFORMATION
See Also

This document was created by man2html, using the manual pages.
Time: 02:40:07 GMT, October 02, 2010