HP-UX configuration and attachment
This article describes how to configure and manage the new disk devices on an HP-UX host. Configuration of the devices should be performed by the HP-UX system administrator. Configuration requires superuser/root access to the host system. If you have questions or concerns, contact your Hitachi Vantara representative.
Storage system configuration for HP-UX operations
The storage system must be fully configured before being attached to the HP-UX host, as described in Configuring the storage system.
- Host mode:
The required host mode for HP-UX is 03. Do not select a host mode other than 03 for HP-UX. For a complete list of host modes for the storage system, see Host modes and host mode options. For instructions on setting the host modes, see the Provisioning Guide for the storage system.
- Host mode options:
You may also need to set host mode options (HMOs) to meet your operational requirements. For a complete list of HMOs for the storage system, see Host modes and host mode options. For instructions on setting the HMOs, see the Provisioning Guide for the storage system.
Configuration of the new devices on HP-UX
Configuration of the new devices requires superuser/root access to the HP-UX host system and should be performed by the HP-UX system administrator. If you have questions or concerns, please contact your Hitachi Vantara representative.
Verifying new device recognition for HP-UX
The first step in configuring the new disk devices is to verify that the host system recognizes the new devices. The host system automatically creates a device file for each new device recognized.
The devices should be installed and formatted with the ports configured before the host system is powered on. Type the cfgmgr command to force the system to check the buses for new devices.
Procedure
Log in to the HP-UX system as root.
Use the ioscan -f command to display the device data. Verify that the system recognizes the newly installed devices (see the following figure). If desired, use the -C disk command option (ioscan -fnC disk) to limit the output to disk devices only.
This sample screen shows the following new devices recognized:
- HITACHI OPEN-9 device: bus no. = 8/12, bus instance = 2, target ID = 6, LUN = 0, driver = sdisk
- HITACHI OPEN-9 device: bus no. = 8/12, bus instance = 2, target ID = 6, LUN = 1, driver = sdisk
- HITACHI 3390-3B device: bus no. = 8/12, bus instance = 2, target ID = 8, LUN = 0, driver = sdisk
Note- If UNKNOWN appears as the Class type, the HP-UX system may not be configured properly. Refer to the HPE documentation or contact HPE technical support.
- If information for unused devices remains in the system, get the system administrator’s permission to renew the device information. To renew the device information, delete the /etc/ioconfig and /stand/ioconfig files (rm command), reboot the server, and then issue the ioinit -c command. Now issue the ioscan -f command to recognize the logical devices again.
Make a blank table for recording the device data (see the sample table below). The table must have nine columns for the following data: bus number, bus instance number, disk number, H/W path, driver, device type, target ID, LUN, and device file name. You will need three more columns for entering the major and minor numbers later.
Enter the device data for each device (disk devices and raw/FX devices) in your table including the device file name. The device file name has the following structure:
File name = cXtYdZ
where
- X = bus instance #
- Y = target ID
- Z = LUN
The “c” stands for controller, the “t” stands for target ID, and the “d” stands for device. The SCSI target IDs are hexadecimal (0 through F) and the LUN is decimal (0 through 7).
Verify that the SCSI TIDs correspond to the assigned port address for all connected ports (SCSI TID Maps for FC adapters). If so, the logical devices are recognized properly. If not:
Check the AL-PA for each port using the LUN Manager software. If the same port address is set for multiple ports on the same loop (AL with HUB), all port addresses except one changed to another value, and the relationship between AL-PA and TID does not correspond to the mapping in SCSI TID Maps for FC adapters. Set a different address for each port, reboot the server, and then verify new device recognition again.
If unused device information remains, the TID-to-AL-PA mapping will not correspond to the mapping in SCSI TID Maps for FC adapters. Renew the device information (see step 2 for instructions) and then verify new device recognition again.
Next steps
Verifying device files and the driver for HP-UX
The device files for all new devices (SCSI disk and raw/FX) should be created automatically during system startup. Each device should have a block-type device file in the /dev/dsk directory and a character-type device file in the /dev/rdsk directory. The SCSI disk devices must have both device files. Raw/FX devices only require the character-type device file.
Procedure
Display the block-type device files in the /dev/dsk directory using the ll command (equivalent to ls -l) with the output piped to more. Verify that there is one block-type device file for each device.
# ll /dev/dsk | more total 0 brw-r----- 1 bin sys 28 0x000000 Oct 4 11:01 c0t0d0 brw-r----- 1 bin sys 28 0x006000 Dec 6 15:08 c0t6d0 brw-r----- 1 bin sys 28 0x006100 Dec 6 15:08 c0t6d1
Use your completed device data table to verify that the block-type device file name for each device is correct.
Display the character-type device files in the /dev/rdsk directory using the ll command with the output piped to more. Verify that there is one character-type device file for each new device.
# ll /dev/rdsk | more total 0 crw-r----- 1 bin sys 177 0x000000 Oct 4 11:01 c0t0d0 crw-r----- 1 bin sys 177 0x006000 Dec 6 15:08 c0t6d0 crw-r----- 1 bin sys 177 0x006100 Dec 6 15:08 c0t6d1
Use your completed device data table to verify that the character-type device file name for each device is correct.
After verifying the block-type and character-type device files, verify the HP-UX driver for the storage system using the ioscan -fn command.
# ioscan -fn Class I H/W Path Driver S/W State H/W Type Description ======================================================================= bc 0 root CLAIMED BUS_NEXUS bc 1 8 bc CLAIMED BUS_NEXUS Bus Converter fc 0 8/12 fcT1 CLAIMED INTERFACE HP Fibre Channel Mass Storage fcp 0 8/12.8 fcp CLAIMED INTERFACE FCP Protocol Adapter ext_bus 2 8/12.8.0.255.0 fcpdev CLAIMED INTERFACE FCP Device Interface target 7 8/12.8.0.255.0.6 tgt CLAIMED DEVICE disk 3 8/12.8.8.255.0.6.0 sdisk CLAIMED DEVICE HITACHI OPEN-9 /dev/dsk/c2t6d0 /dev/rdsk/c2t6d0 disk 4 8/12.8.8.255.0.6.1 sdisk CLAIMED DEVICE HITACHI OPEN-9 /dev/dsk/c2t6d1 /dev/rdsk/c2t6d1 disk 5 8/12.8.8.255.0.8.0 sdisk CLAIMED DEVICE HITACHI 3390*3B /dev/dsk/c2t8d0 /dev/rdsk/c2t8d0 : #
Creating device files manually on HP-UX
If the device files were not created automatically when the HP-UX system was restarted, issue the insf -e command in the /dev directory to instruct the HP-UX system to create the device files. After executing this command, repeat the procedure in Verifying new device recognition for HP-UX to verify new device recognition and the device files and driver.
# cd /dev # insf -e insf: Installing special files for mux2 instance 0 address 8/0/0 : : : : : : : : #
If the device files for the new devices cannot be created automatically, use the following procedure to create the device files manually.
Procedure
Obtain your Device Data table on which you recorded the data for the new devices. You should have the following information for all new devices:
- Bus number
- Bus instance number
- Disk number
- Driver
- Device type
- Target ID
- LUN
Build the device file name for each device, and enter the device file names into your table. Example:
File name =cXtYdZ
, where X = bus instance #, Y = target ID, Z = LUN.Build the minor number for each device, and enter the minor numbers into your table. Example:
0xXXYZ00
, where XX = bus instance #, Y = SCSI target ID, and Z = LUN.Display the driver information for the system using the lsdev command.
This sample screen shows the following system information for the “sdisk” device driver:
- Major number of driver sdisk for character-type files: 188
- Major number of driver sdisk for block-type files: 31
Enter the major numbers for the drivers into your table. You should now have all required device and driver information in the Device Data table (as shown in step 4).
Create the device files for all new devices (SCSI disk and raw/FX devices) using the mknod command. Be sure to create the block-type device files in the /dev/dsk directory and the character-type device files in the /dev/rdsk directory, as shown in the following example:
The character-type device file is required for volumes used as raw devices (for example, 3390-3A). The block-type device file is not required for raw devices. If you need to delete a device file, use the rm -i command.
Partitioning disk devices for HP-UX
The HP-UX system uses the Logical Volume Manager (LVM) to manage the disk devices on all peripheral storage devices including the storage system. Under LVM disk management, a volume group consisting of multiple disks is formed, and then the volume group is divided into logical partitions and managed as a logical volume. These procedures should be executed for all device files corresponding to the new SCSI disk devices.
To partition the new SCSI disk devices for LVM operation:
- Create a physical volume for each new SCSI disk device, see Creating physical volumes for new disk drives for HP-UX.
- Create new volume groups as desired, see Creating volume groups for the new physical volumes for HP-UX to increase the maximum volume groups (maxvgs) setting.
- Create a logical volume for each new SCSI disk device, see Creating logical volumes for new disk devices for HP-UX.
This section provides general instructions and basic examples for partitioning the SCSI devices for LVM operations using UNIX commands. These instructions do not explicitly cover all LVM configuration issues. For more information about LVM configuration, see the appropriate user documentation or contact HPE technical support.
Creating physical volumes for new disk drives for HP-UX
The first step in partitioning the new devices is to create a physical volume for each new disk device. Once the physical volumes have been created, you will be able to assign these new physical volumes to new or existing volume groups for management by LVM.
Procedure
Use the pvcreate command to create the physical volume with the character-type device file as the argument. Specify the /dev/rdsk directory for the character file. You can only create one physical volume at a time.
Example:
# pvcreate /dev/rdsk/c2t6d0 Physical volume “/dev/rdsk/c2t6d0” has been successfully created. # pvcreate /dev/rdsk/c2t6d1 Physical volume “/dev/rdsk/c2t6d1” has been successfully created. :
NoteDo not use the -f (force) option with the pvcreate command. This option creates a new physical volume forcibly and overwrites the existing volume.Repeat step 1 for each new disk device on the storage system.
Creating volume groups for the new physical volumes for HP-UX
After the physical volumes for the disk devices have been created, you can begin creating new volume groups for the new physical volumes as needed. If desired, you can also add any of the new physical volumes on the storage system to existing volume groups using the vgextend command. The physical volumes, which make up one volume group, can be located in the same disk system or in different disk systems.
- Do not assign the raw/FX devices (for example, OPEN-x-FXoto) to volume groups.
- You may need to modify the HP-UX system kernel configuration (maxvgs setting) to allow more volume groups to be created (see Online device installation on HP-UX).
Procedure
Use the ls command to display the existing volume groups.
# ls /dev vg00 : vg05 #
Use the mkdir command to create the directory for the new volume group. Choose a name for the new volume group that is different than all other group names. Do not use an existing volume group name.
# mkdir /dev/vg06
TipIf you need to delete a directory, use the rmdir command (for example,rmdir /dev/vgnn
).Use the ls command to verify the new directory.
# ls /dev vg00 : vg06 #
Use the ll command to verify the minor numbers for existing group files with the output piped to grep to display only the files containing “group”.
# ll /dev/vg* | grep group crw-rw-rw 1 root root 64 0x000000 Nov 7 08:13 group : #
In this example, the minor number of the existing group file is 00 (
0x000000
).Choose a minor number for the new group file in sequential order (that is, when existing volume groups are vg00-vg05 and next group name is vg06, use minor number 06 for the vg06 group file). Do not to duplicate any minor numbers.
The minor numbers are hexadecimal (for example, the tenth minor number is 0x0a0000, not 0x100000).
Use the mknod command to create the group file for the new directory. Specify the correct volume group name, major number, and minor number. The major number for all group files is 64.
# mknod /dev/vg06/group c 64 0x060000 : #
In this example, group name = vg06, major number of group file = 64, and minor number of new group file = 06.
TipIf you need to delete a group file, use the rm -r command to delete the group file and the directory at the same time (for example,rm -r /dev/vgnn
), and start again at step 2.Repeat steps 5 and 6 for each new volume group.
Use the vgcreate command to create the volume group.
# vgcreate /dev/vg06 /dev/dsk/c2t6d0 Volume group "/dev/vg06" has been successfully created. Volume group configuration for /dev/vg06 has been saved in /etc/1vmconf/vg06.cof. # vgcreate -s 8 -e 15845 /dev/vg09 /dev/dsk/c2t7d0 Volume group "/dev/vg09" has been successfully created. Volume Group configuration for /dev/vg09 has been saved in /etc/lvmconf/vg09.cof
This example shows the creation of volume group vg06 with device
For LUSE volumes with more than 17 OPEN-8/9 LDEVs (n > 18) or more than 7043 MB (OPEN 8/9*n-CVS), use thec2t6d0
and the creation of volume group vg09 with LUSE devicec2t7d0
(n = 18).-s
and-e
physical extent (PE) parameters of vgcreate, as shown in the example above (PE Size =-s 8
, MPE Size =-e 15845
).For details about the PE and MPE parameters for LUSE devices, see PE and MPE parameters for LUSE devices for HP-UX.
Tip- To allocate more than one
physical volume to the new volume group, add the other physical
volumes separated by a space (for example,
vgcreate /dev/vg06 /dev/dsk/c0t6d0 /dev/dsk/c0t6d1
). - If you need to delete a
volume group, use the vgremove
command (for example,
vgremove /dev/vgnn
). If the vgremove command does not work because the volume group is not active, use the vgexport command (for example,vgexport /dev/vgnn
).
- To allocate more than one
physical volume to the new volume group, add the other physical
volumes separated by a space (for example,
Use the vgdisplay command to verify that the volume group was created correctly. The -v option displays the detailed volume group information.
# vgdisplay /dev/vg06 --- Volume groups --- VG Name /dev/vg06 VG Write Access read/write VG Status available Max LV 255 Cur LV 0 Open LV 0 Max PV 16 Cur PV 1 Act PV 1 Max PE per PV 1016 VGDA 2 PE Size (Mbytes) 4 Total PE 586 Alloc PE 0 Free PE 586 Total PVG 0
For LUSE devices, verify the values displayed for
Max PE per PV
andPE Size (Mbytes)
.
PE and MPE parameters for LUSE devices for HP-UX
Device type |
Physical Extent Size (PE) |
Max Number of Physical Extents (MPE) | |
OPEN-3/8/9/E OPEN-3*n (n= 2 to 36) OPEN-3-CVS OPEN-3*n-CVS (n = 2 to 36) |
default |
default | |
OPEN-8/9*n | n = 2 to 17 |
default |
default |
n = 18 | 8 | 15845 | |
OPEN-E*n | n = 2 to 9 |
default |
default |
OPEN-L*n | n= 2 to 3 |
default |
default |
OPEN-8/9/E-CVS, OPEN-V |
default |
default | |
OPEN-8/9/E*n-CVS, OPEN-V*n (n = 2 to 36) |
70-119731(MB) x N1 | 8 |
default |
119732- (MB) x N1 | 8 | N2 | |
N1 = [ Virtual LVI/LUN volume capacity (in MB) ] x n N2 = ceil (N1 / PE) (ceil () means round up to next integer.) Example: Volume capacity is 6000 MB for OPEN-9*22-CVS volume: N1 = 6000 x 22 = 132000 N2 = ceil(132000/8) = 16500 |
Creating logical volumes for new disk devices for HP-UX
After you have created the new volume groups, create the logical volumes for each new disk device on the storage system.
Procedure
Use the lvcreate -L command to create the logical volume, and specify the volume size and volume group for the new logical volume.
For example, to create an OPEN-3 volume (2344 MB):# lvcreate -L 2344 /dev/vg06 Logical volume "/dev/vg06/lvol1" has been successfully created with character device "/dev/vg06/rlvol1". Logical volume "/dev/vg06/lvol1" has been successfully extended. Volume Group configuration for /dev/vg06 has been saved in /etc/1vmconf/vg06.cof.
The HP-UX system assigns the logical volume numbers automatically (lvol1, lvol2, lvol3, …). Use the capacity values specified in Logical device types for the size parameter (for example, OPEN-3 = 2344, OPEN-V = 61432 in maximum size).
To calculate S1 for VLL, LUSE, and VLL LUSE volumes, use the vgdisplay command to display the physical extent size (PE Size) and usable number of physical extents (Free PE) for the volume. Calculate the maximum size value (in MB) as follows:
S1 = ( PE Size) × (Free PE)
For example:
# vgdisplay /dev/vg01 --- Volume groups --- VG Name /dev/vg01 VG Write Access read/write VG Status available Max LV 255 Cur LV 0 Open LV 0 Max PV 16 Cur PV 1 Act PV 1 Max PE per PV 1016 VGDA 2 PE Size (Mbytes) 4 Total PE 586 Alloc PE 0 Free PE 586 Total PVG 0
This example shows the following information for
/dev/vg01
:- Physical extent size = 4
- Usable number of physical extents = 586
Therefore, maximum size value = 4 × 586 = 2344
Use the lvdisplay command to verify that the logical volume was created correctly. If desired, wait until all logical volumes have been created, and then use the * wildcard character with the lvdisplay command to verify all volumes at one time (for example,
Example:lvdisplay /dev/vg06/lvol*
).# lvdisplay /dev/vg06/lvol1 --- Logical volume --- LV Name /dev/vg06/lvol1 VG Name /dev/vg06 LV Permission read/write LV Status available/syncd Mirror copies 0 Consistency Recovery MWC Schedule parallel LV Size (Mbytes) 2344 (7040 for OPEN-9) Current LE 586 (1760 for OPEN-9) Allocated PE 586 (1760 for OPEN-9) Stripes 0 Stripe Size (Kbytes) 0 Bad block on Allocation strict
In this example:
- LV Size 2344 = 586 * 4 = OPEN-3
- LE = logical extent
- PE= physical extent
Repeat steps 1 and 2 for each logical volume to be created. You can only create one logical volume at a time, but you can verify more than one logical volume at a time.
Tip- If you need to delete a logical volume, use the
lvremove command (for example,
lvremove /dev/vgnn/lvolx
). - If you need to increase the size of an existing logical volume, use the
lvextend command (for example,
lvextend L size /dev/vgnn/lvolx
). - If you need to decrease the size of an existing logical volume, use the
lvreduce command (for example,
lvreduce L size /dev/vgnn/lvolx
).
- If you need to delete a logical volume, use the
lvremove command (for example,
Creating file systems for HP-UX
After you have created logical volumes, you are ready to create the file system for each new logical volume on the storage system. The default file system type for HP-UX version 11i is vxfs.
Procedure
Use the newfs command to create the file system with the logical volume as the argument.
- Example of creating a file system (default file system, OPEN-3)
# newfs /dev/vg06/rlvol1 newfs: /etc/default/fs is used for determining the file system type mkfs (vxfs): Warning -272 sector(s) in the last cylinder are not allocated. mkfs (vxfs): /dev/vg06/rlvol1 - 2400256 sectors in 3847 cylinders of 16 tracks, 2457.9MB in 241 cyl groups (16 c/g, 10.22Mb/g, 1600 i/g) Super block backups (for fsck -b) at: 16, 10040, 20064, 30038, 40112, 50136, 60160, 70184, 80208, 90232, ... 2396176 #
- Example of creating a file system (default file system, OPEN-9)
# newfs /dev/vg06/rlvol1 newfs: / etc/default/fs is used for determining the file system type mkfs (vxfs): ... : 7188496, 7198520, 7208544 #
- Example of creating a file system (specifying the file system type)
# newfs -F vxfs /dev/vg06/rlvol1 : # newfs -F vxfs /dev/vg06/rlvol2
- Example of creating a file system (default file system, OPEN-3)
Repeat step 1 for each new logical volume on the storage system.
Setting device parameters for HP-UX
When device files are created, the HP-UX system sets the IO time-out parameter to its default value of 20 seconds and the queue depth parameter to its default value of either 2 or 8. You must change these values for all new disk devices on the storage system.
Setting the IO time-out parameter for HP-UX
The IO time-out parameter for the disk devices on the storage system must be set to 60 seconds.
Procedure
Use the pvdisplay command to verify the current IO time-out value.
# pvdisplay /dev/dsk/c0t6d0 --- Physical volumes --- PV Name /dev/dsk/c0t6d0 VG Name /dev/vg06 PV Status available Allocatable yes VGDA 2 Cur LV 1 PE Size (Mbytes) 4 Total PE 586 Free PE 0 Allocated PE 586 Stale PE 0 IO Timeout (Seconds) default
Shown in this example:
- Total PE: 586 indicates OPEN-3, 1760 indicates OPEN-9
- Allocated PE: 586 indicates OPEN-3, 1760 indicates OPEN-9
- IO Timeout: default
Use the pvchange -t command to change the IO time-out value to 60.
# pvchange -t 60 /dev/dsk/c0t6d0 Physical volume “/dev/dsk/c0t6d0” has been successfully changed. Volume Group configuration for /dev/vg06 has been saved in /etc/lvmconf/vg06.cof
Use the pvdisplay command to verify that the new IO time-out value is 60 seconds.
# pvdisplay /dev/dsk/c0t6d0 --- Physical volumes --- PV Name /dev/dsk/c0t6d0 VG Name /dev/vg06 PV Status available : Stale PE 0 IO Timeout (Seconds) 60
Repeat steps 1 through 3 for each new disk device on the storage system.
Setting the queue depth parameter for HP-UX
The HP-UX system automatically sets the queue depth to a default value of 2 or 8, depending on the installed HPE options and drivers. You must change the queue depth values for all new disk devices on the storage system. The following table lists the recommended queue depth values for the devices. You can adjust the queue depth as needed to optimize the I/O performance of the devices. For details, see Host queue depth .
Storage system | Recommended queue depth settings |
VSP 5000 series | Target ports:
Bidirectional ports:
|
VSP G1x00, VSP F1500 |
|
VSP |
|
VSP G130, G/F350, G/F370, G/F700, G/F900 | Target ports:
Universal ports:
|
VSP G200, G400, G600, G800, VSP F400, F600, F800 |
|
Using the scsictl command, you can view and change the queue depth parameter for each device one volume at a time. However, the queue depth is reset to the default value the next time the system restarts. Therefore, you must create and register a start-up script to set the queue depth for the disk devices each time the system restarts (see Queue depth start-up script for HP-UX).
Procedure
If you cannot shut down and restart the system at this time, use the scsictl command to set the queue depth for each new device. The scsictl commands to set queue depth should be registered as HP-UX start-up script for future reboot.
# /usr/sbin/scsictl -m queue_depth=32 -a /dev/rdsk/c0t6d0 # /usr/sbin/scsictl -m queue_depth=32 -a /dev/rdsk/c0t6d1 # /usr/sbin/scsictl -m queue_depth=32 -a /dev/rdsk/c0t6d2 # /usr/sbin/scsictl -m queue_depth=32 -a /dev/rdsk/c0t6d3 : : # /usr/sbin/scsictl -m queue_depth=32 -a /dev/rdsk/c0t8d0
Check the /sbin/init.d and /sbin/rc1.d directories to see whether the script name "queue" is already used (link name Sxxxqueue or Kxxxqueue).
# ls /sbin/init.d OspfMib clean_ex dfs hpether names nis.server savecore swconfig SnmpHpunix clean_tmps diagnostic iforls ncs pd sendmail syncer : clean_adm ddfa hparray mrouted nis.client rwhod swcluster xntpd # ls /sbin/rc1.d K230audio K340xntpd K420dfs K475rarpd K630named S420set_date K240auditing K356vjed K430dce K480rdpd K660net S440savecore K250envd K358egcd K435OspfMib K490gated K700nettl S500swap_start K258diagnostic K360kks K435SnmpHpunix K500inetd K770ptydaemon S520syncer K270cron K370vt K435SnmpMib2 K510mrouted K780syslogd K278pd K380xfs K440SnmpMaster K570nfs.client K900swagentd K280lp K390rbootd K450ddfa K580nis.client S100localmount K290hparray K400iforls K460sendmail K590nis.server S320hostname K300acct K410ncs K470rwhod K600nfs.core S400set_prvgrp
Choose a unique name for the start-up script as follows:
- If there is no script named "queue" and no link file named Sxxxqueue or Kxxxqueue, use the name "queue" for the new script and go to step 3.
- If the script "queue" and the link file Sxxxqueue or Kxxxqueue exist and the script is used to set the queue depth for other previously installed storage systems, check the script file to see whether the queue depth is set to the desired number and add a line for each new disk device. If necessary, restart the HP-UX system to set the queue depth for the new volumes.
- If the script queue and the link file
Sxxxqueue or Kxxxqueue
already exist and the script is not used for setting the queue depth
for the storage system, use another name for the new queue-depth
script for the storage system (for example, hitachi_q) and go to step 3. NoteIf the link Sxxxqueue and/or Kxxxqueue exists, but there is no script file named "queue", delete the link files, use the name "queue" for the new script, and go to step 3.
Choose a unique 3-digit number for the link name. This number cannot be used in any other links. The link name is derived as follows: S stands for “start up script,” K stands for “kill script,” the three-digit number is unique to each link, and the script file name follows the three-digit number (for example, S890queue or S890hitachi_q).
Create and register the new start-up script for the storage system (see Queue depth start-up script for HP-UX for an example).
Shut down and restart the HP-UX system, so the new start-up script sets the queue depth for the disk devices to the specified value.
After restarting the system or setting the queue depths manually, use the scsictl command to verify the queue depth for each disk device.
# /usr/sbin/scsictl -a /dev/rdsk/c0t6d0 immediate_report = 0; queue_depth = 32 : : # /usr/sbin/scsictl -a /dev/rdsk/c0t8d0 immediate_report = 0; queue_depth = 32
Queue depth start-up script for HP-UX
The queue (or hitachi_q) start-up script sets the queue depth to 8 for all new volumes (SCSI disk devices) on the storage system each time the HP-UX system restarts. If the queue script exists for a previously installed storage system, check the script file to verify that the queue depth value is set to the desired value, and add a line for each new volume. If the script does not exist, create and register the script as shown in the example below. You can use the UNIX vi editor or other text editor to create or edit the script.
# cp /sbin/init.d/template /sbin/init.d/queue # vi /sbin/init.d/queue --------------------------file(/sbin/init.d/queue)---------------------- # !/sbin/sh # # @(#) $Revision: 78.1 $ # # NOTE: This script is not configurable! Any changes made to this # script will be overwritten when you upgrade to the next # release of HP-UX. # # WARNING: Changing this script in any way may lead to a system that # is unbootable. Do not modify this script. # # <Insert comment about your script here> # # Allowed exit values: # 0 = success; causes "OK" to show up in checklist. # 1 = failure; causes "FAIL" to show up in checklist. # 2 = skip; causes "N/A" to show up in the checklist. # Use this value if execution of this script is overridden # by the use of a control variable, or if this script is not # appropriate to execute for some other reason. # 3 = reboot; causes the system to be rebooted after execution. # Input and output: # stdin is redirected from /dev/null # stdout and stderr are redirected to the /etc/rc.log file # during checklist mode, or to the console in raw mode. PATH=/usr/sbin:/usr/bin:/sbin export PATH # NOTE: If your script executes in run state 0 or state 1,then /usr # might not be available. Do not attempt to access commands or # files in /usr unless your script executes in run state 2 or # greater. Other file systems typically not mounted until run # state 2 include /var and /opt. rval=0 # Check the exit value of a command run by this script. If non-zero, # the exit code is echoed to the log file and the return value of this # script is set to indicate failure. set_return() { x=$? if [ $x -ne 0 ]; then echo "EXIT CODE: $x" rval=1 # script FAILed fi } # Kill the named process(es). # $1=<search pattern for your process> killproc() { pid='ps -el | awk '( )$NF ~ /'"$1"'/) && ($4 !=mypid) && ($5 != mypid) ){ print $4 }' mypid=$$ ' if [ "X$pid" != "X" ]; then if kill "$pid"; then echo "$1 stopped" else rval=1 echo "Unable to stop $1" fi fi } case $1 in 'start_msg') # Emit a _short_ message relating to running this script with # the "start" argument; this message appears as part of the # checklist. echo "Setting the queue value" ;; 'stop_msg') # Emit a _short_ message relating to running this script with # the "stop" argument; this message appears as part of the # checklist. echo "Stopping the <specific> system" ;; 'start') __________________________________________________________________ # source the system configuration variables | if [ -f /etc/rc.config ] ; then | . /etc/rc.config | else | echo "ERROR: /etc/rc.config defaults file MISSING" | fi | | # Check to see if this script is allowed to run... | if [ "$CONTROL_VARIABLE" != 1 ]; then | rval=2 | else | | # Execute the commands to stop your system | : | fi | /usr/sbin/scsictl -m queue_depth=8 /dev/rdsk/c0t6d0 /usr/sbin/scsictl -m queue_depth=8 /dev/rdsk/c0t6d1 /usr/sbin/scsictl -m queue_depth=8 /dev/rdsk/c0t8d0 : ;; 'stop') # source the system configuration variables if [ -f /etc/rc.config ] ; then . /etc/rc.config else echo "ERROR: /etc/rc.config defaults file MISSING" fi # Check to see if this script is allowed to run... if [ "$CONTROL_VARIABLE" != 1 ]; then rval=2 else : # Execute the commands to stop your system fi ;; *) echo "usage: $0 {start|stop|start_msg|stop_msg}" rval=1 ;; esac exit $rval --------------------------end of file(/sbin/init.d/queue)--------------------- # ls /sbin/rc1.d K230audio K340xntpd K420dfs K475rarpd K630named S420set_date K240auditing K356vjed K430dce K480rdpd K660net S440savecore K250envd K358egcd K435OspfMib K490gated K700nettl S500swap_start K258diagnostic K360kks K435SnmpHpunix K500inetd K770ptydaemon S520syncer K270cron K370vt K435SnmpMib2 K510mrouted K780syslogd K278pd K380xfs K440SnmpMaster K570nfs.client K900swagentd K280lp K390rbootd K450ddfa K580nis.client S100localmount K290hparray K400iforls K460sendmail K590nis.server S320hostname K300acct K410ncs K470rwhod K600nfs.core S400set_prvgrp # ln -s /sbin/init.d/queue /sbin/rc1.d/S890queue
Creating mount directories for HP-UX
After you create the file systems and set the device parameters, create the mount directory for each volume. Choose a unique name for each mount directory that identifies the logical volume.
Procedure
Use the mkdir command to create the mount directory with the new mount directory name as the argument.
# mkdir /VSP-LU00
Use the ls -x command to verify the new mount directory.
# ls –x VSP-LU00 bin dev device etc export floppy home hstsboof kadb kernel lib #
TipIf you need to delete a mount directory, use the rmdir command.Repeat steps 1 and 2 for each new device on the storage system.
Mounting and verifying file systems for HP-UX
After you have created the mount directories, mount the file system for each new logical volume and verify the file systems.
Procedure
Use the mount command to mount the file system for the volume.
# mount /dev/vg06/lvol1 /VSP-LU00
In this example,
/dev/vg06/lvol1
is the Block-type lvol name andVSP-LU00
is the mount directory nameRepeat step 1 for each new logical volume on the storage system.
Use the bdf command to verify that the file systems are correct. Be sure the capacity (listed under Kbytes) is correct for each device.
# bdf Filesystem Kbytes used avail %used Mounted on /dev/vg00/lvol1 59797 59364 0 100% / : /dev/vg06/lvol1 2348177 9 2113350 0% /VSP-LU00 /dev/vg07/lvol1 2348177 9 2113350 0% /VSP-LU01 /dev/vg08/lvol1 7052764 9 6347478 0% /VSP-LU02
Perform basic UNIX operations, such as file creation, copying, and deletion, on each logical device to be sure the new devices on the storage system are fully operational.
# mount /dev/vg06/lvol1 /VSP-LU00 # cd /VSP-LU00 # cp /bin/vi /VSP-LU00/vi.back1 # ll drwxr-xr-t 2 root root 8192 Mar 15 11:35 lost+found -rwxr-xr-x 1 root sys 217088 Mar 15 11:41 vi.back1 # cp vi.back1 vi.back2 # ll drwxr-xr-t 2 root root 8192 Mar 15 11:35 lost+found -rwxr-xr-x 1 root sys 217088 Mar 15 11:41 vi.back1 -rwxr-xr-t 1 root sys 217088 Mar 15 11:52 vi.back2 # rm vi.back1 # rm vi.back2
If you want to unmount a file system after it has been mounted and verified, use the umount command (for example,
umount /VSP-LU00
).
Setting and verifying auto-mount parameters for HP-UX
The final step in configuring the storage system volumes for LVM operations is to set up and verify the auto-mount parameters for each new volume. The /etc/fstab file contains the auto-mount parameters for the logical volumes. If you do not plan to auto-mount the new devices, you can skip this section.
Procedure
Edit the /etc/fstab file to add a line for each new volume (SCSI disk device) on the storage system.
# cp -ip /etc/fstab /etc/fstab.standard Make backup before editing. # vi /etc/fstab Edit the file (vi shown). /dev/vg00/lvol1 / vxfs rw 0 1 # root /dev/vg00/lvol2 swap ignore sw 0 0 # primary swap : /dev/vg06/lvol1 /VSP-LU00 vxfs defaults 0 2 # VSP-LU00 /dev/vg06/lvol2 /VSP-LU01 vxfs defaults 0 2 # VSP-LU01 See Auto-mount Parameters
Auto-mount Parameters
Parameter # Name Enter: 1 Device to mount Block-type device file name
2 Mount point Mount directory name
3 File System File system type (for example, vxfs)
4 Mount options Usually "defaults"
5 Enhance "0"
6 File system check (fsck pass) Order for performing file system checks
7 Comment Any comment statement
After you finish editing the /etc/fstab file, reboot the HP-UX system. If you cannot reboot at this time, issue the mount -a command.
Use the bdf command to verify the device file systems again.
Online device installation on HP-UX
After initial installation and configuration of the storage system, additional devices can be installed or de-installed online without having to restart the HP-UX system. This procedure should be performed by the system administrator (that is, super-user).
Use the normal disruptive device configuration procedure in the following cases:
- Fibre: If a new fibre-channel connection is being installed. New fibre-channel connections can only be installed when the host system is powered off. New devices under existing fibre-channel ports can be installed and configured non-disruptively.
- Maxvgs: If the maxvgs parameter needs to be changed. The procedure for changing the maxvgs value in the system kernel requires a system reboot.
Procedure
Verify that the new devices on the storage system are ready to be configured. The Hitachi Vantara representative should have completed hardware installation and verified the normal status of the new devices (see Installing the storage system).
Be sure that you are logged in as root.
Enter the insf -e command to perform online device recognition.
The insf -e command creates device files for the new devices on the existing fibre busses (see Creating device files manually on HP-UX).Configure the new disk devices for HP-UX operations described in HP-UX configuration and attachment. For raw/FX devices, you only need to verify the device files and driver. Do not partition or create a file system on any raw/FX device.
Configure the application failover, path failover (that is, vgextend), and/or SNMP software on the HP-UX system as needed to recognize the new disk devices. For additional information about online installation and reinstallation of LUs, see the Maintenance Manual for the storage system.
Troubleshooting for HP-UX host attachment
The following table lists potential error conditions that might occur during storage system installation on an HP-UX host and provides instructions for resolving the conditions. If you cannot resolve an error condition, contact customer support.
Error condition |
Recommended action |
The logical devices are not recognized by the system. |
Make sure the READY indicator lights on the storage system are ON. Make sure the FC cables are correctly installed and firmly connected. Make sure that LUSE devices are not intermixed with normal LUs on the same fibre-channel port. Verify that LUNs are configured properly for each TID. Run sr-probe to recheck the fibre channel for new devices. For HP-UX 11iv3 and later, verify that LUN 0 is defined as the Command Console LUN (CCL) and mapped to the server. |
A physical volume cannot be created (PVCREATE command). |
Ensure the storage system devices are properly formatted. Ensure the character-type device file exists. Ensure the correct character-type device file name is used with pvcreate. |
A volume group cannot be created (VGCREATE command). |
Ensure the directory for the new volume group exists. Ensure the control file exists. Ensure the correct major # (64) and minor # are used with mknod. Ensure the block-type file exists and is entered correctly with vgcreate. Ensure the physical volume is not already allocated to another volume group. |
A logical volume cannot be created (LVCREATE command). |
Ensure the specified capacity is not greater than 4096 MB. Ensure the capacity of the volume group is not less than the capacity of the partitioned logical volume. |
File system cannot be created (newfs). |
Ensure the character-type device file is entered correctly with newfs. |
The file system is not mounted after rebooting. |
Ensure the system was restarted properly. Ensure the auto-mount information in the /etc/fstab file is correct. |
The HP-UX system does not reboot properly after hard shutdown. |
If the HP-UX system is powered off without executing the shutdown process, wait three minutes before restarting the HP-UX system. This allows the storage system internal time-out process to purge all queued commands so that the storage system is available (not busy) during system startup. If the HP-UX system is restarted too soon, the storage system will continue trying to process the queued commands and the HP-UX system will not reboot successfully. |