Patch Name: PHKL_30686 Patch Description: s700_800 11.23 LVM chooses metadata in incorrect PV Creation Date: 04/07/06 Post Date: 04/07/12 Repost: 04/07/13 The patch documentation was modified to more fully document the logic of the defective behavior described in the second paragraph of the Defect Description. Hardware Platforms - OS Releases: s700: 11.23 s800: 11.23 Products: N/A Filesets: LVM.LVM-KRN,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP Automatic Reboot?: Yes Status: General Release Critical: Yes PHKL_30686: CORRUPTION Category Tags: defect_repair general_release critical corruption Path Name: /hp-ux_patches/s700_800/11.X/PHKL_30686 Symptoms: PHKL_30686: ( SR:8606359992 CR:JAGaf20688 ) In 11.23 only, under certain scenarios involving mirrored logical volumes in IA systems, there is a data integrity risk when - the activation of the volume group (which include mirrored logical volumes) is done with a PV that was missing at the time of the the previous deactivation. - in an SLVM cluster, a client becomes the server after a missing PV which was part of a mirrored logical volume has come back online. The problem can only occur if the PV (or PVs) involved is listed first in the /etc/lvmtab file. Defect Description: PHKL_30686: ( SR:8606359992 CR:JAGaf20688 ) When a volume group is activated, or when a client becomes a server in an SLVM cluster, LVM searches the physical volumes in the volume group for the latest copy of the LVM metadata. On IA systems in 11.23, there's the possibility that LVM will pick the wrong copy of the metadata. LVM searches the physical volumes comprising the logical volume to determine which has the most recent metadata. Because of this defect, LVM might continue to consider the metadata on the physical volume with the lowest pvkey (see lvdisplay(1M)) as the latest, even if this is not correct. For example, assume we have a volume group with two physical volumes (PV1 and PV2) and a single mirrored logical volume (LV1) with a mirror on each of the two physical volumes. As long as both physical volumes are available, the metadata on both will be up to date and there is no problem. Now, assume that PV1 becomes unavailable. As I/O is done to LV1, extents on PV1 become stale and the metadata on PV2 is updated to reflect the new states of the extents. Next, the volume group is deactivated. At this point the metadata on PV1 shows all extents current, and the metadata on PV2 indicates that some extents on PV1 are stale. Now, the volume is activated with both PV1 and PV2 available. LVM will incorrectly choose the metadata on PV1 instead of the more recent metadata on PV2. Since the PV1 metadata shows that all extents are current, there will be no resync. This leaves the logical volume in an incorrect state in that some of the extents have different data on the two mirrors. Resolution: The code has now been restructured to ensure that the correct copy of the metadata is always chosen. Enhancement: No SR: 8606359992 Patch Files: LVM.LVM-KRN,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP: /usr/conf/lib/liblvm.a(lv_quorum.o) what(1) Output: LVM.LVM-KRN,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP: /usr/conf/lib/liblvm.a(lv_quorum.o): lv_quorum.c $Date: 2004/06/25 10:53:36 $Revision: r1 1.23/1 PATCH_11.23 (PHKL_30686) cksum(1) Output: LVM.LVM-KRN,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP: 1937021231 119464 /usr/conf/lib/liblvm.a(lv_quorum.o) Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: None Equivalent Patches: None Patch Package Size: 60 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_30686 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHKL_30686.depot By default swinstall will archive the original software in /var/adm/sw/save/PHKL_30686. If you do not wish to retain a copy of the original software, include the patch_save_files option in the swinstall command above: -x patch_save_files=false WARNING: If patch_save_files is false when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. For future reference, the contents of the PHKL_30686.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHKL_30686.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_30686.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None