Patch Name: PHKL_20040 Patch Description: s700 10.20 LVM cumulative patch w/EIO, optimus fix Creation Date: 99/09/30 Post Date: 99/10/08 Warning: 99/10/27 - This Critical Warning has been issued by HP. - Patch PHKL_19209 introduces a defect which may affect all LVM HP-UX 10.20 users. When LVM logical volume configuration commands are run simultaneously with logical volume display commands (or logical volume query operations) there is a possibility that the system will hang. - The affected LVM logical volume configuration commands are: lvcreate(1M), lvextend(1M), lvreduce(1M), lvchange(1M), lvsplit(1M) and lvmerge(1M). The affected logical volume display commands are: lvdisplay(1M), vgdisplay(1M) with '-v' option, lvlnboot(1M) with '-v' option. The query operations are ioctl(DIOC_DESCRIBE) and ioctl(DIOC_CAPACITY). These ioctl(2) interfaces are primarily used by online analysis tools such as glance(1) and gpm(1). - The problem also exists in superseding patches PHKL_19696 and PHKL_20040. - HP recommends that PHKL_19209, PHKL_19696 and PHKL_20040 be removed from all systems using LVM. These patches should also be removed from any software depots holding them. - The superseded patch, PHKL_19166, does not exhibit this same problem. PHKL_19166 will be re-released until a replacement patch is available. To avoid this problem, but to insure that as many known LVM issues as possible are addressed, HP recommends that PHKL_19166 be installed after the patches are removed. Please observe that PHKL_19209, PHKL_19696 and PHKL_20040 must removed before PHKL_19166 can be installed. Hardware Platforms - OS Releases: s700: 10.20 Products: N/A Filesets: LVM.LVM-KRN OS-Core.CORE-KRN Automatic Reboot?: Yes Status: General Superseded With Warnings Critical: No (superseded patches were critical) PHKL_19696: PANIC PHKL_19209: OTHER This patch is essential to improve the recovery of FC devices in large configurations. PHKL_19166: HANG Path Name: /hp-ux_patches/s700/10.X/PHKL_20040 Symptoms: PHKL_20040: ( SR:8606100412 DTS: JAGab31786 ) With Optimus Disk Array, LVM incorrectly configures different LUNs with the same LUN id as alternate links. PHKL_19696: ( SR:8606101971 DTS: JAGab66231 ) If there is a problem with the physical volume to which the logical volume is mapped. LVM returns EIO error for logical requests, without retrying till the I/O timeout value set on that logical volume. PHKL_19209: ( SR:5003437970 DTS: JAGaa40887 ) When multiple physical volumes or paths to physical volumes are lost, it can require minutes to recover them. During the time the PVs for a given volume group are tested, locks were held which delayed other LVM operations and the opens and closes of logical volumes. Prior changes to the device recovery code provided some benefit, assuring that device recovery was 1-2 minutes regardless of the number of paths or devices to be recovered, however this still was not enough. The new device recovery code in this patch reduces the recovery time to under 35 seconds, again independent of the number of paths or devices offline. PHKL_19166: ( SR: 8606100864 DTS: JAGab39559 ) ( SR: 4701424846 DTS: JAGab14452 ) Performance degradation when massively parallel subpage size (<8K) reads are performed (as with Informix). ( SR: 8606100864 DTS: JAGab39559 ) ( SR: 1653289132 DTS: JAGaa67952 ) The system hangs when lvmkd is waiting for the lock obtained earlier by an application that performs a vg_create operation. The hang does not happen unless there is a powerfailed disk. ( SR: 8606100864 DTS: JAGab39559 ) ( SR: 4701424895 DTS: JAGab14455 ) Optimus Disk Arrays (model number A5277A-HP) are not recognized as an ACTIVE/PASSIVE device and subsequently are not handled properly by the driver. PHKL_17546: ( SR: 1653289553 DTS: JAGaa46305 ) LVM's autoresync after disk powerfail can leave extents stale. Defect Description: PHKL_20040: ( SR:8606100412 DTS: JAGab31786 ) Generally, LVM treats multiple LUNs with the same LUN id as alternate links to the same disk. With the Optimus disk array this assumption is incorrect. Two different disks may have the same LUN id. In order to uniquely identify a disk in an Optimus array, LVM needs both its LUN id and its target id. Resolution: Added a new macro TGT_AND_LUN_FROM_DEV_T to get the target id and LUN id for the device. PHKL_19696: ( SR:8606101971 DTS: JAGab66231 ) If the physical volume to which the logical volume is mapped has problems, instead of retrying till the lv_iotimeout value set on the logical volume, LVM returns EIO for logical requests before lv_iotimeout. This is because we are initializing the start time on the request during scheduling of the request. If the PV to which the request is to be scheduled is down then we append the request to powerfail wait queue without scheduling. When the PV comes back, we start resending the buffers in the powerfail wait queue and at that time we check the elapsed time (current time - intital time set) of the request, since we had not initialized the time on the request as we did not do the scheduling, it will be set to zero resulting in a value higher than the lv_iotimeout. Hence we bail out the request without processing it, although the time elapsed will be much lessaer than the lv_iotimeout value. Resolution : Initializing logical buf start time in lv_strategy(), at the time of processing the request instead of setting it during scheduling in lv_schedule(). PHKL_19209: ( SR:5003437970 DTS: JAGaa40887 ) The problem was that some of the LVM device recovery was still a serial process. Resolution: The LVM device recovery code was modified to cause all tests of devices and paths to be conducted in parallel. Devices which are available are immediately brought online again, irrespective of other failed devices or paths. The changes in this patch assure that devices recover within the time it takes to test the device/path and to update its data structures. The volume group data structures and LVM operations that require them --LVM commands and opens and closes of logical volumes should be held off no more than 35 seconds. PHKL_19166: ( SR: 8606100864 DTS: JAGab39559 ) ( SR: 4701424846 DTS: JAGab14452 ) Informix issues massive ammounts of 1K reads in parallel. With an 8K page size and I/Os serialized within the page, performance suffers. Resolution: Logic was added to allow reads from the same 8K page to proceed in parallel when bad block relocation is completely disabled (lvchange -r N). ( SR: 8606100864 DTS: JAGab39559 ) ( SR: 1653289132 DTS: JAGaa67952 ) If the holder of the vg_lock is waiting for I/O to finish, and if the I/O can't finish until we switch to another link, then we get into a deadlock. Resolution: To resolve the deadlock, the code now obtains the lock temporarily, in order to switch to the alternate link, then returns the lock to the original holder to finish the I/O. ( SR: 8606100864 DTS: JAGab39559 ) ( SR: 4701424895 DTS: JAGab14455 ) We need to recognize Optimus Array as an ACTIVE/PASSIVE device. Resolution: Added code to recognize the Optimus Array as an ACTIVE/PASSIVE device. PHKL_17546: ( SR: 1653289553 DTS: JAGaa46305 ) lv_syncx() may return with stale extents without actually syncing all the extents. Resolution: Added additional check to see if all the extents are synced; otherwise return error. lv_syncx() will return SUCCESS only when the syncing is completed. Made changes in lv_resyncpv() to preserve error value. SR: 1653289132 1653289553 4701424846 4701424895 5003437970 8606100412 8606100864 8606101971 Patch Files: /usr/conf/lib/libhp-ux.a(rw_lock.o) /usr/conf/lib/liblvm.a(lv_block.o) /usr/conf/lib/liblvm.a(lv_cluster_lock.o) /usr/conf/lib/liblvm.a(lv_hp.o) /usr/conf/lib/liblvm.a(lv_ioctls.o) /usr/conf/lib/liblvm.a(lv_lvsubr.o) /usr/conf/lib/liblvm.a(lv_phys.o) /usr/conf/lib/liblvm.a(lv_schedule.o) /usr/conf/lib/liblvm.a(lv_spare.o) /usr/conf/lib/liblvm.a(lv_strategy.o) /usr/conf/lib/liblvm.a(lv_subr.o) /usr/conf/lib/liblvm.a(lv_syscalls.o) /usr/conf/lib/liblvm.a(lv_vgda.o) what(1) Output: /usr/conf/lib/libhp-ux.a(rw_lock.o): rw_lock.c $Date: 99/07/21 15:17:29 $ $Revision: 1.8. 98.4 $ PATCH_10.20 (PHKL_19209) /usr/conf/lib/liblvm.a(lv_block.o): lv_block.c $Date: 99/07/12 14:23:13 $ $Revision: 1.1 3.98.7 $ PATCH_10.20 (PHKL_19166) /usr/conf/lib/liblvm.a(lv_cluster_lock.o): lv_cluster_lock.c $Date: 99/02/05 15:01:21 $ $Revisi on: 1.10.98.7 $ PATCH_10.20 (PHKL_17546) /usr/conf/lib/liblvm.a(lv_hp.o): lv_hp.c $Date: 99/09/30 09:32:22 $ $Revision: 1.18.9 8.35 $ PATCH_10.20 (PHKL_20040) /usr/conf/lib/liblvm.a(lv_ioctls.o): lv_ioctls.c $Date: 99/07/21 15:16:20 $ $Revision: 1. 18.98.24 $ PATCH_10.20 (PHKL_19209) /usr/conf/lib/liblvm.a(lv_lvsubr.o): lv_lvsubr.c $Date: 99/07/21 15:16:23 $ $Revision: 1. 15.98.23 $ PATCH_10.20 (PHKL_19209) /usr/conf/lib/liblvm.a(lv_phys.o): lv_phys.c $Date: 99/07/21 15:16:27 $ $Revision: 1.14 .98.18 $ PATCH_10.20 (PHKL_19209) /usr/conf/lib/liblvm.a(lv_schedule.o): lv_schedule.c $Date: 99/09/01 14:12:35 $ $Revision: 1.18.98.13 $ PATCH_10.20 (PHKL_19696) /usr/conf/lib/liblvm.a(lv_spare.o): lv_spare.c $Date: 99/07/21 15:16:31 $ $Revision: 1.3 .98.9 $ PATCH_10.20 (PHKL_19209) /usr/conf/lib/liblvm.a(lv_strategy.o): lv_strategy.c $Date: 99/09/01 14:10:15 $ $Revision: 1.14.98.15 $ PATCH_10.20 (PHKL_19696) /usr/conf/lib/liblvm.a(lv_subr.o): lv_subr.c $Date: 99/07/21 15:16:38 $ $Revision: 1.18 .98.8 $ PATCH_10.20 (PHKL_19209) /usr/conf/lib/liblvm.a(lv_syscalls.o): lv_syscalls.c $Date: 99/07/21 15:16:40 $ $Revision: 1.14.98.10 $ PATCH_10.20 (PHKL_19209) /usr/conf/lib/liblvm.a(lv_vgda.o): lv_vgda.c $Date: 99/07/21 15:16:42 $ $Revision: 1.18 .98.5 $ PATCH_10.20 (PHKL_19209) cksum(1) Output: 2194382453 6588 /usr/conf/lib/libhp-ux.a(rw_lock.o) 1522248600 2660 /usr/conf/lib/liblvm.a(lv_block.o) 2286504099 10052 /usr/conf/lib/liblvm.a(lv_cluster_lock.o) 1682405025 87108 /usr/conf/lib/liblvm.a(lv_hp.o) 2859200667 32348 /usr/conf/lib/liblvm.a(lv_ioctls.o) 4292237778 36588 /usr/conf/lib/liblvm.a(lv_lvsubr.o) 1497708311 7736 /usr/conf/lib/liblvm.a(lv_phys.o) 2819915653 26324 /usr/conf/lib/liblvm.a(lv_schedule.o) 3982721973 36496 /usr/conf/lib/liblvm.a(lv_spare.o) 1340733321 7452 /usr/conf/lib/liblvm.a(lv_strategy.o) 3060719179 9992 /usr/conf/lib/liblvm.a(lv_subr.o) 2989958091 13664 /usr/conf/lib/liblvm.a(lv_syscalls.o) 4183889696 9172 /usr/conf/lib/liblvm.a(lv_vgda.o) Patch Conflicts: None Patch Dependencies: s700: 10.20: PHKL_16750 Hardware Dependencies: None Other Dependencies: None Supersedes: PHKL_17546 PHKL_19166 PHKL_19209 PHKL_19696 Equivalent Patches: PHKL_20057: s800: 10.20 Patch Package Size: 350 KBytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. ------------------------------------------------------------ 1. Back up your system before installing a patch. 2. Login as root. 3. Copy the patch to the /tmp directory. 4. Move to the /tmp directory and unshar the patch: cd /tmp sh PHKL_20040 5a. For a standalone system, run swinstall to install the patch: swinstall -x autoreboot=true -x match_target=true \ -s /tmp/PHKL_20040.depot By default swinstall will archive the original software in /var/adm/sw/patch/PHKL_20040. If you do not wish to retain a copy of the original software, you can create an empty file named /var/adm/sw/patch/PATCH_NOSAVE. WARNING: If this file exists when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. It is recommended that you move the PHKL_20040.text file to /var/adm/sw/patch for future reference. To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_20040.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: This patch depends on base patch PHKL_16750. For successful installation, please ensure that PHKL_16750 is in the same depot with this patch, or PHKL_16750 is already installed. Due to the number of objects in this patch, the customization phase of the update may take more than 10 minutes. During that time the system will not appear to make forward progress, but it will actually be installing the objects.