From: THE VIRGINIAN Date: Mon, Nov 24, 1997 7:54 AM Subject: hsz40/unix config guide To: Bob Morningstar1 SUBJECT: CONFIGURING HSZ40 DEVICES IN AN OSF/1 ENVIRONMENT Page 1 I: BASIC STEPS In the HSxx Users Guide and in this document, the term container is used to refer to any entity that is capable of storing data. This entity could be a single disk device or multiple disk devices configured into a multi-storage array, such as a RAID-5 array, or a stripe array, or mirror array. These are the main steps in configuring HSZ40 containers for use by OSF/1. Please refer to HS Family Array of Controllers Users Guide EK-HSFAM-UG. It is available on node MAJERE::STORAGEWORKS: 1. Add disk devices (storage containers) on the HSZ40 2. Configure RAID,STRIPE, or MIRROR Sets (storage containers) on the HSZ40, if needed. 3. Initialize storage containers on HSZ40 4. Create HSZ40 Units from the storage containers, through the ADD Units CLI command or through CFmenu on the HSZ40 5. Create the device Special Files on OSF/1 System for each HSZ40 unit. 6. If system devices (boot devices) are going to be used on the HSZ40, steps 1-4 must be completed before building the OSF/1 Software. Also, only HSZ40 units whose unit designators have a LUN which is 0, can be used for system devices. The device special files will be created for those devices by the installation procedures. Examples of HSZ40 units whose unit designators have LUN 0 are: D000, D0 , D100 , D200, etc. Page 2 II: TERMINOLOGY BA350-MA +-----------+ HOST +------------------------------------+ | Host | SCSI BUS n | SCSI ID a,b,c,d - HSZ40 SCSI ID 7 | | Adapter | >-------------> | SCSI ID a,b,c,d - HSZ40 SCSI ID 6 | | SCSI ID n | +-----------------+------------------+ | | | SCSI PORTS 1 - 6 | +-----------+ +------------------+ KZTSA,KZMSA,KZPSA,PMAZC,ETC DEVICE SCSI BUSSES 1. HOST SCSI BUS - SCSI bus that connects the Host Adapter to the HSZ40. a.Sometimes called the "front end" SCSI bus or the "Host Side" bus. 2. DEVICE SCSI BUS - SCSI bus that connects the HSZ40 to the devices. a. Sometimes called the "back end" SCSI bus or the "Device Side" bus. b. In the documentation, these busses are referred to as device ports, which are numbered 1 - 6. The devices usually reside in a storage shelf, BA-3xx. 3. HSZ40 SCSI IDs - HSOF version 2.0 and above. a. The HSZ40 can have from one to four Host Side SCSI IDs. These ID numbers can be any ID between 0 and 7. However, the Host Side SCSI Host adapter also has a SCSI ID on this bus. The HSZ40's Host Side SCSI IDs must be different than the Host Adapter's ID. Usually the Host Adapter will have an ID of 7. However, this ID is usually configured through the Host System Console utilities and it may be something other than 7. The HSZ40's Host Side IDs are set up through the HSZ40's Command Language Interface (CLI), which is accessed through the terminal port on the HSZ40. b. HSZ40 can have a Device Side SCSI ID of either 7, or 6. This ID is dependent upon the physical slot of the controller shelf in which the HSZ40 has been installed. If the HSZ40 is plugged into the slot furthest from the Device Side SCSI connectors, it has a Device Side ID of 7. If the HSZ40 is plugged into the physical slot closest to the Device Side SCSI connectors, it has a Device Side ID of 6. In a dual controller configuration, one HSZ40 has a Device Side ID of 7, the other HSZ40 will have a Device Side ID of 6. 4. HSZ40 Storage Container - Single or Multi-device Storage Set. 5. HSZ40 UNIT - This entity represents a storage container that is available for use by the OSF/1 Host System. HSZ40 units are created from storage containers. Until a storage container is created into a unit, the storage container is not available to the OSF/1 host system. a. HSZ40 UNIT DESIGNATOR - This entity is used by the HSZ40 to identify a unique storage container to the host operating system. When an HSZ40 storage container is created into a unit, the unit designator is assigned at that time. The unit designator consists of a Host Side SCSI Target ID and a Host Side LUN. These terms are defined further on in this section. Page 3 6. OSF/1 Disk Device - as used in reference to an HSZ40 System. An OSF/1 Disk Device is an OSF/1 entity that relates to an HSZ40 unit. An OSF/1 Disk Device can be a single disk device container or a multi-disk device container, depending upon the configuration of the HSZ40 unit that relates to the OSF/1 disk device. The relationship between the HSZ40 unit and the OSF/1 disk device name is made by invoking the OSF/1 utility, mknod. 7. SCSI TARGET ID - Unfortunately, the term Target ID as used in an HSZ40 environment, refers to two different entities. There is one Target ID as used on the Host Side Bus. There is another Target ID as used on the Device Side Bus. a. Host Side Target ID - This is the SCSI ID number that is one of the four assigned Host Side SCSI ID's as used by the HSZ40. This Target ID will be used by the host adapter to communicate with an HSZ40 that has this Target ID as one of its Host Side SCSI IDs. b. Device Side Target ID - This SCSI ID is used to communicate between the HSZ40 and the devices on the Device Side SCSI busses. It will be used by the HSZ40 to identify a unique device on one of the Device Side SCSI busses. As far as the user is concerned it will only be used when configuring devices on the HSZ40. 8. LUN - Logical Unit. Again, the term LUN refers to two different entities in a HSZ40 environment. There is the term LUN as used on the Host Side Bus. I'll refer to this LUN as the Host Side LUN. The other LUN that is used in an HSZ40 environment is that used on the Device Side SCSI Bus. This will be called the Device Side LUN. a. Host Side LUN - This entity is part of the HSZ40 Unit Designator. It will be used by the host operating system to identify a unique HSZ40 unit. b. Device Side LUN - In the current versions of the HSZ40 software, this LUN is always 0. The Device Side Target ID and the Port number are the only entities that are currently used by the HSZ40 to identify a unique device on the Device Side SCSI Bus. Page 4 III: SPECIFIC PROCEDURES The Host Side SCSI bus is the SCSI bus that connects the HSZ40 to the Host System Adapter. It has a SCSI Bus number that is dependent upon the physical I/O location of the SCSI Host Adapter. This SCSI Bus number can be determined from the OSF/1 uerf utility, by entering the following OSF command. uerf -R -o full -r 300 | more EXAMPLE: ****************************** ENTRY 21. ******************************* ----- EVENT INFORMATION ----- EVENT CLASS OPERATIONAL EVENT OS EVENT TYPE 300. SYSTEM STARTUP SEQUENCE NUMBER 0. OPERATING SYSTEM DEC OSF/1 OCCURRED/LOGGED ON Tue Jan 31 17:34:56 1995 OCCURRED ON SYSTEM bellyup SYSTEM ID x00000009 CPU TYPE: DEC 2100 SYSTYPE x00000000 MESSAGE Alpha boot: available memory from _0xbd2000 to 0xfffe000 DEC OSF/1 T3.2-4 (Rev. 185); Tue Jan _24 17:31:18 EST 1995 physical memory = 256.00 megabytes. available memory = 235.58 megabytes. using 975 buffers containing 7.61 _megabytes of memory Firmware revision: 3.9 PALcode: OSF version 1.35 ibus0 at nexus AlphaServer 2100 4/200 cpu 0 EV-4s 1mb b-cache gpc0 at ibus0 pci0 at ibus0 scsi0 at psiop0 rz0 at scsi0 bus 0 target 0 lun 0 (DEC _ RZ28 (C) DEC T436) pza0 at pci0 slot 7 scsi2 at pza0 rz18 at scsi2 bus 2 target 2 lun 0 _(DEC HSZ40 (C) DEC V20Z) ************************************************************************* NOTICE:There is an external SCSI Host Adapter named pza0 at pcio slot 7. It is attached to SCSI bus number 2 (scsi2). There is an OSF/1 disk volume with the name of rz18 that was detected on this bus through an HSZ40. This information is obtained from the previous error log information: pza0 at pci0 slot 7 scsi2 at pza0 rz18 at scsi2 bus 2 target 2 lun 0 _(DEC HSZ40 (C) DEC V20Z) Page 5 The information from the error log entry shows that the autoconfig routines in the OSF/1 system startup can access the unit. However, this does not necessarily mean that the users of this system will be able to access the unit. The special files that associate a unit with a name may not have been created or they may have been created incorrectly. In order to see a unit on an HSZ40 from the startup procedures, the unit information must be in the OSF/1 configuration file. Also, in OSF/1 versions up to and including V3.2-4, the name must be in the following format: "rznnn", where "nnn" are numeric characters. An example from a configuration file: disk device rz18 at scsi2 drive "N" In the above example the "rz18" is the OSF/1 device name. In the above example, the "N" represents a drive number and is determined from the following components: 1. Host SCSI Bus number 2. HSZ40 Unit Designator The following formula is used to determine the drive number ( 64 * Host Side Bus # ) + ( 8 * Target ID ) + LUN The Target ID and LUN are determined from the HSZ40 unit designator. More on the Target ID and LUN later. The device name does not necessarily have to be in the format rznnn. However some utilities may not recognize the name if this format is not used. More on the name format latter. In order for the users of this system to access the unit by using the name "rz18", the device special files associated with this name must have the correct major and minor numbers. The major number for units accessed through an HSZ40 must be "8". This number is used by the Common Access Method (CAM) device driver. The minor number will identify the individual unit accessed by the CAM device driver. This minor number will be derived from the following components: 1. HOST ADAPTER SCSI BUS NUMBER 2. HSZ40 UNIT DESIGNATOR If the major and minor number are not correct, the unit will not be able to be accessed from the OSF/1 system. The OSF/1 device name can be in any format, however as was stated before; some utilities may not recognize the OSF/1 name if it is not a specific format. The OSF/1 iostat utility is one utility that only recognizes a specific format of rznn, where "nn" is a number. However, just because iostat doesn't recognize a name format doesn't mean that the users of the system can't use a "non numeric" name format, only that some utilities may not recognize a "non numeric" format, such as a device name "drivea". Page 6 III-A: CONFIGURING UNITS ON THE HSZ40. +-------------------------------------------------------------+ | HSZ40 CONTROLLER | +-------------------------------------------------------------+ | | +-------------------------------------------------------------+ | DEVICE BUS 1 DEVICE BUS 2 DEVICE BUS 6| | SCSI PORT 1 SCSI PORT 2 SCSI PORT 6| +-------------------------------------------------------------+ | | | | +---------------------------------------+ | 6 5 4 3 2 1 0 | +---------------------------------------------+ |PWR RZ28 RZ28 RZ28 RZ28 RZ28 RZ28 RZ28 | | +---------------------------------------------+ DEVICE STORAGE SHELF In the above diagram, there is a storage shelf connected to SCSI Port 1 on the HSZ40. Each physical slot in the storage shelf is assigned a SCSI "ID" number, this would be the Device Side Target ID. In a "non split" bus configuration, the target ID's in a device storage shelf are numbered 0 - 6, from right to left; as viewed from the the front of the storage shelf. In a single HSZ40 configuration, SCSI ID 7 or 6 is used by the HSZ40. In a dual HSZ40 configuration, SCSI IDs 6 and are used by the HSZ40. In a dual controller configuration, no SCSI devices can be plugged into storage shelf slots that have an ID of 6. In a single controller configuration, if a controller is plugged into the controller shelf slot that uses SCSI ID 6, no SCSI devices can be plugged into storage shelf slots that have that same ID of 6. The first step in making a disk unit on the HSZ40 is to configure a disk device. This is done by giving the disk device a name and then associating that name with SCSI information that will allow the HSZ40 to relate the name to a "device bus" and a "target" on that bus. In the documentation you may see the disk "name" defined as a "container-name". The configuring of a disk device is done by "adding" a disk. There are three ways of adding a disk device: 1. Through the "add disk" HSZ40 CLI command 2. Through the "config" utility on the HSZ40 3. Through the "cfmenu" utility on the HSZ40 The config and cfmenu utilities invoke the add disk command. There is a fourth method, but it uses the HSZterm layered product utility, which will not be be used in this document. It requires that a running OSF/1 system be connected through the terminal port on the HSZ40. The creation of disk devices uses the "Port Target Lun "(PTL) naming convention. The "Port" refers to the Device SCSI Port. The "Target" refers to the "target" ID number of the storage shelf associated with the physical slot that contains the device. The "LUN" is always "0", in the case of the HSZ40. Page 7 The disk name can be up to nine characters, see the HSx users guide for restrictions. The name is referred to as "container-name." The standard convention for the name is to use the following format: "DiskPTL", an example is Disk100. The "P" refers to the SCSI Bus Port number. The "T" refers to the SCSI ID number represented by the physical slot location in which the device is located. The "L" is the LUN number. In the case of the HSZ40, the LUN is always 0. Name Port Target Lun Disk100 1 0 0. The format of the HSZ40 CLI command that would be used would be: hsz40> add disk "name" Port Target Lun EXAMPLE: hsz40>add disk disk100 1 0 0 However, you could assign any container name you wished. Example Name Port Target Lun DEV1 1 0 0. EXAMPLE 2: Consider another storage shelf connected to SCSI Port 6 and there was a disk in slot ID 5 of that shelf. You would add the disk using the standard name format with the following HSZ40 command. hsz40>add disk disk650 6 5 0 Name Port Target Lun Disk650 6 5 0. The config and cfmenu utilities automatically scan all DEVICE SCSI Ports connected to the HSZ40 Ports and configures all disks located in any storage shelves connected to those ports. These utilities use the PTL name format. Page 8 To view devices on the HSZ40, use the following CLI command: hsz40>show devices This would show the following: Name Type Port Target Lun Used By __________________________________________________________________________ Disk100 Disk 1 0 0 Disk650 Disk 6 5 0 __________________________________________________________________________ The "used by" field refers to any "containers" that are using the device. These containers could be: 1. STRIPE Set Containers 2. RAID 5 Containers 3. Single Device Containers Page 9 III-A.1 TRANSPORTABLE vs. NOTRANSPORTABLE When a single device container is created it can be defined as transportable or notransportable, the default is NOtransportable. This option is specified in the "ADD DISK" command. hsz40>Add Disk Disk100 1 0 0 Transportable or NOtransportable A NOtransportable disk uses some of the disk space for metadata that is used by the HSZ40. A device that is specified as NOtransportable will have a few less blocks available for user data. Refer to the HSxx users guide for more information on transportable/notransportable. Page 10 III-B: MULTI DEVICE CONTAINERS If RAID or STRIPE or MIRROR containers are going to be created, then the disk devices must first be configured. After disk devices are added, RAID or STRIPE or MIRROR containers can be configured from single disk containers. To create a RAID container, the ADD RAID command will be used. To create a STRIPE container, the ADD STRIPE command will be used. The format of the commands are: hsz40>add raid "container-name" "list of disk devices" hsz40>add stripe "container-name" "list of disk devices" The "container-name" has the same restrictions as the disk names. See the HSxx Users Guide. EXAMPLES: hsz40>add raid r0 disk100 disk200 disk300 hsz40>add stripe s0 disk110 disk210 disk310 To view the containers: hsz40>show raid hsz40>show stripe The above commands show all containers. To view an individual container, use the following command: hsz40>show r0 hsz40>show s0 For MIRROR containers refer to the HSXX Array Controller Users Guide. Page 11 III-C: INITIALIZATION OF CONTAINERS After containers have been created they should be initialized. These containers could be: 1. Single Device Containers. 2. RAID Containers. 3. STRIPE Containers. 4. MIRROR Containers. Example: hsz40>initialize disk100 ; This is for a single device container hsz40>initialize r0 ; This is for a RAID Container hsz40>initialize s0 ; This is for a STRIPE container III-D: CREATION OF UNITS The unit is the storage container that will be made available to the host operating system. Each container that is going to made available to the host operating system must be given a unit designator through the "ADD UNIT" Command. The format of the command is: hsz40>add unit "unit designator" "container-name" The container-name must be a valid container. The unit designator for a disk unit must have the following format: "DTZL" The first character must be a "D" for disk. The "TZL" can be from one to 3 numeric characters, with the following restrictions: The "T" character must be one of the Host Side SCSI ID's of the controller. That is, if the controller has Host Side SCSI ID's of 0,1,2,3, then the "T" character can only take on a value of 0,1,2, or 3. The "Z" character must be "0" or not used. Not used implies "0" The "L" character can be a number between 0-7 or not used. Not used implies 0. Using this unit designator naming scheme, a controller can present a maximum of 32 units to the OSF/1 Host operating system. That's four Host Side SCSI IDs and 8 units per ID. The units refer to containers. The containers can be single device or multi-device containers, such as RAID or STRIPE containers. EXAMPLE>: Controller has Host Side SCSI ID's of 0,1,2,3 hsz40>add unit d0 disk100 ; for single device container hsz40>add unit d000 disk100 : hsz40>add unit d100 r0 ; for RAID container hsz40>add unit d200 s0 ; for STRIPE container hsz40>add unit d307 disk650 The HSZ40 unit designator will be used to determine the OSF/1 minor number of the OSF/1 device special file that is used by OSF/1 to access that HSZ40 unit. This minor number will be used in the mknod utility to associate an OSF/1 device name with an HSZ40 unit. Page 12 IV: OSF/1 SPECIAL FILES Once units have been made available to the OSF/1 Host System, then the Host System can access those devices if the special files have been created for the unit. Each individual partition of a OSF/1 disk device must have a character device special file and a block mode device special file. The device special files are created through the mknod utility on the OSF/1 Host System. This section will show how that utility is used. The mknod utility must be supplied some parameters, those parameters include a major number and a minor number. The major number refers to the device driver, the minor number refers to the specific device that is controlled by the device driver. The format for invoking the mknod utility is: mknod name M Major Number Minor Number The "name" is the name given to the special file associated with the device and the partition on the device. The "M" will be the character "b" for block mode file or "c" for character mode file. The Major Number will be the character 8, for HSZ40 devices. The Minor Number will be a number that is determined from an algorithm that is based upon the SCSI bus number that is connected to the HSZ40 and the HSZ40 unit designator. The next sections will show examples. Page 13 IV-B : RECOMMENDED NAME FORMAT FOR HSZ40/OSF1 DEVICES The recommended naming format for HSZ40 devices is based upon the following format rzxnnp - for block mode special file access rrzxnnp - for character mode special file access The "x" denotes one alphabetic character that represents the LUN number that is used in each HSZ40 unit designator. LUN 0 - a LUN 1 - b LUN 2 - c LUN 3 - d LUN 4 - e LUN 5 - f LUN 6 - g LUN 7 - h The "nn" denotes a numeric value based on the Host Side SCSI bus # and the target ID portion of the HSZ40 unit number. nn = ( 8 * Host Side SCSI Bus # ) + ( Target ID from HSZ40 unit number) The "p" denotes one alphabetic character between a-h to designate the partition. EXAMPLE 1: To configure HSZ40 unit D000 or D0 on an HSZ40 that is on Host Side SCSI Bus # 2, the name for the block mode device would be: nn = ( 8 * 2 ) + 0 = 16 x = LUN 0 = a Block Mode Names: rza16a - partition a rza16b - partition b, etc EXAMPLE 2: To configure HSZ40 unit D407 on an HSZ40 that was on Host Side SCSI Bus # 5, the name for this block mode device would be: nn = ( 8 * 5 ) + 4 = 44 x = LUN 7 = h Block Mode Names: rzh44a - partition a rzh44b - partition b, etc Page 14 IV-C: DETAILED EXAMPLE OF CREATING SPECIAL FILES In order to use the mknod utility to create the device special files for an HSZ40 unit, the following pieces of information are required: 1. The SCSI Bus number of the host side SCSI bus. 2. The target ID of the HSZ40 unit as shown in the HSZ40 unit number 3. The LUN of the HSZ40 unit as shown in the HSZ40 unit number. 4. The partition for the device, a - h. The major number of HSZ40 disk units is always "8". The minor number will be calculated as follows: (16384 * Host Side SCSI Bus Number) + (1024 * Target ID) + (64 * LUN) + x The "x" in the formula is the partition number as follows: a = 0 b = 1 c = 2, and so on. For an HSZ40 unit D200 on host side SCSI Bus # 2; the SCSI Bus is 2, the Target ID is 2 and the LUN number is 0. The minor number for the "a" partition would be: ( 16384 * 2) + ( 1024 * 2 ) + ( 64 * 0 ) + 0 = 34816 The "nn" portion of the name would be 18, as determined by the formula nn = ( 8 * Host Side SCSI Bus # ) + ( Target ID from HSZ40 unit number) The special file name for the block mode device would be rza18a. The special file name for the character mode device would be rrza18a. When using mknod, insure that the default working directory is /dev. Mknod would be used as follows: #cd/dev - puts working directory to /dev #mknod rza18a b 8 34816 - creates the block mode special file for rza18a #mknod rrza18a c 8 34816 - creates the character mode file for rrza18a For an HSZ40 unit D102 on host side SCSI Bus #2; the SCSI Bus is 2, the Target ID is 1 and the LUN number is 2. The minor number for "d" partition would be: ( 16384 * 2) + ( 1024 * 1 ) + ( 64 * 2 ) + 3 = 33923 The "nn" portion of the name would be 18, as determined by the formula nn = ( 8 * Host Side SCSI Bus # ) + ( Target ID from HSZ40 unit number) The special file name for the block mode device would be rzc17d. The special file name for the character mode device would be rrzc17d. Mknod would be used as follows: #cd/dev - puts working directory to /dev #mknod rzc17d b 8 33923 - creates the block mode special file for rzc17d #mknod rrzc17d c 8 33923 - creates the character mode file for rrzc17d Page 15 IV-D: MAKE_RAID_LUNS UTILITY There is a new utility that is available starting with OSF/1 V3.2-A. It is in the /dev directory and is called MAKE_RAID_LUNS. It uses the naming format of "rzxnn"(rza17). It can be used for creating all special files for any single LUN on an HSZ40. That is; it will create all files, block and character for all partitions for an HSZ40 unit. This saves from invoking the mknod utility 16 times of each HSZ40 unit. To invoke this utility use the following procedures: #cd /dev - changes working directory to /dev #MAKE_RAID_LUNS rza17 - this will create all special files for the HSZ40 unit D100 on Host Side SCSI Bus 2. When using this utility, the "nn" portion of the file names must be correct. It should be calculated by the same formula that was discussed previously. nn = ( 8 * Host Side SCSI Bus # ) + ( Target ID from HSZ40 unit number) Another Example: To create special files for HSZ40 unit D202 on SCSI Bus 2: #cd /dev #MAKE_RAID_LUNS rzc18 This utility will have to be run for each separate HSZ40 unit. Be sure to use the correct name format for each LUN. Page 16 !!!!WARNING!!!! WHEN YOU ARE USING THE MKNOD UTILITY, THERE IS NO CHECK TO INSURE THAT YOU HAVE IDENTIFIED THE RIGHT MINOR NUMBER WITH THE CORRECT PARTITION.!!! In other words, you could have made a mistake in your calculations and given the minor number for rzc17d as 33920. This is the minor number for the "a" partition on that unit, but the mknod utility would not signal any errors. Certain utilities may catch the error, but don't count on it. The danger in miscalculating the minor number is that you may actually overlap a partition in another unit. BE VERY CAREFUL when using the mknod utility. If you have many HSZ40 units to configure, remember you have to create special files for every partition on those HSZ40 units. You also have to create a block mode special file and a character mode special file. This requires a lot of manual typing operations. Currently there is no script file that comes with the OSF/1 operating system to allow you to configure all special files for all HSZ40 units. However there is a script file called MAKEDEV that can create some special files, providing that you use a specific name format. In the current versions of OSF/1 you should NOT USE MAKEDEV for creating the HSZ40 device special files. One reason is that this utility does not accept the rzxnnp format for names. The next section discusses the MAKEDEV utility, only for information purposes. REMEMBER YOU SHOULD NOT USE THE MAKEDEV UTILITY FOR CREATING HSZ40 DEVICE SPECIAL FILES. FUTURE VERSIONS OF MAKEDEV MAY ALLOW FOR THE USE OF THE NAME FORMAT - rzxnnp. BUT FOR CURRENT VERSIONS, DO NOT USE IT FOR HSZ40 DEVICES Page 17 IV: MAKEDEV UTILITY This utility is located in the /dev directory. This section is based upon OSF/1 version 3.2-4 and below. MAKEDEV is a script that can be used to create device special files. However, it requires that a specific naming format be used. For SCSI devices it requires the following format: rzxxx The "xxx" can only be numeric characters. Here are some examples: rz0, rz10, rz130, etc. Also the "xxx" number will determine the SCSI Host Side Bus number and the SCSI Target. The LUN is assumed to be 0 in all cases. The calculations are as follows: SCSI Host Side Bus Number = Integer of ( xxx / 8 ) The remainder of the above division, if any, will be the Target ID. MAKEDEV will calculate the minor number, based upon the same calculation that was used in the previous examples, except that the LUN is always 0: ( 16384 * SCSI Host Bus # ) + ( Target ID * 1024) + (LUN * 64) + Partition EXAMPLE: Using a unit name of RZ16 = 16 is the " xxx" SCSI Host Side Bus Number = ( 16 / 8 ) = 2 with a remainder of 0. Minor number for rz16a = ( 16384 * 2 ) + ( 0 * 1024 ) + ( 0 * 64 ) + 0 = 32768 MAKEDEV will then invoke mknod, using the major number associated with that device type and the calculated minor number. It will create all special files for all partitions, both block mode and character mode. If you were going to associate the device name RZ16 to an HSZ40 unit, which unit would that be? Remember than an HSZ40 unit has the designator DTZL: T = Target ID Z = 0 L = Lun Remember that RZ16 was on SCSI Host Side Bus # 2, Target ID of "0", LUN of "0". The RZ16 device would relate to HSZ40 unit D000 or D0 that was connected to the Host Adapter on SCSI Host Side Bus # 2 . So if you use MAKEDEV to create special files, you give the device an OSF/1 device name that will produce the correct minor number. Also, you CANNOT use MAKEDEV to create special files for any HSZ40 units whose unit designator do not end in "0". As an example, you can't use MAKEDEV for D101. This would be TARGET ID "1", but LUN "1". MAKEDEV always assumes LUN to be "0". EXAMPLE OF INVOKING MAKEDEV: /dev/MAKEDEV rz16 Page 18 IV-A: ANOTHER EXAMPLE: You want to use the device name rz161 and use MAKEDEV to create the special files. What HSZ40 unit would this name point to if you use MAKEDEV to create the special files? SCSI Host Side Bus Number = ( 161 / 8 ) = 20 with a remainder of 1. The Target ID is then equal to this remainder, which is 1. LUN is always 0, so using the "DTZL" HSZ40 unit format. This would be D100 on the HSZ40 that is on the Host Adapter on Host Side SCSI bus 20. The point of all these examples is to show that you cannot just pick any arbitrary OSF/1 device name if you are going to use MAKEDEV to create the special files. You must be sure that the minor number that MAKEDEV is going to calculate will identify the correct HSZ40 Unit on the correct Host Side SCSI Bus. Page 19 V: HELPFUL UTILITIES The OSF/1 "file" utility can be used to determine if an HSZ40 unit can be accessed from the OSF/1 Host System. Here is the procedure: For this example, an HSZ40 has a unit D101. From the HSZ40 CLI, issue the following command: hsz40>set "xx" noread Be sure to enable the unit's read cache when the testing is completed, by using the following command: hsz40>set "xx" read The "xx" represents the HSZ40 unit designator that will be tested. Example: hsz40>Set D101 noread This command disables the read cache for the unit. The reason is to allow a visual indication that the unit is indeed being accessed. This will cause the information to be accessed from the unit rather than from the cache, if the information is in cache. From the OSF/1 Host System issue the following command: /usr/bin/file /dev/xxxx The "xxxx" represents the OSF/1 character mode partition device special file that represents the HSZ40 unit. EXAMPLE: /usr/bin/file /dev/rrzb17a In this case the special file for rrzb17a has already been created. The device activity indicator (green light) should light up on the device. If the unit is a multi-device container only one of the devices that is part of that container will light. Also on the OSF/1 system, the following output should be seen after the command is issued: /dev/rrzb17a character special (8/mmmm) SCSI # n HSZ40 disk #xxx (SCSI ID #t) The "8" is the major number The "mmmm" should be the minor number The "n" should be the SCSI Host Side Bus number The "t" should be the target ID as used in the HSZ40 unit DTZL, where the "T" in the DTZL HSZ40 unit matches the "t" from the file command. The "xxx" is the Disk Number, which was discussed in a previous section. If an error is seen such as: file: Cannot get file status on /dev/mmmm /dev/mmmm: cannot open for reading This error usually indicates that the special file in the /dev directory that matches "mmmm" doesn't exist. If the only output that is returned from the file command is the major and minor number, then either the device is not answering or the device special file does not have the correct minor number. Check the minor number to be sure that it matches the correct SCSI Host Side Bus number and the correct HSZ40 TARGET ID and LUN from the HSZ40 unit designator. Page 20 V-A: SCU UTILITY This is the SCSI CAM Utility Program. It is in the /sbin directory. It is documented in the REF Pages (8) This utility can be used to see what HSZ40 units are available to the OSF/1 system. EXAMPLE: /sbin/scu -f /dev/mmmm The "mmmm" represents the character mode special file name associated with an HSZ40 unit. *********************************************************************** /sbin/scu -f /dev/rrza18a scu>Show Nexus ; this scu command will give you SCSI bus information ; in the following format Device Nexus: Bus : "n", Target: "t", Lun "L", Device Type - direct access ************************************************************************* In the above example the device type for a disk is direct access. Page 21 The scu command "scan edt" causes a polling for all devices on the Host side SCSI busses. You can then show what devices are available from all Host Side SCSI busses. The special files don't have to exist for scu to see the devices. scu>scan edt scu>show edt CAM Equipment Device Table (EDT) Information: Bus: 0, Target: 3, Lun: 0, Device Type: Direct Access Bus: 0, Target: 3, Lun: 1, Device Type: (not present) Bus: 0, Target: 3, Lun: 2, Device Type: (not present) Bus: 0, Target: 3, Lun: 3, Device Type: (not present) Bus: 0, Target: 3, Lun: 4, Device Type: (not present) Bus: 0, Target: 3, Lun: 5, Device Type: (not present) Bus: 0, Target: 3, Lun: 6, Device Type: (not present) Bus: 0, Target: 3, Lun: 7, Device Type: (not present) Bus: 0, Target: 4, Lun: 0, Device Type: Read-Only Direct Access Bus: 0, Target: 4, Lun: 1, Device Type: (not present) Bus: 0, Target: 4, Lun: 2, Device Type: (not present) Bus: 0, Target: 4, Lun: 3, Device Type: (not present) Bus: 0, Target: 4, Lun: 4, Device Type: (not present) Bus: 0, Target: 4, Lun: 5, Device Type: (not present) Bus: 0, Target: 4, Lun: 6, Device Type: (not present) Bus: 0, Target: 4, Lun: 7, Device Type: (not present) Bus: 2, Target: 0, Lun: 0, Device Type: Direct Access Bus: 2, Target: 0, Lun: 1, Device Type: (not present) Bus: 2, Target: 0, Lun: 2, Device Type: (not present) Bus: 2, Target: 0, Lun: 3, Device Type: (not present) Bus: 2, Target: 0, Lun: 4, Device Type: (not present) Bus: 2, Target: 0, Lun: 5, Device Type: (not present) Bus: 2, Target: 0, Lun: 6, Device Type: (not present) Bus: 2, Target: 0, Lun: 7, Device Type: (not present) Bus: 2, Target: 1, Lun: 0, Device Type: Direct Access Bus: 2, Target: 1, Lun: 1, Device Type: Direct Access Bus: 2, Target: 1, Lun: 2, Device Type: Direct Access Bus: 2, Target: 1, Lun: 3, Device Type: Direct Access *************************************************************************** The above display will show all Host Side SCSI busses that are available and the devices that are seen on those busses. You should be able to see all HSZ40 units. As an example an HSZ40 unit D103 on Host Side SCSI bus 2, would be Bus: 2, Target: 1, Lun: 3, Device Type: Direct Access HSZ40 unit D307 on Host Side SCSI bus 4 would be: Bus: 4, Target: 3, Lun: 7, Device Type: Direct Access Page 22 IV: DISKLABEL UTILITY Using the name format, rrzxnnp, may present a problem with the disklabel utility. As an example, if a special file is named rrzb17a and if the disklabel utility is invoked using that file name; an error referring to an /mdec error could be the result that there is no file in the /mdec directory for rzaboot or bootrza. In order to fix this problem the following commands should be issued on the OSF/1 system so the naming format rrzxnnp can be used. ln /mdec/bootrz /mdec/bootrza ln /mdec/bootrz /mdec/bootrzb ln /mdec/bootrz /mdec/bootrzc ln /mdec/bootrz /mdec/bootrzd ln /mdec/bootrz /mdec/bootrze ln /mdec/bootrz /mdec/bootrzf ln /mdec/bootrz /mdec/bootrzg ln /mdec/bootrz /mdec/bootrzh ln /mdec/rzboot /mdec/rzaboot ln /mdec/rzboot /mdec/rzbboot ln /mdec/rzboot /mdec/rzcboot ln /mdec/rzboot /mdec/rzdboot ln /mdec/rzboot /mdec/rzeboot ln /mdec/rzboot /mdec/rzfboot ln /mdec/rzboot /mdec/rzgboot ln /mdec/rzboot /mdec/rzhboot These commands can be put into a script file and then execute the script file, or the commands can be executed individually. Page 23 VII: CURRENT KNOWN ADAPTER TYPES 1. KZTSA - tza 2. KZMSA - xza 3. PMAZC, PMAZB - tcds 4. KZPSA - pza 5. NCR 810 PCI SCSI BUS - psiop - KZPAA 6. AHA1740/2 EISA SCSI Bus - aha 7. QLOGIC ISP1020 SCSI Bus - isp 8. DEC/4000 SCSI Bus - siop Page 24 VIII: CONFIGURATION FILE ENTRIES USING THIS OSF/1 NAMING SCHEME In current versions of OSF/1, including V3.2-4, the OSF/1 boot startup procedures will not recognize the name format "rzxnn"(rza17). Also the iostat utility will not recognize the "rzxnn" format. The next sections will discuss procedures for use of the "rzxnn" format for the configuration file and for using iostat. These procedures require editing the configuration file and then rebuilding the kernel from the new configuration file. !! BE SURE TO SAVE THE OLD CONFIGURATION FILE AND KERNEL BEFORE EDITING AND REBUILDING. The format for an entry in the configuration is as follows: disk device rznn at scsiz drive mmm The "nn" is calculated as: nn = ( 8 * Host Side SCSI Bus # ) + ( Target ID from HSZ40 unit number) The "z" denotes the Host Side SCSI BUS number The "mmm" denotes a drive number, it is calculated as follows: (64 * Host SCSI Bus #) + (8 * Target ID from HSZ40 Unit) + LUN of HSZ40 unit Page 25 VIII-A: EDITING THE CONFIGURATION FILE Edit the configuration file as follows. Enter rz"nn" eight times with a different drive number for each entry. Even if all 8 LUNS are not available from an HSZ40 Target ID, all eight entries should exist in the configuration file. Only the first drive number needs to be calculated, for each additional device just add 1 to the previous drive number. EXAMPLE : For HSZ40 units D0 - D7 on Host Side SCSI Bus # 2, the entries in the configuration file would be: bus tcds0 at tc0 slot 6 vector tcdsintr bus tza0 at tc0 slot 5 vector tzaintr controller scsi2 at tza0 slot 0 device disk rz16 at scsi2 drive 128 device disk rz16 at scsi2 drive 129 device disk rz16 at scsi2 drive 130 device disk rz16 at scsi2 drive 131 device disk rz16 at scsi2 drive 132 device disk rz16 at scsi2 drive 133 device disk rz16 at scsi2 drive 134 device disk rz16 at scsi2 drive 135 EXAMPLE : For HSZ40 units D400 - D407 on Host Side SCSI Bus # 5, the entries in the configuration file would be: bus tcds0 at tc0 slot 6 vector tcdsintr bus tza0 at tc0 slot 5 vector tzaintr controller scsi5 at tza0 slot 0 device disk rz44 at scsi5 drive 352 device disk rz44 at scsi5 drive 353 device disk rz44 at scsi5 drive 354 device disk rz44 at scsi5 drive 355 device disk rz44 at scsi5 drive 356 device disk rz44 at scsi5 drive 357 device disk rz44 at scsi5 drive 358 device disk rz44 at scsi5 drive 359 NOTE: !!! Even if the HSZ40 does not present all eight LUNS using the same Target ID, all eight entries for the LUNS 0 - 7 must be in the configuration file. The reason for this will be explained in the next section. That is, if an HSZ40 only has units D100, and D101, all devices that relate to HSZ40 units D100 - D107 should be in the configuration file. Page 26 VIII-B: USING IOSTAT USING THE RECOMMENDED NAMING FORMAT REPEATING WHAT WAS STATED IN THE LAST SECTION: _____________________________________________________________________ All eight devices that relate to LUNs 0 -7 for each target ID used by an HSZ40 must be in the configuration file, even if all eight units are not presented by the HSZ40. THE REASON WILL BE EXPLAINED AT THE END OF THIS SECTION _____________________________________________________________________ The iostat utility will be invoked using the following format: iostat rznn s t The "nn" will be equal to the numeric value that is used in the OSF/1 device name. Do not use the rzxnn, where the "x" is the alphabetic character the denotes the LUN number. Iostat will ignore the alphabetic character. The "s" denotes the amount of time, in seconds, between screen updates. This is optional. The "t" denotes the total number of screen updates. It is also optional. The output from iostat will show all eight devices that use the numeric number "nn". If you want to see activity on the LUN 0 for rznn, use the information from the first column that shows the rznn name. To see activity from LUN 1 on rznn use the second column, etc. Example ***************************************************************************** # iostat rz16 5 4 rz16 rz16 rz16 rz16 rz16 rz16 rz16 rz16 bps tps bps tps bps tps bps tps bps tps bps tps bps tps bps tps 0 0 0 0 0 0 0 0 0 0 0 0 0 0 126 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1618 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1639 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1610 34 ***************************************************************************** In the above example there are eight devices that use the rz16 format in the configuration file. This example shows IO activity on rzh16, with "h" representing LUN 7. LUN 0 is the first column, LUN 1 is the second column and so on. Currently this is the only way to use the iostat utility. If all eight LUNS that use the same target ID are not present, the display will only show those LUNS that are presented by the HSZ40. Page 27 VIII-C: REASON FOR HAVING ALL EIGHT LUNS IN THE CONFIGURATION FILE ***************************************************************************** # iostat rz16 5 4 tty rz3 rz4 rz16 rz16 cpu tin tout tps bps tps bps tps bps tps us ni sy id 0 0 0 0 0 0 0 126 3 1 0 2 97 0 0 0 0 0 0 0 1618 34 1 0 2 98 0 0 0 0 0 0 0 1639 34 1 0 2 98 0 0 0 0 0 0 0 1610 34 1 0 2 98 If all eight entries for rz16 do not appear in the configuration file, or if all eight LUNs are not present, then the number of rz16 entries in iostat would be equal to the number of entries in the configuration file or the number of LUNs with that target ID that are presented by the HSZ40. For example: An HSZ40 only has units D0 and D7, which would be devices rza16 and rzh16. As a result, if a user invokes the iostat utility using the format iostat rz16 5 4 then only two entries for rz16 would appear in the iostat output. The user of iostat would have to be aware that the second entry in the iostat output is the device rzh16. Therefore, it is not necessary to put all device names in the configuration file for each LUN, but putting all eight device names for all LUNs makes it easier to use utilities such as iostat when new HSZ40 units are added. Also, if the units are not in the configuration file, they will not be seen in the OSF/1 startup procedures when the system is booted. Page 28 IX: USING GENVMUNIX Anytime that you use genvmunix to rebuild your configuration file, the new configuration file will only list the HSZ40 LUN 0 units. The name will be in the format of "rzNN". The "NN" represents the numeric number as used in the formula: ( 8 * Host Side SCSI Bus #) + (Target ID from HSZ40 unit number) NON-0 LUNS will not appear in the new configuration file. Before rebuilding your configuration file using genvmunix, you are going to have to save your existing configuration file that has your HSZ40 units. Then rebuild your configuration file from genvmunix, then add the HSZ40 units back into the rebuilt configuration file. Then rebuild your kernel. ---------- Received: from mail11.digital.com by peru.fabrik.com with SMTP (Fabrik F07.1-000) id SINN.12738947@peru.fabrik.com ; Mon, 24 Nov 1997 08:31:04 -0800 Received: from us2rmc.zko.dec.com (us2rmc.zko.dec.com [16.33.16.101]) by mail11.digital.com (8.7.5/UNX 1.5/1.0/WV) with SMTP id KAA25318 for ; Mon, 24 Nov 1997 10:54:43 -0500 (EST) Received: from qbus.enet by us2rmc.zko.dec.com (5.65/rmc-22feb94) id AA04208; Mon, 24 Nov 97 10:54:26 -0500 Message-Id: <9711241554.AA04208@us2rmc.zko.dec.com> Received: from qbus.enet; by us2rmc.enet; Mon, 24 Nov 97 10:54:39 EST Date: Mon, 24 Nov 97 10:54:39 EST From: THE VIRGINIAN To: bob.morningstar1@aopa.org Apparently-To: bob.morningstar1@aopa.org Subject: hsz40/unix config guide ----------