Patch Name: PHCO_15895 Patch Description: s700_800 10.20 LVM commands cumulative patch Creation Date: 98/07/09 Post Date: 98/07/10 Hardware Platforms - OS Releases: s700: 10.20 s800: 10.20 Products: N/A Filesets: LVM.LVM-RUN LVM.LVM-ENG-A-MAN Automatic Reboot?: No Status: General Superseded Critical: No (superseded patches were critical) PHCO_12666: CORRUPTION Path Name: /hp-ux_patches/s700_800/10.X/PHCO_15895 Symptoms: PHCO_15895: If any of the PVs which belong to a VG are involved in any LVM commands operation is not available after the device is opened. The system hangs on subsequent read/write since it is doing a blocking operatin. Eg vgcfgbackup hangs when a PV is unavailable after opening it. PHCO_15236: lvcreate was dumping core when given out-of-range LogicalVolumeSize with the -L option (-L 0, for e.g.). Man page documentation was specifying incorrect range for LogicalVolumeSize in lvcreate, lvextend and lvreduce. Error message on extending a volume group with a disk that is too large was getting mangled with normal informative messages. SAM was not able to interpret the messages properly. vgcreate was not recalculating max_pe properly if the -s option was used. lvreduce -k was allowing only one pvkey to be selected. PHCO_14990: lvmtab_read error message added to lvlnboot,lvrmboot, pvcreate, vgchgid, vgimport and vgscan commands. sleep() is added in vgchgid while creating new vgids , Interrupts are disabled and check for valid no. of PVs added. Checks for SCSI disks added when verifying the disks in vgchgid,vgimport,vgscan and vgextend commands. PHCO_14628: lvdisplay when LANG=C was giving wrong mesg for "IO Timeout" and "default" as it was reading incorrectly from the catalog. PHCO_14315: The LVM message catalog is out of sync due to a new message was added in the middle of the file by mistake. PHCO_13942: The previous patch PHCO_13711 has a problem in vgcreate command when creating a VG with EMC Symmetrix disk without any attributes such as BCV or RDF. The vgcreate command will return an error and reject the command. The problem only occurs on EMC Symmetrix disk without BCV or RDF attributes. PHCO_13711: EMC provides the option to split a hardware mirror without hpux knowning. This causes the system to see another set of disks with duplicate VGIDS. LVM needs to come up with a solution to allow customer import the split-off disk(s) to another system for backup purpose without causing problems. PHCO_13480: LVM scripts which lvextend one extent at a time (where the next logical extent added is always placed on a different physical volume from the preceding logical extent) can take hours to run for large logical volumes (i.e. 50gb). The goal of this kind of configuration is to create "extent-based mirrored stripes". LVM provides no alternate method for creating "extent-based mirrored stripes". There is also a separate lvlnboot defect introduced by a previous 10.20 patch in which lvlnboot may fail with: lvlnboot: root logical volume can not have bad block relocation PHCO_13224: If a configuration is using shared PV LINKS on a cluster environment, the following problem can occur: 1. The shared PV LINKS will not switch when needed. 2. The activation of the volume group using vgchange -a s may fail on one of the nodes if the command is bein run simultaneously on all the nodes. PHCO_12666: System is suffering from data corruption. Intermittently a block associated with a particular file at the same offset is being corrupted. PHCO_10964: The lvlnboot command had some problems introduced in 10.20 when separate root/boot functionality was introduced. The symptoms range from lvlnboot -v not being able to find the boot volume after a vgreduce/vgextend to not being able to boot the volume group. One bug resulted in lvlnboot always using a pvkey of 0, causing failures if vgreduce/vgextend was performed on the first pvol. Another bug had lvlnboot assuming that the first pvol with an updated BDRA in /etc/lvmtab (for the root vg) contained the boot and root lvols, which isn't necessarily so. These bugs can result in unbootable systems if lvlnboot -R is performed since lvlnboot -R will corrupt the LABEL file in these cases. PHCO_10826: The LVM relocation policy has two settings; "y", mark a bad block in the bad block directory and relocate the block to an alternate location, and "n", mark a bad block in the bad block directory but do not relocate the block to a new location. This causes problems for intelligent disks like EMC Symmetrix disks which can "repair" themselves. The bad block directory entry prevents access to the good, repaired data on disk. PHCO_10048: A non-root process can gain access to a root shell. PHCO_9213: Several customers using LVM have expressed the desire to have LVM return application I/O's with an I/O error status rather than hanging onto them, when a Logical Volume is powerfailed. PHCO_8871: This patch provides new usage string for the vgchange command; Also new error messages are added to the message catalog to inform user that LVM does not support software mirroring in a cluster environment with more than 2 nodes configured. PHCO_8626: Modify LVM library routine to fix the following problem: The tm_year field of the tm structure returned by the localtime() library call was assumed to contain the last 2 digits of the year. But it really contains the number of years from 1900. This was corrected by replacing "tm_year" by "tm_year%100". PHCO_8207: This patch fixes two different problems: "panic lv_activatevg: num_pvols" After vgcfgrestore'ing to ALL of the current PVs in a VG, on next full activation the system can panic if the VG is setup such that the PVs are NOT sequentially allocated within the VGDA. The problem is with vgcfgbackup command which doesn't write a valid lvmconf file when there are missing PVs in a VG. vgimport -s -m xxx would not work with >255 pvs on a system. PHCO_7980: This patch added a new option "-R" to vgcfgrestore command to force restoring configuration data when there are physical volume mismatch between the kernel and the backup file due to missing pvlinks. Defect Description: PHCO_15895: The problem of blocking on an not available PV and hence causing the called process to hang is overcome by converting all the blocking read/write operations to non-blocking read/write operations and a wrapper is put arround the read/write operations to retry a definite number of times. To make non-blocking O_NDELAY flag is set while opening the raw PVs. PHCO_15236: lvcreate, lvextend and lvreduce were not performing range check for LogicalVolumeSize with the -L option. The man pages for these commands were indicating wrong range for LogicalVolumeSize. The vgcreate/vgextend defect on error message was due to an earlier fix that changed a few stderr prints to stdouts. Also, on this particular case, after sending error message to stderr, vgcreate/vgextend commands needed to fail which they were not doing. The adjustment of max_pe was not being done by vgcreate even if only one of -s or -e was supplied. The correct fix is to report failure only if both the options are given and the required number of PE's exceed the supplied value. lvreduce allows reduction of missing PV by specifying the pvkey rather than the pvpath but it was accepting a single key only. The fix was made such that -k no longer accepts any arguments and the pvkey is now derived from the pvpath list. PHCO_14990: lvmtab_read() call did have any error message printed if the call was a failure in lvlnboot.c,lvrmboot.c pvcreate.c,vgchgid.c, vgimport.c and vgscan.c vgchgid generated same vgids if the vgchgid is called in a shell srcipt. So added 1 second delay and disabled all interrupts. Check for max. no. of Arguments added. Check for SCSI disk added when the devices are verified for vgchgid,vgscan,vgimport,vgextend commands. PHCO_14628: changed HPMSGSTR to HPTMMSGSTR for "IO Timeout" and "default" to read from set3 instead set2. PHCO_14315: Move the LVM message which was in the middle of the file to the end of the message catalog to fix the problem. PHCO_13942: The problem with vgcreate command has been fixed in this patch. An extra check has been added to detect EMC Symmetrix disk without BCV or RDF attributes. PHCO_13711: A new command (vgchgid) is created to modify the VGIDs on the split-off EMC Symmetrix disk(s). LVM commands vgscan, vgextend and vgimport are also modified to support EMC Symmetrix disk(s). PHCO_13480: The solution is to create a new LVM allocation policy for creating "extent-based mirrored stripes". By reducing the configuration sequence to a single step, the time for the configuration to complete has been reduced from hours to minutes (i.e. for a 50gb logical volume). The new policy is called the distributed allocation policy and is described in the new lvcreate(1M) man page provided with this patch. There are new lvchange(1M) and lvdisplay(1M) man pages also. There is new command line option in both lvcreate and lvchange: -D y. There is a new logical volume flag in the kernel (see dependent kernel patch). To fix the lvlnboot problem, a new check was added to lvlnboot to check for a new flag (LVM_NOBBDIR) introduced by a recent 10.20 patch. PHCO_13224: This patch modifies the kernel and the vgchange command. The command informs the kernel about the volume group being a shared volume group and this allows the kernel to mark the physical disk as a shared disk with multiple ports. This results in the shared PV LINKS code working without any failures. PHCO_12666: The vgcreate and vgextend command were modified to reject the operation if the PV to be added/extended had bad block alternate allocated. A new option "-f" is added to these two commands to allow the command to continue if users choose to ignore the warning. Also, vgcfgrestore command was modified to reject restoring LVM meta-data if bad block alternates were found inside the user data area. A new option "-F" was added to this command to allow the restore operation to continue if users choose to ignore the warning. PHCO_10964: Rewrote getbootvol() to search for boot lvol on pvols containing root lvols, if they exist, or to search all pvols. Added the new routines getrootpvols() and getbootlabel(). PHCO_10826: A new option was added to the -r flag of the lvchange and lvcreate commands. This option is -r N (making the total acceptable values of -r "ynN") which means, do not mark any bad blocks in this LV in the bad block directory, and also do not relocate any bad blocks. All LVs created on EMC Symmetrix disks should be configured with this option. PHCO_10048: A check was added to the LVM main module to make sure each in-coming parameter have size within the maximum length allowed. PHCO_9213: This change supports a new lvchange command line option "-t" which allows the administrator the option to limit the time LVM holds I/O to be retried on logical volumes when disks are powerfailed. PHCO_8871: This patch provides new usage string for the vgchange command; Also new error messages are added to the message catalog to inform user that LVM does not support software mirroring in a cluster environment with more than 2 nodes configured. PHCO_8626: Modify LVM library routine to fix the following problem: The tm_year field of the tm structure returned by the localtime() library call was assumed to contain the last 2 digits of the year. But it really contains the number of years from 1900. This was corrected by replacing "tm_year" by "tm_year%100". PHCO_8207: This patch fixes two different problems: Fix a problem in vgcfgbackup command to backup all PV structures on the disk. Don't try to calculate how many PV needed to be backed up, because PVs in the VG might not necessary contigeous. Modified code in vgimport command to allocate a bigger array to hold pvnames and pvdata. PHCO_7980: The vgcfgrestore command normally refuses to restore configuration data when there are physical volume mismatch between the kernel and the backup file. The following message will be displayed to inform user on the problem: "Mismatch between the backup file and the running kernel: Kernel indicates X disks for /dev/vgname, /etc/lvmconf/vgname indicates Y disks. Cannot proceed with the restoration. Deactivate the Volume Group and try again." SR: 4701384040 5003385989 4701368670 5003390096 4701352278 4701346494 4701334698 4701334847 4701335935 1653175737 4701332106 5003325159 1653194696 1653221895 1653230771 5003402370 1653252874 1653252759 1653252734 1653199265 5003320606 1653196428 5003325340 1653264887 Patch Files: /usr/lib/nls/msg/C/lvm.cat /usr/newconfig/sbin/lvchange.mir /usr/newconfig/usr/sbin/lvchange.mir /sbin/lvchange /usr/sbin/lvchange /usr/share/man/man1m.Z/lvchange.1m /usr/share/man/man1m.Z/lvcreate.1m /usr/share/man/man1m.Z/lvdisplay.1m /usr/share/man/man1m.Z/lvextend.1m /usr/share/man/man1m.Z/lvlnboot.1m /usr/share/man/man1m.Z/lvreduce.1m /usr/share/man/man1m.Z/vgcfgrestor.1m /usr/share/man/man1m.Z/vgchange.1m /usr/share/man/man1m.Z/vgchgid.1m /usr/share/man/man1m.Z/vgcreate.1m /usr/share/man/man1m.Z/vgexport.1m /usr/share/man/man1m.Z/vgextend.1m /usr/share/man/man1m.Z/vgimport.1m /usr/share/man/man1m.Z/vgscan.1m what(1) Output: /usr/lib/nls/msg/C/lvm.cat: None /usr/newconfig/sbin/lvchange.mir: $Revision: 78.57.1.3.2.65 $ MIRROR PRODUCT PATCH-PHCO_13626 for 10.20; for 10.30, 11.x compatib ility libc.a_ID@@/main/r10dav/libc_dav/libc_ dav_cpe/7 /ux/core/libs/libc/archive_pa1/libc.a_ID Dec 22 1997 14:54:53 PATCH_10_20: lvdisplay.o lvlnboot.o lvremove.o lvrmb oot.o pvchange.o pvcreate.o pvdisplay.o pvmo ve.o sdstolvm.o vgchgid.o vgcfgbackup.o vgcf grestore.o vgchange.o vgcreate.o vgdisplay.o vgexport.o vgextend.o vgimport.o vgreduce.o vgremove.o vgscan.o lvchange_m.o lvcreate_m .o lvextend_m.o lvmerge_m.o lvmmain_m.o lvre duce_m.o lvsplit_m.o lvsync_m.o nomwcsyncd_m .o vgsync_m.o hpux_rel_m.o 98/07/09 /usr/newconfig/usr/sbin/lvchange.mir: $Revision: 78.57.1.3.2.65 $ MIRROR PRODUCT PATCH_10_20: lvdisplay.o lvlnboot.o lvremove.o lvrmb oot.o pvchange.o pvcreate.o pvdisplay.o pvmo ve.o sdstolvm.o vgchgid.o vgcfgbackup.o vgcf grestore.o vgchange.o vgcreate.o vgdisplay.o vgexport.o vgextend.o vgimport.o vgreduce.o vgremove.o vgscan.o lvchange_m.o lvcreate_m .o lvextend_m.o lvmerge_m.o lvmmain_m.o lvre duce_m.o lvsplit_m.o lvsync_m.o nomwcsyncd_m .o vgsync_m.o hpux_rel_m.o 98/07/09 /sbin/lvchange: $Revision: 78.57.1.3.2.65 $ PATCH-PHCO_13626 for 10.20; for 10.30, 11.x compatib ility libc.a_ID@@/main/r10dav/libc_dav/libc_ dav_cpe/7 /ux/core/libs/libc/archive_pa1/libc.a_ID Dec 22 1997 14:54:53 PATCH_10_20: lvdisplay.o lvlnboot.o lvremove.o lvrmb oot.o pvchange.o pvcreate.o pvdisplay.o pvmo ve.o sdstolvm.o vgchgid.o vgcfgbackup.o vgcf grestore.o vgchange.o vgcreate.o vgdisplay.o vgexport.o vgextend.o vgimport.o vgreduce.o vgremove.o vgscan.o lvchange.o lvcreate.o l vextend.o lvmerge.o lvmmain.o lvreduce.o lvs plit.o lvsync.o nomwcsyncd.o vgsync.o hpux_r el.o 98/07/09 /usr/sbin/lvchange: $Revision: 78.57.1.3.2.65 $ PATCH_10_20: lvdisplay.o lvlnboot.o lvremove.o lvrmb oot.o pvchange.o pvcreate.o pvdisplay.o pvmo ve.o sdstolvm.o vgchgid.o vgcfgbackup.o vgcf grestore.o vgchange.o vgcreate.o vgdisplay.o vgexport.o vgextend.o vgimport.o vgreduce.o vgremove.o vgscan.o lvchange.o lvcreate.o l vextend.o lvmerge.o lvmmain.o lvreduce.o lvs plit.o lvsync.o nomwcsyncd.o vgsync.o hpux_r el.o 98/07/09 /usr/share/man/man1m.Z/lvchange.1m: None /usr/share/man/man1m.Z/lvcreate.1m: None /usr/share/man/man1m.Z/lvdisplay.1m: None /usr/share/man/man1m.Z/lvextend.1m: None /usr/share/man/man1m.Z/lvlnboot.1m: None /usr/share/man/man1m.Z/lvreduce.1m: None /usr/share/man/man1m.Z/vgcfgrestor.1m: None /usr/share/man/man1m.Z/vgchange.1m: None /usr/share/man/man1m.Z/vgchgid.1m: None /usr/share/man/man1m.Z/vgcreate.1m: None /usr/share/man/man1m.Z/vgexport.1m: None /usr/share/man/man1m.Z/vgextend.1m: None /usr/share/man/man1m.Z/vgimport.1m: None /usr/share/man/man1m.Z/vgscan.1m: None cksum(1) Output: 2441985808 40703 /usr/lib/nls/msg/C/lvm.cat 3494032008 692224 /usr/newconfig/sbin/lvchange.mir 2185553230 446464 /usr/newconfig/usr/sbin/lvchange.mir 382509913 671744 /sbin/lvchange 1278302953 425984 /usr/sbin/lvchange 2631718485 4984 /usr/share/man/man1m.Z/lvchange.1m 2919931703 6573 /usr/share/man/man1m.Z/lvcreate.1m 431221641 3958 /usr/share/man/man1m.Z/lvdisplay.1m 2359025192 3295 /usr/share/man/man1m.Z/lvextend.1m 3548915596 6442 /usr/share/man/man1m.Z/lvlnboot.1m 2474777352 3473 /usr/share/man/man1m.Z/lvreduce.1m 599057989 2650 /usr/share/man/man1m.Z/vgcfgrestor.1m 2687343115 6312 /usr/share/man/man1m.Z/vgchange.1m 2107067189 2348 /usr/share/man/man1m.Z/vgchgid.1m 1085504274 4288 /usr/share/man/man1m.Z/vgcreate.1m 3966825400 2411 /usr/share/man/man1m.Z/vgexport.1m 2972362303 3748 /usr/share/man/man1m.Z/vgextend.1m 764253210 3191 /usr/share/man/man1m.Z/vgimport.1m 361407857 3323 /usr/share/man/man1m.Z/vgscan.1m Patch Conflicts: None Patch Dependencies: s700: 10.20: PHKL_13247 s800: 10.20: PHKL_13248 Hardware Dependencies: None Other Dependencies: None Supersedes: PHCO_7980 PHCO_8207 PHCO_8626 PHCO_8871 PHCO_9213 PHCO_10048 PHCO_10826 PHCO_10964 PHCO_12666 PHCO_13224 PHCO_13480 PHCO_13711 PHCO_13942 PHCO_14315 PHCO_14628 PHCO_14990 PHCO_15236 Equivalent Patches: None Patch Package Size: 2360 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 PHCO_15895 5a. For a standalone system, run swinstall to install the patch: swinstall -x autoreboot=true -x match_target=true \ -s /tmp/PHCO_15895.depot 5b. For a homogeneous NFS Diskless cluster run swcluster on the server to install the patch on the server and the clients: swcluster -i -b This will invoke swcluster in the interactive mode and force all clients to be shut down. WARNING: All cluster clients must be shut down prior to the patch installation. Installing the patch while the clients are booted is unsupported and can lead to serious problems. The swcluster command will invoke an swinstall session in which you must specify: alternate root path - default is /export/shared_root/OS_700 source depot path - /tmp/PHCO_15895.depot To complete the installation, select the patch by choosing "Actions -> Match What Target Has" and then "Actions -> Install" from the Menubar. 5c. For a heterogeneous NFS Diskless cluster: - run swinstall on the server as in step 5a to install the patch on the cluster server. - run swcluster on the server as in step 5b to install the patch on the cluster clients. By default swinstall will archive the original software in /var/adm/sw/patch/PHCO_15895. 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 PHCO_15895.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/PHCO_15895.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None