HP -UX 11i Administrator's Manual
HP -UX 11i Administrator's Manual

HP -UX 11i Administrator's Manual

Logical volume management
Hide thumbs Also See for HP-UX 11i:
Table of Contents

Advertisement

Quick Links

HP-UX System Administrator's Guide: Logical
Volume Management
HP-UX 1 1i Version 3
Abstract
This document describes how to configure, administer, and troubleshoot the Logical Volume Manager (LVM) product on the
HP-UX Version 3 platform.
The HP-UX System Administrator's Guide is written for administrators of HP-UX systems of all skill levels needing to administer
HP-UX systems beginning with HP-UX Release 1 1i Version 3.
While many topics in this set apply to previous releases, much has changed in HP-UX 1 1i Version 3. Therefore, for information
about prior releases, see Managing Systems and Workgroups: A Guide for System Administrators.
HP Part Number: B3921-90053
Published: September 201 1
Edition: 8

Advertisement

Table of Contents
loading

Summary of Contents for HP HP-UX 11i

  • Page 1 HP-UX systems beginning with HP-UX Release 1 1i Version 3. While many topics in this set apply to previous releases, much has changed in HP-UX 1 1i Version 3. Therefore, for information about prior releases, see Managing Systems and Workgroups: A Guide for System Administrators.
  • Page 2 Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. UNIX is a registered trademark of The Open Group.
  • Page 3: Table Of Contents

    Contents 1 Introduction....................8 LVM Features...........................8 LVM Architecture........................9 Physical versus Logical Extents....................10 LVM Volume Group Versions....................11 LVM Device File Usage......................12 Legacy Device Files versus Persistent Device Files..............12 Cluster-wide Device Special Files..................13 Naming Conventions for LVM....................13 Device Number Format.......................15 Version 1.0 Device Number Format..................16 Version 2.x Device Number Format..................16 LVM Disk Layout........................16 Boot Data Reserved Area....................16...
  • Page 4 Physical Volume Groups....................30 Snapshots and Performance....................30 Increasing Performance Through Disk Striping................31 Determining Optimum Stripe Size..................32 Interactions Between Mirroring and Striping..............33 Increasing Performance Through I/O Channel Separation............33 Configuring LVM I/O Timeout Parameters..................33 Planning for Recovery......................34 Preparing for LVM System Recovery..................35 Example Script for LVM Configuration Recording...............37 3 Administering LVM..................38 Administration Tools........................38 Displaying LVM Information......................40...
  • Page 5 Disabling a Path to a Physical Volume..................87 Creating an Alternate Boot Disk...................88 Mirroring the Boot Disk.......................90 Mirroring the Boot Disk on HP 9000 Servers..............90 Mirroring the Boot Disk on HP Integrity Servers..............92 Migrating a Volume Group to New Disks: vgmove..............95 Example of Migrating a Volume Group to New Disks.............95...
  • Page 6 About this Series........................141 Typographic Conventions.......................141 Examples and Shells......................142 Related Information.......................143 Finding HP-UX Information.....................143 HP-UX 1 1i Release Names and Operating System Version Identifiers..........144 Determining Your System Version....................144 Publication History........................144 HP Insight Remote Support Software..................145 HP Encourages Your Comments....................146 A LVM Specifications and Limitations............147 Determining LVM’s Maximum Limits on a System...............150...
  • Page 7 D Striped and Mirrored Logical Volumes............157 Summary of Hardware Raid Configuration................157 LVM Implementation of RAID Levels in HP-UX................157 LVM Striped and Mirrored Logical Volume Configuration............158 Examples........................158 Compatibility Note......................160 E LVM I/O Timeout Parameters..............161 Logical Volume Timeout (LV timeout)..................161 Physical Volume Timeout (PV timeout)..................161 Timeout Differences: 1 1i v2 and 1 1i v3..................162...
  • Page 8: Introduction

    (and individual files) can span disks. Up to six copies of identical data can be stored and updated simultaneously using LVM. This feature is called mirroring a logical volume, and requires an optional product, HP MirrorDisk/UX. See “Increasing Data Availability Through Mirroring” (page 24).
  • Page 9: Lvm Architecture

    /dev/vg01/lvol3 might contain raw data. You can use HP SMH to create a file system in a logical volume of a specified size, then mount the file system. Alternately, you can use LVM commands to create, then extend a logical volume to allocate sufficient space for file systems or raw data.
  • Page 10: Physical Versus Logical Extents

    24). For information on striped logical volumes, see “Increasing Performance Through Disk Striping” (page 31). Also refer to the book Disk and File Management Tasks on HP-UX. Figure 2 shows an example of several types of mapping available between physical extents and logical extents within a volume group.
  • Page 11: Lvm Volume Group Versions

    As a result, a file system created within one logical volume can reside on more than one disk. LVM Volume Group Versions As of the March 2010 release of HP-UX 1 1i Version 3, LVM supports four versions of volume groups. All information and tasks in this document apply to all volume group versions except where noted.
  • Page 12: Lvm Device File Usage

    The legacy view, represented by the legacy DSF, continue to exist. Legacy Device Files versus Persistent Device Files As of HP-UX 1 1i Version 3, disk devices can be represented by two different types of device files in the /dev directory, legacy and persistent.
  • Page 13: Cluster-Wide Device Special Files

    Legacy device files were the only type of mass storage device files in releases prior to HP-UX 1 1i Version 3. They have hardware path information such as SCSI bus, target, and LUN encoded in the device file name and minor number. For example, the legacy device file /dev/dsk/c3t2d0 represents the disk at card instance 3, target address 2, and lun address 0.
  • Page 14 Which name you use depends on what task you are doing with the disk. For the boot disk on HP Integrity servers, make sure to use the device files with the _p2 suffix or s2 suffix, because they represent the HP-UX partition on the boot disk. On HP 9000 servers, use the device file without a partition number.
  • Page 15: Device Number Format

    When assigned by default, these names take the form /dev/vgnn/lvolN (the block device file form) and /dev/vgnn/rlvolN (the character device file form). The number N starts at 1 and increments in the order that logical volumes are created within each volume group. When LVM creates a logical volume, it creates both block and character device files.
  • Page 16: Version 1.0 Device Number Format

    Version 1.0 Device Number Format Table 2 lists the format of the device file number for Version 1.0 volume groups. Table 2 Version 1.0 Device Number Format Major Number Volume Group Reserved Logical Volume Number Number 0–0xff 0–0xff 0=group file For Version 1.0 volume groups, the major number for LVM device files is 64.
  • Page 17: Logical Interface Format Area

    LVM boot disks contain a Logical Interface Format (LIF) area, in which is stored a LABEL file. On HP 9000 servers, the LIF area contains boot utilities such as the initial system loader (ISL), the kernel boot loader (HPUX), the autoboot file (AUTO), and offline diagnostics.
  • Page 18: Lvm Limitations

    LVM or non-LVM methods. That is, you cannot combine these techniques for use with a single disk or partition. On an HP Integrity server, LVM supports partitioning of the root disk and its mirrors only, and supports only one HP-UX partition on any disk.
  • Page 19 Volume group Version 2.2 and higher with snapshot logical volumes configured cannot be activated in shared mode. Also, snapshots cannot be created off logical volumes belonging to shared volume groups. Synchronization of mirrored volume groups will be slower on shared volume groups. Beginning with the September 2009 Update, LVM provides new options in LVM commands to let system administrators reconfigure shared volume groups, logical volumes, and physical volumes on multiple nodes in a cluster, while user applications and data reads/writes remain available...
  • Page 20: Configuring Lvm

    2 Configuring LVM By default, the LVM commands are already installed on your system. This chapter discusses issues to consider when setting up your logical volumes. It addresses the following topics: “Planning Your LVM Configuration” (page 20) “Setting Up Different Types of Logical Volumes” (page 20) “Planning for Availability”...
  • Page 21: Setting Up Logical Volumes For File Systems

    Volume” (page 53)). Because there are no HP-UX commands that identify that the contents of a logical volume are being used for raw data, use recognizable names for the logical volumes you create for raw data. In this way, you can recognize the contents of such a logical volume.
  • Page 22: File System Logical Volume Guidelines

    You can control which physical volumes contain the physical extents of a logical volume by following these steps: Create a logical volume without specifying a size using the lvcreate command or HP SMH. When you do not specify a size, by default, no physical extents are allocated for the logical volume.
  • Page 23: Setting Up Logical Volumes For Dump

    Setting Up Snapshot Logical Volumes for Backup Beginning with HP-UX 1 1i v3 March 2010 Update, LVM introduces snapshot logical volumes, which can be used to capture point-in-time images of logical volumes quickly and without requiring as much space as the size of the logical volume.
  • Page 24: Planning For Availability

    This section contains the following information: “Mirror Write Behavior Control” (page 24) “Synchronizing a Mirrored Logical Volume” (page 26) To learn more about basic mirroring tasks, see Disk and File Management Tasks on HP-UX published by Prentice Hall PTR, 1997. Mirror Write Behavior Control...
  • Page 25: Scheduling Policy

    on the same physical volume. The -s y and -s n options to the lvcreate or lvchange commands set strict or nonstrict allocation. CAUTION: Using nonstrict allocation can reduce the redundancy created by LVM mirroring because a logical extent can be mirrored to different physical extents on the same disk. Therefore, the failure of this one disk makes both copies of the data unavailable.
  • Page 26: Synchronizing A Mirrored Logical Volume

    Starting with the September 2007 release of HP-UX 1 1i Version 3, you can use the T option to synchronize logical volumes in parallel. With the T option, lvsync spawns multiple threads to simultaneously synchronize all logical volumes belonging to the same volume group, often reducing the total synchronization time.
  • Page 27: Increasing Disk Redundancy Through Disk Sparing

    MirrorDisk/UX is not available for shared LVM environments within a high availability cluster across more than two nodes. You cannot configure sparing within these environments. In such cases, HP recommends that you use hardware mirroring through RAID devices, which can support their own form of sparing.
  • Page 28: Increasing Hardware Path Redundancy Through Multipathing

    NOTE: As of HP-UX 1 1i Version 3, the mass storage stack supports native multipathing without using LVM pvlinks. Native multipathing provides more load balancing algorithms and path management options than LVM. HP recommends using native multipathing to manage multipathed devices instead of using LVM's alternate links.
  • Page 29: Planning For Performance

    Planning for Performance This section describes strategies to obtain the best possible performance using LVM. It addresses the following topics: “General Performance Factors” (page 29) “Internal Performance Factors” (page 29) “Increasing Performance Through Disk Striping” (page 31) “Increasing Performance Through I/O Channel Separation” (page 33) General Performance Factors The following factors affect overall system performance, but not necessarily the performance of LVM.
  • Page 30: Disk Spanning

    Disk Spanning For disk areas that see the most intensive use by multiple processes, HP recommends spreading the data space for this disk area across as many physical volumes as possible.
  • Page 31: Increasing Performance Through Disk Striping

    The larger the unit of unshare, the more will the latency be when data has to be unshared and the lesser the metadata space needed on disk to track the sharing relationship between snapshots and the original logical volume. If the application performs large and occasional writes, then it is recommended that a larger unshare unit is used.
  • Page 32: Determining Optimum Stripe Size

    Figure 4 Interleaving Disks Among Buses Increasing the number of disks might not improve performance because the maximum efficiency that can be achieved by combining disks in a striped logical volume is limited by the maximum throughput of the file system itself and by the buses to which the disks are attached. Disk striping is highly beneficial for applications with few users and large, sequential transfers.
  • Page 33: Interactions Between Mirroring And Striping

    You might need to experiment to determine the optimum stripe size for your particular situation. To change the stripe size, re-create the logical volume. Interactions Between Mirroring and Striping Mirroring a striped logical volume improves the read I/O performance in a same way that it does for a nonstriped logical volume.
  • Page 34: Planning For Recovery

    The following are guidelines to help create a configuration that minimizes recovery time: Keep the number of disks in the root volume group to a minimum; HP recommends using three disks, even if the root volume group is mirrored.
  • Page 35: Preparing For Lvm System Recovery

    The configuration details stored on the system might not be accessible during a recovery. A printed copy is an invaluable reference. HP recommends printing the configuration details once a week and every time a change is made. Some of the commands create large amounts of output.
  • Page 36 NOTE: For volume group Version 2.2 and higher: volume groups that have snapshots on which data unsharing is occurring, the LVM configuration backup file might not always be in sync with the LVM metadata on disk. LVM ensures that the configuration for volume group Version 2.2 and higher is the latest by automatically backing it up during deactivation, unless backup has been disabled by the -A n option.
  • Page 37: Example Script For Lvm Configuration Recording

    Example Script for LVM Configuration Recording The following example script captures the current LVM and I/O configurations. If they differ from the previously captured configuration, the script prints the updated configuration files and notifies the system administrator. #!/usr/bin/ksh WORKDIR=/lvmbackup # directory is regularly backed up LOG=$WORKDIR/log SYSADM=root if [ -f "$LOG"...
  • Page 38: Administering Lvm

    HP System Management Homepage (HP SMH): An HP-UX tool that provides an easy-to-use GUI for performing most LVM tasks. HP SMH minimizes or eliminates the need for detailed knowledge of administration commands, thus saving time. Use HP SMH to manage your LVM configuration whenever possible, especially when performing a new task.
  • Page 39 Management Commands” (page 39), and “Logical Volume Management Commands” (page 40). The following tables provide an overview of which commands perform a given task. For more information, see the LVM individual manpages. Table 4 Physical Volume Management Commands Task Command Changing the characteristics of a physical volume in a volume group pvchange Creating a physical volume for use in a volume group...
  • Page 40: Displaying Lvm Information

    The command-line interface is more powerful—and thus more dangerous—than HP SMH and offers options that are not available using HP SMH. For example, the following tasks cannot currently be done by HP SMH. For these tasks, use the HP-UX commands: ◦...
  • Page 41: Information On Volume Groups

    NOTE: For volume group Version 2.2 or higher, when snapshots are involved, additional fields are displayed by these commands. See the individual command manpages for full description of the fields displayed. The “Creating and Administering Snapshot Logical Volumes” (page 103) section provides a summary of additional data displayed for snapshots.
  • Page 42: Information On Logical Volumes

    # pvdisplay -v /dev/disk/disk47 -- Physical volumes -- PV Name /dev/disk/disk47 VG Name /dev/vg00 PV Status available Allocatable VGDA Cur LV PE Size (Mbytes) Total PE 1023 Free PE Allocated PE Stale PE IO Timeout (Seconds) default Autoswitch Proactive Polling -- Distribution of physical volume -- LV Name LE of LV...
  • Page 43: Common Lvm Tasks

    Common LVM Tasks The section addresses the following topics: “Initializing a Disk for LVM Use” (page 43) “Creating a Volume Group” (page 44) “Migrating a Volume Group to a Different Version: vgversion” (page 46) “Adding a Disk to a Volume Group” (page 51) “Removing a Disk from a Volume Group”...
  • Page 44: Creating A Volume Group

    /dev/vgname/group to manage the volume group, regardless of the volume group version. If you are using an HP-UX release before March 2008, or if you want to specify the minor number of the group file, you must create /dev/vgname/group before running the vgcreate command.
  • Page 45: Creating A Version 2.X Volume Group

    Use the block device file to include each disk in your volume group. You can assign all the physical volumes to the volume group with one command, or create the volume group with a single physical volume. No physical volume can already be part of an existing volume group. You can set volume group attributes using the following options: Version 1.0 volume group (default) -V 1.0...
  • Page 46: Migrating A Volume Group To A Different Version: Vgversion

    Version 2.0 or 2.1. Version 2.2 (or higher) volume groups do support bootable PVs; however, the migration of Version 1.0 bootable PVs to Version 2.2 (or higher) is currently not supported for the HP-UX 1 1i v3 March 2010 Update.
  • Page 47: Command Syntax

    “Review Mode: vgversion -r” (page 47). Like other commands that run at the HP-UX shell level, the exit value of vgversion for a failed migration or failed migration review will be non-zero: # echo $?
  • Page 48: Example Of Migrating A Volume Group To A Different Version

    Version 2.1 requires more metadata. Thus, it is possible that there is not enough space in the LUN for the increase in metadata. In this example, vgversion r should display the following: #vgversion -V 2.1 -r -v vg01 Performing "vgchange -a r -l -p -s vg01" to collect data Activated volume group Volume group "vg01"...
  • Page 49: Migration Recovery

    relocation. The bad block relocation policy of all logical volumes will be set to NONE. Volume Group version can be successfully changed to 2.1 Review complete. Volume group not modified After messages from the review indicate a successful migration, you can begin the actual migration: Unlike in Review mode, the target volume group must meet certain conditions at execution time, including being de-activated.
  • Page 50: Example Recovery

    CAUTION: The recovery script should be run only in cases where the migration unexpectedly fails, such as an interruption during migration execution. The recovery script should not be used to “undo” a successful migration. For a successful vgversion migration, you should use only a subsequent vgversion execution (and not the recovery script) to reach the newly desired volume group version.
  • Page 51: Adding A Disk To A Volume Group

    NOTE: Once the recovery is complete using the restore script, an immediate vgversion operation in review mode will fail. You need to de-active the volume group and activate it again before running vgversion in review mode. This reset of volume group is not needed for a vgversion operation not in review mode.
  • Page 52: Creating A Logical Volume

    Check that the number of free physical extents (Free PE) matches the total number of physical extents (Total PE). If they are not the same, do one of the following tasks: Move the physical extents onto another physical volume in the volume group. See “Moving Data to a Different Physical Volume”...
  • Page 53: Creating A Mirrored Logical Volume

    NOTE: When you stripe across multiple disks, the striped volume size cannot exceed the capacity of the smallest disk multiplied by the number of disks used in the striping. Creating a Mirrored Logical Volume To create a mirrored logical volume, use lvcreate with the -m option to select the number of mirror copies.
  • Page 54: Extending A Logical Volume To A Specific Disk

    This increases the size of this volume to 332 MB. NOTE: On the HP-UX 1 1i v3 March 2010 Update, the size of a logical volume cannot be extended if it has snapshots associated with it. With the HP–UX 1 1i v3 September 2010 Update, this limitation is removed;...
  • Page 55: Reducing A Logical Volume

    On the HP-UX 1 1i v3 March 2010 Update, the size of a logical volume cannot be reduced if it has any type of snapshots associated with it. With the HP-UX 1 1i v3 September 2010 Update, only logical volumes with associated space efficient snapshots cannot be reduced. For information about snapshots, see “Creating and Administering Snapshot Logical Volumes”...
  • Page 56: Removing A Mirror From A Logical Volume

    # lvextend -m 1 /dev/vg00/lvol1 /dev/disk/disk4 NOTE: On the HP-UX 1 1i v3 March 2010 Update, the number of mirror copies of a logical volume cannot be changed if the logical volume has snapshots associated with it. With the HP-UX 1 1i v3 September 2010 Update, this limitation has been removed; and logical volumes with associated snapshots can have their mirror count changed.
  • Page 57: Removing A Logical Volume

    Update all references to the old name in any other files on the system. These include /etc/ fstab for mounted file systems or swap devices and existing mapfiles from a vgexport command. Removing a Logical Volume CAUTION: Removing a logical volume makes its contents unavailable and likely to be overwritten. In particular, any file system contained in the logical volume is destroyed.
  • Page 58: Importing A Volume Group

    To import a volume group, follow these steps: Connect the disks to the system. If you are using an HP-UX release before March 2008, or if you want to specify the minor number of the volume group device file, create it using the procedure in “Creating the Volume...
  • Page 59: Vgmodify For A Version 1.0 Volume Group

    Review the values by running vgmodify with the new settings and the -r option. Deactivate the volume group, if needed. TIP: Beginning with the March 2009 Update of HP-UX, the volume group can be active when running vgmodify. Commit the new values by running vgmodify without the -r option.
  • Page 60 New configuration requires "max_pes" are increased from 1016 to 6652 The current and new Volume Group parameters differ. An update to the Volume Group IS required New Volume Group settings: Max LV Max PV Max PE per PV 6652 PE Size (Mbytes) VGRA Size (Kbytes) Review complete.
  • Page 61 Volume Group configuration for /dev/vg32 has been saved in /etc/lvmconf/vg32.conf # pvmove /dev/disk/disk6:0 /dev/disk/disk6 Transferring logical extents of logical volume "/dev/vg32/lvol1"... Physical volume "/dev/disk/disk6" has been successfully moved. Volume Group configuration for /dev/vg32 has been saved in /etc/lvmconf/vg32.conf Preview the changes by using the -r option to vgmodify: # vgmodify -p 255 -e 15868 -r -n vg32 Current Volume Group settings: Max LV...
  • Page 62: Vgmodify For A Version 2.X Volume Group

    # vgdisplay vg32 --- Volume groups --- VG Name /dev/vg32 VG Write Access read/write VG Status available Max LV Cur LV Open LV Max PV Cur PV Act PV Max PE per PV 15868 VGDA PE Size (Mbytes) Total PE 1084 Alloc PE Free PE...
  • Page 63: Example: Vgmodify For A Version 2.X Volume Group

    If review mode indicates that the maximum VG size can be increased, perform the actual reprovisioning reconfiguration. This operation reconfigures every PV in the VG to the new (larger) maximum VG size. This operation also automatically adds new extents to PVs where the new extents were previously not added because the volume group was at its maximum number of extents.
  • Page 64 # vgdisplay -v vg1 --- Volume groups --- VG Name /dev/vg1 VG Version VG Max Size 500 GB VG Max Entents 64000 Run diskinfo on the physical volumes to display their size. # diskinfo /dev/rdisk/disk46 # diskinfo /dev/rdisk/disk47 Run online vgmodify in review mode to verify that all physical volumes can be reconfigured to the new (larger) maximum VG size of 8TB.
  • Page 65: Quiescing And Resuming A Volume Group

    Note that the number of extents for /dev/disk/disk47 is increased from 25604 to 38396 after the maximum VG size is increased, as shown by vgdisplay -v here. This command confirms that the maximum VG size was increased from 500 GB to 8 TB, and that the number of extents for /dev/disk/disk47 was increased from 25602 extents to 38396 extents, as shown by the vgdisplay command below.
  • Page 66: Renaming A Volume Group

    # vgexport -m vg01.map vg01 If you are using an HP-UX release before March 2008, or if you want to specify the minor number of the volume group device file, create it for the volume group's new name, using the procedure in “Creating the Volume Group Device File”...
  • Page 67: Splitting A Volume Group

    # vgchgid -f /dev/rdisk/disk2 /dev/rdisk/disk3 \ /dev/rdisk/disk4 /dev/rdisk/disk5 If you are using an HP-UX release before March 2008, or if you want to specify the minor number of the vgold group file, create it using the procedure in “Creating the Volume Group Device File”...
  • Page 68: Removing A Volume Group

    LVM updates the physical extents in the offline copy based on changes made to the copy that remained in use. You can use HP SMH to split and merge logical volumes, or use the lvsplit and lvmerge commands. To back up a mirrored logical volume containing a file system, using lvsplit and lvmerge,...
  • Page 69: Backing Up And Restoring Volume Group Configuration

    Split the logical volume /dev/vg00/lvol1 into two separate logical volumes as follows: # lvsplit /dev/vg00/lvol1 This creates the new logical volume /dev/vg00/lvol1b. The original logical volume /dev/ vg00/lvol1 remains online. Perform a file system consistency check on the logical volume to be backed up as follows: # fsck /dev/vg00/lvol1b Mount the file system as follows: # mkdir /backup_dir...
  • Page 70: Moving And Reconfiguring Your Disks

    LVMP_CONF_PATH_NON_BOOT variable definition as below: LVMP_CONF_PATH_NON_BOOT="" But if you have upgraded your system from earlier version to HP-UX 1 1i v3 March 2010, this default definition will not exist. In such case, you can manually define the variable in /etc/lvmrc to configure a new path.
  • Page 71: Moving Disks Within A System

    “Mirroring the Boot Disk on HP 9000 Servers” (page 90) “Mirroring the Boot Disk on HP Integrity Servers” (page 92) You might need to do the following tasks: Move the disks in a volume group to different hardware locations on a system.
  • Page 72: Moving Disks Between Systems

    To view the new locations, enter the following command: # vgscan -v If you are using an HP-UX release before March 2008, or if you want to retain the minor number of the volume group device file, create it using the procedure in “Creating the Volume...
  • Page 73: Moving Data To A Different Physical Volume

    If you are using an HP-UX release before March 2008, create the volume group device file using the procedure in “Creating the Volume Group Device File” (page 44). To get device file information about the disks, run the ioscan command:...
  • Page 74: Pvmove Command Syntax

    To reduce the source disk from the volume group, enter: # vgreduce /dev/vg00 /dev/disk/disk1 To shut down and reboot from the new root disk in maintenance mode, enter: ISL> hpux -lm (;0)/stand/vmunix In maintenance mode, to update the BDRA and the LABEL file, enter: # vgchange -a y /dev/vg00 # lvlnboot -b /dev/vg00/lvol1 # lvlnboot -s /dev/vg00/lvol2...
  • Page 75: Moving Data For Disk Space Balancing: Auto Re-Balancing

    Beginning with the September 2009 Update of HP-UX, you can achieve automatic re-balancing on Version 2.x volume groups using the a option of the pvmove command.
  • Page 76: Creating A Spare Disk

    103). Creating a Spare Disk NOTE: Disk sparing requires the optional product HP MirrorDisk/UX. Version 2.x volume groups do not support disk sparing. To configure a spare physical volume into a volume group for which you want protection against disk failure, follow these steps before a disk failure actually occurs:...
  • Page 77: Reinstating A Spare Disk

    Reinstating a Spare Disk NOTE: Disk sparing requires the optional product HP MirrorDisk/UX. Version 2.x volume groups do not support disk sparing. After a failed disk has been repaired or a decision has been made to replace it, follow these steps to reinstate it and return the spare disk to its former standby status: Physically connect the new or repaired disk.
  • Page 78: Handling Size Increases

    Handling Size Increases From the LUN Side: Disk arrays typically allow a LUN to be resized. If the volume group is activated during size increase, this is known as Dynamic LUN Expansion (DLE). If you increase the size of a LUN, follow these steps to incorporate the additional space into the volume group: Increase the LUN size using the instructions for the array.
  • Page 79 on the command line, vgmodify checks all PVs in the volume group. Optionally, you can specify the PVs you want to check in the command line after the VG name. . Perform the actual DLE reconfiguration (run vgmodify without the -r review option). If no PVs are specified, vgmodify attempts reconfiguration on all PVs in the volume group (if it detects them as having been expanded).
  • Page 80 3836 122753 3580 114561 3324 106369 3068 98177 2812 89985 8065 The table shows that without renumbering physical extents, a max_pv of 35 or lower permits a max_pe sufficient to accommodate the increased physical volume size. # vgmodify -v -t -n vg32 Volume Group configuration for /dev/vg32 has been saved in /etc/lvmconf/vg32.conf Current Volume Group settings:...
  • Page 81 Commit the new values as follows: # vgmodify -p 10 -e 10748 vg32 Current Volume Group settings: Max LV Max PV Max PE per PV 1016 PE Size (Mbytes) VGRA Size (Kbytes) The current and new Volume Group parameters differ. "/dev/rdisk/disk6"...
  • Page 82 Run online vgmodify in review mode to verify that the physical volumes require reconfiguration for the DLE and to preview the number of new extents to be added: # vgmodify -r -a -E vg1 Physical volume "/dev/disk/disk46" requires reconfiguration for expansion. Current number of extents: 12790 Number of extents after reconfiguration: 25590 Physical volume "/dev/disk/disk46"...
  • Page 83 Verify that the physical volumes were reconfigured and that there are new extents available with the vgdisplay v command: # vgdisplay -v vg1 --- Volume groups --- VG Name /dev/vg1 PE Size (Mbytes) Total PE 51180 Alloc PE 25580 Free PE 25600 …...
  • Page 84: Handling Size Decreases

    Handling Size Decreases CAUTION: A similar procedure can also be used when the size of a physical volume is decreased. However, there are limitations: Sequence: The sequence must be reversed to avoid data corruption. For an increase in size, the sequence is: Increase the LUN size from the array side.
  • Page 85 information. If a physical volume was accidentally initialized as bootable, you can convert the disk to a nonbootable disk and reclaim LVM metadata space. CAUTION: The boot volume group requires at least one bootable physical volume. Do not convert all of the physical volumes in the boot volume group to nonbootable, or your system will not boot. To change a disk type from bootable to nonbootable, follow these steps: Use vgcfgrestore to determine if the volume group contains any bootable disks.
  • Page 86 65535 2097120 45820 1466240 8064 If you change the disk type, the VGRA space available increases from 768 KB to 2784KB (if physical extents are not renumbered) or 32768 KB (if physical extents are renumbered). Changing the disk type also permits a larger range of max_pv and max_pe. For example, if max_pv is 255, the bootable disk can only accommodate a disk size of 8064 MB, but after conversion to nonbootable, it can accommodate a disk size of 40834 MB.
  • Page 87: Disabling A Path To A Physical Volume

    "/etc/lvmconf/vg01.conf.old" Volume group "vg01" has been successfully changed. Activate the volume group and verify the changes as follows: # vgchange -a y vg01 Activated volume group Volume group "vg01" has been successfully changed. # vgcfgbackup vg01 Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf # vgcfgrestore -l -v -n vg01 Volume Group Configuration information in "/etc/lvmconf/vg01.conf"...
  • Page 88: Creating An Alternate Boot Disk

    It must begin at physical extent 0000 to boot the system in maintenance mode. If you newly install your HP-UX system and choose the LVM configuration, a root volume group is automatically configured (/dev/vg00), as are separate root (/dev/vg00/lvol3) and boot (/dev/vg00/lvol1) logical volumes.
  • Page 89 “Mirroring the Boot Disk on HP Integrity Servers” (page 92). Run pvcreate with the -B option. On an HP Integrity server, use the device file denoting the HP-UX partition: # pvcreate -B /dev/rdisk/disk6_p2 On an HP 9000 server, use the device file for the entire disk: # pvcreate -B /dev/rdisk/disk6 Create a directory for the volume group.
  • Page 90: Mirroring The Boot Disk

    As a result, LVM scans and activates all available disks in the volume group vg00, including the disk that came online after the system rebooted. The procedure for creating a mirror of the boot disk is different for HP 9000 and HP Integrity servers. HP Integrity servers use partitioned boot disks.
  • Page 91 If you expect to boot from this disk only when you lose quorum, you can use the alternate string hpux lq to disable quorum checking. However, HP recommends configuring your root volume group to minimize quorum losses, by using at least three physical volumes and no single points of failure, as described in “Planning for Recovery”...
  • Page 92: Mirroring The Boot Disk On Hp Integrity Servers

    Mirroring the Boot Disk on HP Integrity Servers The procedure to mirror the root disk on Integrity servers is similar to the procedure for HP 9000 servers. The difference is that Integrity server boot disks are partitioned; you must set up the partitions, copy utilities to the EFI partition, and use the HP-UX partition device files for LVM commands.
  • Page 93 The values in the example represent a boot disk with three partitions: an EFI partition, an HP-UX partition, and an HPSP. Boot disks of earlier HP Integrity servers might have an EFI partition of only 100 MB and might not contain the HPSP partition.
  • Page 94 To shorten the time required to synchronize the mirror copies, use the lvextend and lvsync command options introduced in the September 2007 release of HP-UX 1 1i Version 3. These options enable you to resynchronize logical volumes in parallel rather than serially.
  • Page 95: Migrating A Volume Group To New Disks: Vgmove

    12. Add a line to /stand/bootconf for the new boot disk using vi or another text editor as follows: # vi /stand/bootconf l /dev/disk/disk2_p2 Where the literal “l” (lower case L) represents LVM. Migrating a Volume Group to New Disks: vgmove Beginning with September 2009 Update, LVM provides a new vgmove command to migrate data in a volume group from an old set of disks to a new set of disks.
  • Page 96: Migrating A Logical Volume To New Disks: Lvmove

    Migrating a Logical Volume to New Disks: lvmove Beginning with the HP-UX 1 1i v3 March 2010 Update, LVM provides a new lvmove command to migrate a logical volume within a volume group. The intent is to balance a logical volume either within the existing set of physical volumes or within a new set of physical volumes in the volume group.
  • Page 97: Administering File System Logical Volumes

    SMH performs all the necessary steps for you. Creating a File System When creating either an HFS or VxFS file system in a logical volume, you can use HP SMH or a sequence of HP-UX commands. If you choose to use HP-UX commands directly, the following list describes the subtasks for creating a file system.
  • Page 98: Extending A File System

    Short file names are 14 characters maximum. Long file names allow up to 255 characters. HP recommends using long file names for flexibility; files created on other systems that use long file names can be moved to your system without being renamed.
  • Page 99: Reducing The Size Of A File System

    If the file system must be unmounted, unmount it. Be sure no one has files open in any file system mounted to this logical volume and that it is no user's current working directory. For example: # fuser -cu /work/project5 If the logical volume is in use, confirm that the underlying applications no longer need it.
  • Page 100 Reducing a File System Created with OnlineJFS Using the fsadm command shrinks the file system, provided the blocks it attempts to deallocate are not currently in use; otherwise, it fails. If sufficient free space is currently unavailable, file system defragmentation of both directories and extents might consolidate free space toward the end of the file system, allowing the contraction process to succeed when retried.
  • Page 101: Backing Up A Vxfs Snapshot File System

    Use bdf to assess the primary file system size and consider the following: Block size of the file system (1,024 bytes per block by default) How much the data in this file system is likely to change (HP recommends 15 to 20% of total file system size)
  • Page 102: Creating A Swap Logical Volume

    Reducing the Size of a Swap Device If you are using a logical volume for swap, you must reduce the swap size before reducing the size of the logical volume. You can reduce the size of the logical volume using lvreduce or HP SMH.
  • Page 103: Removing A Dump Logical Volume

    57). Creating and Administering Snapshot Logical Volumes Beginning with the HP-UX 1 1i v3 March 2010 Update, LVM provides the ability to create snapshot logical volumes. A snapshot represents a point-in-time image of a logical volume. LVM snapshots let you: Use snapshots to back up data on the logical volume without splitting the logical volume.
  • Page 104: Creating A Snapshot Logical Volume

    Beginning with the HP-UX 1 1i v3 September 2010 Update, LVM can be enabled to automatically increase the pre-allocated extents of a snapshot when the threshold is reached. With this update, space efficient snapshots' threshold value can also be configured by the user.
  • Page 105: Managing The Lvmpud Daemon

    The lvmpud daemon is used to handle online shared volume group reconfiguration (introduced in the HP-UX 1 1i v3 September 2009 Update) and automatic increase of pre-allocated extents for space efficient snapshots (introduced in the 1 1i v3 September 2010 Update). This daemon must be running to enable these two features.
  • Page 106: Hardware Issues

    This section describes hardware-specific issues dealing with LVM. Integrating Cloned LUNs Certain disk arrays can create clones of their LUNs. For example, the HP XP product enables you to split off a set of LUNs, called Business Copies (BCs), which are copies of existing LUNs.
  • Page 107: Troubleshooting Lvm

    In addition, use the lvmadm command for two purposes: To determine which volume group versions are supported by your release of HP-UX 1 1i Version 3. For example, if your release supports Version 2.1 volume groups, lvmadm displays the following: # lvmadm -t -V 2.1...
  • Page 108: Consistency Checks

    VG Name /dev/vg00 PV Name /dev/disk/disk34_p2 In addition, there are some tools available from your HP support representative: dump_lvmtab: prints the contents of the /etc/lvmtab file in human-readable fashion. vgcfgdisplay: prints the contents of an LVM volume group configuration backup file (as created by vgcfgbackup), such as the volume group information, the logical volume information, physical volume information and logical extent distribution.
  • Page 109: I/O Errors

    # /sbin/reboot For more information about LVM maintenance mode boots and troubleshooting problems with LVM structures, see Disk and File Management Tasks on HP-UX, published by Prentice Hall PTR, 1997. I/O Errors When a device driver returns an error to LVM on an I/O request, LVM classifies the error as either recoverable or nonrecoverable.
  • Page 110: Temporarily Unavailable Device

    Temporarily Unavailable Device By default, LVM retries I/O requests with recoverable errors until they succeed or the system is rebooted. Therefore, if an application or file system stalls, your troubleshooting must include checking the console log for problems with your disk drives and taking action to restore the failing devices to service.
  • Page 111: Media Errors

    There are ways to override quorum requirements at volume group activation time or boot time. Even when allowed by LVM, HP recommends that you do not make changes to the LVM configuration for active volume groups that do not have a quorum of disks present. To correct quorum issues, HP recommends returning the unavailable disks to service.
  • Page 112: Quorum Problems With A Root Volume Group

    However, you can try to recover by booting the system with the quorum override option -lq. On an HP 9000 server, enter the following command: ISL> hpux -lq On an HP Integrity server, enter the following command: HPUX>...
  • Page 113 Max Extent Size (Mbytes) If lvmadm displays no output, your operating system release does not support Version 2.x volumes. You must update your system to the March 2008 release of HP-UX 1 1i Version 3 or a newer release. If the kernel driver to support Version 2.x volume groups is not loaded, lvmadm displays the following error: # lvmadm -t -V 2.0...
  • Page 114: Root Volume Group Scanning

    Max VG Size (Tbytes) 2048 Max LV Size (Tbytes) Max PV Size (Tbytes) Max VGs Max LVs Max PVs Max Mirrors Max Stripes Max Stripe Size (Kbytes) 262144 Max LXs per LV 33554432 Max PXs per PV 16777216 Max Extent Size (Mbytes) TIP: If your system has no Version 2.x volume groups, you can free up system resources associated with lvmp by unloading it from the kernel.
  • Page 115: Lvm Boot Failures

    LVM Boot Failures There are several reasons why an LVM configuration cannot boot. In addition to the problems associated with boots from non-LVM disks, the following problems can cause an LVM-based system not to boot. Insufficient Quorum In this scenario, not enough disks are present in the root volume group to meet the quorum requirements.
  • Page 116: Disk Troubleshooting And Recovery Procedures

    Immediately unmount the corrupted file system if it is mounted. Use the logical volume for swap space or raw data storage, or use HP SMH or the newfs command to create a new file system in the logical volume. This new file system now matches the current reduced size of the logical volume.
  • Page 117: Mirroring Critical Information, Especially The Root Volume Group

    The LVM OLR feature uses a new option ( a) in the pvchange command. The a option disables or re-enables a specified path to an LVM disk, as used to halt LVM access to the disk under “Step 6: Replacing a Bad Disk (Persistent DSFs)” (page 129) “Step 7: Replacing a Bad Disk (Legacy DSFs)”...
  • Page 118: Step 2: Recognizing A Failing Disk

    Check cables, power supply, ensure the drive is powered ON, and if needed contact your HP support representative to check the drive. For more information on EMS, see the Diagnostics section on the http://docs.hp.com website LVM Command Errors Sometimes LVM commands, such as vgdisplay, return an error suggesting that a disk has problems.
  • Page 119 this volume group vgdisplay: Warning: couldn't query all of the physical volumes. #vgchange -a y /dev/vg01 vgchange: Warning: Couldn't attach to the volume group physical volume "/dev/dsk/c0t3d0": A component of the path of the physical volume does not exist. Volume group "/dev/vg01" has been successfully changed. Another sign of disk problem is seeing stale extents in the lvdisplay command output.
  • Page 120: Step 3: Confirming Disk Failure

    Manager, to get detailed information about it. Use these tools as your first approach to confirm disk failure. They are documented on http://docs.hp.com in the Diagnostics area. If you do not have diagnostic tools available, follow these steps to confirm that a disk has failed or is failing: Use the ioscan command to check the S/W state of the disk.
  • Page 121 # dd if=/dev/rdsk/c0t5d0 of=/dev/null bs=1024k count=64 64+0 records in 64+0 records out NOTE: If the dd command hangs or takes a long time, Ctrl+C stops the read on the disk. To run dd on the background, add & at the end of the command. The following command shows an unsuccessful read of the whole disk: # dd if=/dev/rdsk/c1t3d0 of=/dev/null bs=1024k dd read error: I/O error...
  • Page 122 Note the value calculated is used in the skip argument. The count is obtained by multiplying the PE size by 1024. 122 Troubleshooting LVM...
  • Page 123: Step 4: Determining Action For Disk Removal Or Replacement

    Step 4: Determining Action for Disk Removal or Replacement Once you know which disk is failing, you can decide how to deal with it. You can choose to remove the disk if your system does not need it, or you can choose to replace it. Before deciding on your course of action, you must gather some information to help guide you through the recovery process.
  • Page 124 A third option for determining which logical volumes are on the disk is to use the vgcfgdisplay command, available from your HP support representative. For each of the logical volumes affected, use lvdisplay to determine if the number of mirror copies is greater than zero.
  • Page 125 LVM does not permit you to remove that physical volume from the volume group. In this case, use the lvunstale command (available from your HP support representative) to mark one of the mirror copies as “nonstale” for that given extent.
  • Page 126: Step 5: Removing A Bad Disk

    Step 5: Removing a Bad Disk You can elect to remove the failing disk from the system instead of replacing it if you are certain that another valid copy of the data exists or the data can be moved to another disk. Removing a Mirror Copy from a Disk If you have a mirror copy of the data already, you can stop LVM from using the copy on the failing disk by reducing the number of mirrors.
  • Page 127: Moving The Physical Extents To Another Disk

    The physical volume key of a disk indicates its order in the volume group. The first physical volume has the key 0, the second has the key 1, and so on. This need not be the order of appearance in /etc/lvmtab file although it is usually the case, at least when a volume group is initially created.
  • Page 128 Starting with the HP-UX 1 1i v3 release, there is a new feature introduced in the mass storage subsystem that also supports multiple paths to a device and allows access to the multiple paths simultaneously.
  • Page 129: Step 6: Replacing A Bad Disk (Persistent Dsfs)

    “Step 7: Replacing a Bad Disk (Legacy DSFs)” (page 138) If you have any questions about the recovery process, contact your local HP Customer Response Center for assistance. Because disks are physical devices, their hardware can fail, necessitating their replacement. After a failing disk is replaced with a new one (retaining the hardware address of the original disk to avoid confusion), the data must be restored to that disk from a backup.
  • Page 130 Class I Lun H/W Path Driver S/W State H/W Type Health Description ======================================================================== disk 14 64000/0xfa00/0x0 esdisk NO_HW DEVICE offline HP MSA Vol /dev/disk/disk14 /dev/rdisk/disk14 disk 28 64000/0xfa00/0x1c esdisk CLAIMED DEVICE online HP MSA Vol 0/1/1/1.0x3.0x0 /dev/disk/disk28 /dev/rdisk/disk28...
  • Page 131: Replacing An Unmirrored Nonboot Disk

    Description ======================================================================== disk 14 64000/0xfa00/0x0 esdisk CLAIMED DEVICE offline HP MSA Vol 0/1/1/1.0x3.0x0 /dev/disk/disk14 /dev/rdisk/disk14 In this example, the LUN instance number is 14, the LUN hardware path is 64000/0xfa00/0x0, and the lunpath hardware path is 0/1/1/1.0x3.0x0. When the failed disk is replaced, a new LUN instance and LUN hardware path are created.
  • Page 132 Class I Lun H/W Path Driver S/W State H/W Type Health Description ======================================================================== disk 14 64000/0xfa00/0x0 esdisk NO_HW DEVICE offline HP MSA Vol /dev/disk/disk14 /dev/rdisk/disk14 disk 28 64000/0xfa00/0x1c esdisk CLAIMED DEVICE online HP MSA Vol 0/1/1/1.0x3.0x0 /dev/disk/disk28 /dev/rdisk/disk28...
  • Page 133 Description ======================================================================== disk 14 64000/0xfa00/0x1c esdisk CLAIMED DEVICE online HP MSA Vol 0/1/1/1.0x3.0x0 /dev/disk/disk14 /dev/rdisk/disk14 The LUN representation of the old disk with LUN hardware path 64000/0xfa00/0x0 was removed. The LUN representation of the new disk with LUN hardware path 64000/0xfa00/0x1c was reassigned from LUN instance 28 to LUN instance 14 and its device special files were renamed as /dev/disk/disk14 and /dev/rdisk/disk14.
  • Page 134: Replacing A Mirrored Boot Disk

    In this example, the disk to be replaced is at lunpath hardware path 0/1/1/1.0x3.0x0, with device special files named /dev/disk/disk14 and /dev/rdisk/disk14. The system is an HP Integrity server, so the physical volume names must specify the HP-UX partition on the boot disk (/dev/disk/disk14_p2 and /dev/disk/disk14_p2).
  • Page 135 NOTE: On an HP 9000 server, the boot disk is not partitioned so the physical volume refers to the entire disk, not the HP-UX partition. Use the following command: # pvchange -a N /dev/disk/disk14 Replace the disk. For the hardware details on how to replace the disk, see the hardware administrator’s guide for the system or disk array.
  • Page 136 For example: # vgcfgrestore -n /dev/vg00 /dev/rdisk/disk14_p2 NOTE: On an HP 9000 server, the boot disk is not partitioned, so the physical volume refers to the entire disk, not the HP-UX partition. Use the following command: # vgcfgrestore -n /dev/vg00 /dev/rdisk/disk14 Restore LVM access to the disk.
  • Page 137: Replacing An Unmirrored Boot Disk

    10. Initialize boot information on the disk. For an HP Integrity server, set up the boot area and update the autoboot file in the disk's EFI partition as described in step 5 and step 6 of “Mirroring the Boot Disk on HP Integrity Servers”...
  • Page 138: Step 7: Replacing A Bad Disk (Legacy Dsfs)

    In this situation, you must override quorum to boot successfully. Do this by interrupting the boot process and adding the lq option to the boot command. For information on the boot process and how to select boot options, see HP-UX System Administrator's Guide: Configuration Management.
  • Page 139: Reporting Problems

    If you are unable to solve a problem with LVM, follow these steps: Read the HP-UX Logical Volume Manager and MirrorDisk/UX Release Notes to see if the problem is known. If it is, follow the solution offered to solve the problem.
  • Page 140 If this is a new problem or if you need additional help, log your problem with the HP Response Center, either online through the support case manager at http://www.itrc.hp.com, or by calling HP Support.
  • Page 141: Support And Other Resources

    The HP-UX System Administrator’s Guide documents the core set of tasks (and associated concepts) necessary to administer systems running HP-UX 1 1i Version 3. The HP-UX System Administrator’s Guide is a set of documents comprised of the following volumes: Overview Provides a high-level view of HP-UX 1 1i, its components, and how they relate to each other.
  • Page 142: Examples And Shells

    The name of a keyboard key. Return and Enter both refer to the same key. Term The defined use of an important word or phrase. Commands and other text that you type. User input Variable or Replaceable The name of a placeholder in a command, function, or other syntax display that you replace with an actual value.
  • Page 143: Related Information

    LVM product, accessible via the man command. The manpage are also published on http://www.hp.com/go/hpux-clickable-manpages Finding HP-UX Information The following table outlines where to find system administration information for HP-UX. This table does not include information for specific products. Table 10 Finding HP-UX Information...
  • Page 144: Hp-Ux 1 1I Release Names And Operating System Version Identifiers

    # HPUX11i-TCOE B.11.23.0409 HP-UX Technical Computing OE Component HP-UX 1 1i OS version identifiers have the form B.1 1.23 or B.1 1.23.0409, where B.1 1.23 is the OS version and 0409 is the year-month of the operating environment (OE) update.
  • Page 145: Hp Insight Remote Support Software

    Document updates can be issued between editions to correct errors or document product changes. To ensure that you receive the updated or new editions, subscribe to the appropriate product support service. See your HP sales representative for details. You can find the latest version of this document online at: http://www.hp.com/go/hpux-LVM-VxVM-docs .
  • Page 146: Hp Encourages Your Comments

    HP Encourages Your Comments HP encourages your comments concerning this document. We are committed to providing documentation that meets your needs. Send any errors found, suggestions for improvement, or compliments to: http://www.hp.com/bizsupport/feedback/ww/webfeedback.html Include the document title, manufacturing part number, and any comment, error found, or suggestion for improvement you have concerning this document.
  • Page 147: A Lvm Specifications And Limitations

    Volume Groups Volume Groups Volume Groups Volume Groups Maximum data on a 128 PB 1024 PB 1024 PB 1024 PB single HP-UX system Maximum number of 2048 2048 volume groups on a system Maximum number of 51 1 2048 2048...
  • Page 148 The limit of 2048 volume groups is shared among Version 2.x volume groups. Volume groups of Versions 2.x can be created with volume group numbers ranging from 0-2047. However, the maximum number of Version 2.0 volume groups that can be created is 512. For volume group Version 2.2 or higher, the total number of logical volumes includes normal logical volumes as well as snapshot logical volumes.
  • Page 149 Table 15 Version 2.x Volume Group Limits Parameter Command to Set/Change Minimum Value Default Value Maximum Value Parameter Number of volume groups 2048 on a system Number of physical volumes 51 1 51 1 (2.0) 51 1 (2.0) in a volume group 2048 (2.1, 2.2) 2048 (2.1, 2.2) Number of logical volumes...
  • Page 150: Determining Lvm's Maximum Limits On A System

    Determining LVM’s Maximum Limits on a System The March 2008 update to HP-UX 1 1i v3 (1 1.31) introduced a new command that enables the system administrator to determine the maximum LVM limits supported on the target system for a given volume group version.
  • Page 151 Max PXs per PV 16777216 Max Extent Size (Mbytes) Min Unshare unit (Kbytes) Max Unshare unit (Kbytes) 4096 Max Snapshots per LV Determining LVM’s Maximum Limits on a System...
  • Page 152: B Lvm Command Summary

    B LVM Command Summary This appendix contains a summary of the LVM commands and descriptions of their use. Table 16 LVM Command Summary Command Description and Example Extends a file system: extendfs # extendfs /dev/vg00/rlvol3 Displays the limits associated with a volume group version: lvmadm # lvmadm -t -V 2.0 Changes the characteristics of a logical volume:...
  • Page 153 Table 16 LVM Command Summary (continued) Command Description and Example Changes the characteristics of a physical volume: pvchange # pvchange -a n /dev/disk/disk2 Performs a consistency check on a physical volume: pvck # pvck /dev/disk/disk47_p2 Creates a physical volume be to used as part of a volume group: pvcreate # pvcreate /dev/rdisk/disk2 Displays information about a physical volume:...
  • Page 154 Table 16 LVM Command Summary (continued) Command Description and Example Scans the system disks for volume groups: vgscan # vgscan -v Reduces a volume group by removing one or more physical volumes from it: vgreduce # vgreduce /dev/vg00 /dev/disk/disk2 Removes the definition of a volume group from the system and the disks: vgremove # vgremove /dev/vg00 /dev/disk/disk2 Synchronizes all mirrored logical volumes in the volume group:...
  • Page 155: C Volume Group Provisioning Tips

    C Volume Group Provisioning Tips This appendix contains recommendations for parameters to use when creating your volume groups. Choosing an Optimal Extent Size for a Version 1.0 Volume Group When creating a Version 1.0 volume group, the vgcreate command may fail and display a message that the extent size is too small or that the VGRA is too big.
  • Page 156: Choosing An Optimal Extent Size For A Version 2.X Volume Group

    roundup(16 * lvs, BS) + roundup(16 + 4 * pxs, BS) * pvs) / BS, 8); if (length > 768) { printf("Warning: A bootable PV cannot be added to a VG \n" "created with the specified argument values. \n" "The metadata size %d Kbytes, must be less \n" "than 768 Kbytes.\n"...
  • Page 157: D Striped And Mirrored Logical Volumes

    Simpler to configure striped volumes and then extend mirroring. Able to split the mirror copy and have two usable volume sets LVM Implementation of RAID Levels in HP-UX LVM implementation of RAID management is different from the hardware based solutions because it does not nest the RAID levels, but processes them simultaneously.
  • Page 158: Lvm Striped And Mirrored Logical Volume Configuration

    set, the logical extents are stripped and mirrored to obtain the data layout displayed in Figure 6 (page 157). Striping and mirroring in LVM combines the advantages of the hardware implementation of RAID 1+0 and RAID 0+1, and provides the following benefits: Better write performance.
  • Page 159 NOTE: Striping with mirroring always uses strict allocation policies where copies of data do not exist on the same physical disk. This results in a configuration similar to the RAID 01 as illustrated in Figure 7 (page 158). To create a logical volume of size 90MB striped across two physical volumes with one mirror copy and stripe size of 64 KB and to create the mirror copies on specific disks ( configuration equivalent to RAID 01 as illustrated in Figure 7 (page...
  • Page 160: Compatibility Note

    Compatibility Note Releases prior to HP-UX 1 1i v3 only support striped or mirrored logical volumes and do not support combination of striped and mirrored logical volumes. If a logical volume using simultaneous mirroring and striping is created on HP-UX 1 1i v3, attempts to import or activate its associated volume group fails on a previous HP-UX release.
  • Page 161: E Lvm I/O Timeout Parameters

    E LVM I/O Timeout Parameters When LVM receives an I/O to a logical volume, it converts this logical I/O to physical I/Os to one or more physical volumes from which the logical volume is allocated. There are two LVM timeout values which affect this operation: Logical volume timeout (LV timeout).
  • Page 162: Timeout Differences: 1 1I V2 And 1 1I V3

    For more details on these two tunable parameters, see the scsimgr(1M) and scsimgr_esdisk(7) manpages. Also refer to the Path Recovery Policies and Managing Loss of Accessibility to a LUN sections of the HP-UX 1 1i v3 Native Multi-Pathing for Mass Storage whitepaper on http:// www.hp.com/go/hpux-core-docs.
  • Page 163: F Warning And Error Messages

    F Warning and Error Messages This appendix lists some of the warning and error messages reported by LVM. For each message, the cause is described and an action is recommended. Matching Error Messages to Physical Disks and Volume Groups Often an error message contains the device number for a device, rather than the device file name. For example, you might see the following message in /var/adm/syslog/syslog.log: Asynchronous write failed on LUN (dev=0x3000015) IO details : blkno : 2345, sector no : 23...
  • Page 164: Messages For All Lvm Commands

    Try to locate any missing disks. For each of the disk in the volume group, use ioscan and diskinfo to confirm that the disk is functioning properly. lvchange(1M) Message Text "m": Illegal option. Cause The system does not have HP MirrorDisk/UX installed. Recommended Action Install HP MirrorDisk/UX. lvextend(1M) Message Text lvextend: Not enough free physical extents available.
  • Page 165: Lvlnboot(1M)

    Use the vgmodify command to detect the disk size change and incorporate the new space into the volume group. Message Text "m": Illegal option. Cause The system does not have HP MirrorDisk/UX installed. Recommended Action Install HP MirrorDisk/UX. lvlnboot(1M) Message Text lvlnboot: Unable to configure swap logical volume.
  • Page 166: Pvchange(1M)

    pvchange(1M) Message Text Unable to detach the path or physical volume via the pathname provided. Either use pvchange(1M) -a N to detach the PV using an attached path or detach each path to the PV individually using pvchange(1M) Cause The specified path is not part of any volume group, because the path has not been successfully attached to the otherwise active volume group it belongs to.
  • Page 167: Vgchange(1M)

    You are activating a Version 2.x volume group, and your operating system release does not support Version 2.x volumes. Recommended Action Update your system to the March 2008 release of HP-UX 1 1i Version 3 or a newer release. Message Text Warning: couldn't query physical volume "pvname":...
  • Page 168: Recommended Action

    List the LVM group files. If there are any duplicate minor numbers, export one of the affected volume groups, optionally create a new group file with a unique minor number, and reimport the volume group. If you are not familiar with this procedure, contact your HP support representative for assistance.
  • Page 169: Vgcreate(1M)

    # mkdir /dev/vgname # mknod /dev/vgname/group c 64 unique_minor_number # vgimport -m vgname.map -v -f vgname.file /dev/vgname vgcreate(1M) Message Text vgcreate: "/dev/vgname/group": not a character device. Cause The volume group device file does not exist, and this version of the vgcreate command does not automatically create it.
  • Page 170: Vgdisplay(1M)

    List the LVM group files. If there are any duplicate minor numbers, export one of the affected volume groups, optionally create a new group file with a unique minor number, and reimport the volume group. If you are not familiar with this procedure, contact your HP support representative for assistance.
  • Page 171: Vgextend(1M)

    Recommended Action See the recommended actions under the “vgchange(1M)” (page 167) error messages. vgextend(1M) Message Text vgextend: Not enough physical extents per physical volume. Need: #, Have: #. Cause The disk size exceeds the volume group maximum disk size. This limitation is defined when the volume group is created, as a product of the extent size specified with the s option of vgcreate and the maximum number of physical extents per disk specified with the e option.
  • Page 172: Vgmodify(1M)

    Delete one of these group files and re-run the vgversion command. If you are not familiar with the procedure of finding an unused group file, contact your HP support representative for assistance. Message Text Error: The Physical Volume pvname has the pvkey #, which is not supported by volume group version 2.x...
  • Page 173: Log Files And Trace Files: /Var/Adm/Syslog/Syslog.log

    If the volume group already contains more than the maximum supported number of physical volumes for the target volume group version, then the migration cannot be achieved. If you are not familiar with any of the steps mentioned above, contact your HP support representative for assistance.
  • Page 174 This message appears when you import a volume group from a previous release of HP-UX. The format of the MWC changed at HP-UX 1 1i Version 3, so if the volume group contains mirrored logical volumes using MWC, LVM converts the MWC at import time. It also performs a complete resynchronization of all mirrored logical volumes, which can take substantial time.
  • Page 175 0xnnnnnnnn (1) Cause This message can be displayed on the first system boot after upgrading to HP-UX 1 1i Version 3. It is a transient message caused by updates to the I/O configuration. Later in the boot process, LVM registers for event notification again, and succeeds.
  • Page 176 LVM: ERROR: The task posted for increasing the pre-allocated extents failed for the snapshot LV (VG 128 0x004000, LV Number: 48). Cause This is a known issue (QXCR1001039721) occurring only in the HP-UX 1 1i v3 September 2010 Update. This message can be ignored. Recommended Action None.
  • Page 177: Glossary

    Legacy Device Legacy DSFs are used in releases prior to HP-UX 1 1i v3, and also supported on HP-UX 1 1i v3. Special Files (DSFs) A legacy DSF is a DSF with the hardware path information such as SCSI bus, target, and LUN embedded in the file's minor number and file name, such as /dev/dsk/c2t3d4.
  • Page 178 Mirroring requires the MirrorDisk/UX product. Persistent Device A Device Special File conforming to the naming model introduced in HP-UX 1 1i v3 to support Special Files (DSFs) agile addressing. The Device Sepcial File name contains an instance number, such as /dev/disk/disk#, and the minor number has no hardware path information.
  • Page 179: Index

    Index creating a logical volume, 52 Symbols creating a mirror of the boot disk, 90 /etc/default/fs, 98 creating a mirrored logical volume, 53 /etc/fstab, 35, 57, 67, 98 creating a physical volume, 43 /etc/lvmconf/ directory, 18, 35, 70 creating a spare disk, 76 /etc/lvmpvg, 33 creating a striped logical volume, 52 /etc/lvmtab, 1 1, 21, 39, 57, 71, 72, 108, 1 15, 163,...
  • Page 180 1 1 1 errors, 164 setting allocation policy, 24 hot-swappable disks, 123 setting scheduling policy, 25 HP SMH, 9, 38 setting synchronization policy, 25, 90 managing LVM, 38 setting timeout, 1 10 naming conventions, 13 lvcreate command, 40, 52, 152...
  • Page 181 89 HP 9000 servers, 90 for swap logical volume, 89, 102 HP Integrity servers, 92 updating boot information, 36, 92, 94, 1 15 modifying mirror copies, 53 lvmadm command, 12, 39, 107, 108, 1 12, 150, 152,...
  • Page 182 policies for allocating, 24 overriding at boot, 91, 93, 1 12, 135, 138 policies for writing, 25 requirements for booting, 1 15 size, 9, 17 synchronizing, 26 physical volume groups, 30, 33 raw data logical volume naming convention, 15 stripe size for, 32 Physical Volume Reserved Area see PVRA reducing a logical volume, 55 physical volumes...
  • Page 183 39, 153 automatically, 26 vgexport command, 39, 57, 71, 153 manually, 26 map file, 57 System Management Homepage see HP SMH moving disks, 71, 72 renaming a volume group, 66 splitting a volume group, 67 TB, defined, 178...
  • Page 184 splitting a volume group, 67 with multipathed disks, 58 vgmodify command, 12, 39, 58, 153 changing physical volume type, 84, 169 collecting information, 59, 62 errors, 172 modifying volume group parameters, 59, 171 resizing physical volumes, 77, 165 vgmove command, 95, 153 VGRA and vgmodify, 59, 63 area on disk, 17...

Table of Contents