Tag Archives: hpux

How to Rescan new LUN’s added in Linux, HP-UX, Aix, Solaris ?

HP-UX

1. Rescan the devices:

ioscan -fnC <disk|tape>

2. Generate device files:

 insf -e

3. Verify the new devices:

 ioscan -funC <disk|tape>

AIX

1. Rescan the devices ):

 cfgmgr -vl fcsx

Where x is FC adapter number

2. Verify the new devices:

 lsdev -Cc <disk|tape>

Linux

The rescan in Linux is HBA-specific.

For QLogic:

echo scsi-qlascan > /proc/scsi/qla<model#>/<adapter instance>

For Emulex:

 sh force_lpfc_scan.sh lpfc<adapter-instance>

For each identified device, run the following:

echo scsi add-single-device <host> <channel> <ID> <lun> >   /proc/scsi/scsi

Solaris

1. Determine the FC channels:

 cfgadm -al

2. Force rescan :

 cfgadm -o force_update -c configure cx

Where x is the FC channel number

3. Force rescan at HBA port level:

 luxadm -e forcelip /dev/fc/fpx

4. Force rescan on all FC devices:

 cfgadm -al -o show_FCP_dev

5. Install device files:

 devfsadm

6. Display all Qlogic HBA ports

 luxadm -e port

7. Display HBA port information

 luxadm -v display <WWPN>

8. Display HBA port information

 luxadm -e dump_map

Notes If one specific SANclient is missing a drive, please verify that your zoning is correct. Please also make sure the host initiator and VTL™s target ports are showing online via the Fibre Channel switch. (Check HBA link light and check the cable.)

 

How to interpret PV and VG numbers from HP-UX syslog.log

Error messages like the following in syslog.log:

Aug 14 00:14:05 cust1 vmunix: LVM: Performed a switch for Lun ID = 0 (pv = 0x000000005ed22800), from raw device 0x1f00b400 (with priority: 0, and current flags: 0x40) to raw device 0x1f03b400 (with priority: 1, and current flags: 0x0).
Aug 14 00:14:05 cust1 vmunix: LVM: Performed a switch for Lun ID = 0 (pv = 0x000000005ed22800), from raw device 0x1f03b400 (with priority: 1, and current flags: 0x0) to raw device 0x1f00b400 (with priority: 0, and current flags: 0x0).
Aug 14 00:14:05 cust1 vmunix: LVM: Recovered Path (device 0x1f00b400) to PV 11 in VG 18.
Aug 14 00:14:05 cust1 vmunix: LVM: Restored PV 11 to VG 18.

To determine the Volume Group that VG 18 refers to:

translate 18 (dec) into 12 (hex)

then look for the “group” file that has the value 0x??0000 where ?? = the hex value. e.g. issue: ls -lr /dev/*/group | grep 0x120000

 

crw-r–r– 1 root sys 64 0x120000 Apr 19 01:30 /dev/vgdata_02/group

So VG 18 is volume group vgdata_02.

 

To next determine the Physical Volume that PV 11 refers to:

issue: strings /etc/lvmtab

then look at the section for the relevant volume group, e.g. vgdata_02:

/dev/vgdata_02
/dev/dsk/c0t2d0
/dev/dsk/c0t2d3
/dev/dsk/c0t2d4
/dev/dsk/c0t3d0
/dev/dsk/c0t3d3
/dev/dsk/c0t3d4
/dev/dsk/c0t4d2
/dev/dsk/c0t4d5
/dev/dsk/c0t5d1
/dev/dsk/c0t11d2
/dev/dsk/c0t11d3
/dev/dsk/c0t11d4
/dev/dsk/c0t11d5
/dev/dsk/c0t11d6
/dev/dsk/c0t11d7
/dev/dsk/c0t12d0
/dev/dsk/c3t2d0
/dev/dsk/c8t2d0
/dev/dsk/c11t2d0
/dev/dsk/c3t2d3
/dev/dsk/c8t2d3
/dev/dsk/c11t2d3
/dev/dsk/c3t2d4
/dev/dsk/c8t2d4
/dev/dsk/c11t2d4
/dev/dsk/c3t3d0
/dev/dsk/c8t3d0
/dev/dsk/c11t3d0
/dev/dsk/c3t3d3
/dev/dsk/c8t3d3
/dev/dsk/c11t3d3
/dev/dsk/c3t3d4
/dev/dsk/c8t3d4
/dev/dsk/c11t3d4
/dev/dsk/c3t4d2
/dev/dsk/c8t4d2
/dev/dsk/c11t4d2
/dev/dsk/c3t4d5
/dev/dsk/c8t4d5
/dev/dsk/c11t4d5
/dev/dsk/c3t5d1
/dev/dsk/c8t5d1
/dev/dsk/c11t5d1
/dev/dsk/c3t11d2
/dev/dsk/c8t11d2
/dev/dsk/c11t11d2
/dev/dsk/c3t11d3
/dev/dsk/c8t11d3
/dev/dsk/c11t11d3
/dev/dsk/c3t11d4
/dev/dsk/c8t11d4
/dev/dsk/c11t11d4
/dev/dsk/c3t11d5
/dev/dsk/c8t11d5
/dev/dsk/c11t11d5
/dev/dsk/c3t11d6
/dev/dsk/c8t11d6
/dev/dsk/c11t11d6
/dev/dsk/c3t11d7
/dev/dsk/c8t11d7
/dev/dsk/c11t11d7
/dev/dsk/c3t12d0
/dev/dsk/c8t12d0
/dev/dsk/c11t12d0

Note that PV 0 is the first c#t#d# entry. So here PV 11 refers to the 12th entry: /dev/dsk/c0t11d4.

To double-check, determine which c#t#d# that device 0x1f00b400 refers to. It is c0t11d4.

HP-UX: Checking and Modifying the UNIX Kernel

 

Manual Configuration of the Kernel

 

1. Change the kernel parameters according to the table Recommended Kernel Parameters

for HP-UX in the file

 

/stand/system

 

2. Generate a new kernel after making the changes using the following command:

 

mk_kernel -o /stand/vmunix -s /stand/system

 

3. Reboot your system.

 

Configuration of the Kernel Using SAM

  • Enter the command

 

/usr/sbin/sam

 

  • Select:

Kernel Configuration à Configurable Parameters

 

  • Choose the parameter you want to modify and select:

Actions à Modify Configurable Parameter

 

  • Modify all kernel parameters according to the table Recommended Kernel Parameters for HP-UX.
  • Select Process New Kernel from the Actions menu.
  • Exit SAM.
  • Reboot your system.

 

HP-UX: Mounting a CD-ROM

 

Mounting a CD-ROM Manually:

  1. Log on as user root.
  2. Create a mount point for CD-ROM with the command:

mkdir <CD-mountdir>
(usually <CD-mountdir> is /sapcd).

3.      Make sure that the driver is part of the kernel (skip this step if the CD drive is already working):

grep cdfs /stand/system

If the driver is not configured, you have to add the string cdfs to the file /stand/system and rebuild the kernel.  Reboot the system after rebuilding the kernel.

4.      Mount the CD-ROM with the command:

mount -r -F cdfs /dev/dsk/<diskdevice> <CD-mountdir>
<diskdevice> is c0t4d0, a CD drive with hardware address 4.

Mounting a CD-ROM Using SAM:

1.      Enter the command

/usr/sbin/sam

2.      Select:

Disks and Filesystems ? Disk Devices ? Actions ? Mount

3.      Enter the mount directory
<CD-mountdir>

(for example, <CD-mountdir> is /sapcd).

4.      Perform task.

5.      Exit SAM.