3.8 Target IDs and Unit Numbers

The HAM is responsible for detecting devices attached to the adapters it manages and reporting these devices to NWPA. NWPA invokes these tasks through the following HAM functions:

In order for devices to be initially detected and recognized by the NetWare OS, an initial scan for new devices command must be issued either at the command line or in a .NCF file. When the OS receives this command, it causes NWPA to issue a scan message to all HAMs loaded on the server. For SCSI, the initial scan message tells each HAM to scan LUN 0, and only LUN 0, of all its target IDs (SCSI IDs). For more information about LUNs, see LUNs.

There are three reasons why the OS limits its initial scan to LUN 0:

Under NWPA, the HAM is not expected to differentiate between real and phantom devices. This responsibility belongs to the CDM.

To make it possible for devices at Unit numbers other than zero to be detected and recognized, NWPA provides its own set of scan messages that the CDM can issue to the HAM. CDMs are given the responsibility of initiating these additional scan messages because they have specific knowledge about the devices. Therefore, they know the conditions when to suspect a companion device on another Unit number.

The CDM issues these scan messages as hacbType = 0 requests. A hacbType = 0 request indicates to the HAM that the HACB's union command area is defined by the host adapter command structure. The CDM then sets values in the HACB according to the scan case (or action) it wants the HAM to perform. NWPA defines four scan cases. These cases are referred to numerically as either Case 0, Case 1, Case 2, or Case 3 corresponding to the value the CDM sets in the parameter2 field of the HACB's host command block. Case 0 scans are issued by the OS, and Cases 1 - 3 scans are issued by a CDM.

Through these scan cases, a CDM can also tell the HAM whether to declare a detected device public or private.

For specifics on how to implement these scan cases and for respective paradigm descriptions, refer to HAM_Scan_For_Devices (Function 0x01). This section also gives more details regarding private and public devices.

3.8.1 LUNs

A user might want to scan all LUNs in order to find devices on LUNs other than 0. This can be accomplished in a number of ways:

  • The user can load the HAM with the /LUN option either on the command line or in the STARTUP.NCF file. This causes NWPA to send public scan HACBs to the HAM for all LUNs when scanning that adapter the first time. All subsequent scans are only for LUN 0 devices plus all other LUNs that it already knows about in order to confirm that the devices are still alive.
  • The user can enter the following on the console command line: SCAN ALL. This scans all LUNs on all SCSI adapters that are currently loaded using public scans.

The HAMs must support HACB Type 0 function 1 case 2 (public scan) for this functionality to be enabled.