background image

HP-UX System Administrator's Guide: Logical
Volume Management

HP-UX 11i 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 11i Version 3.

While many topics in this set apply to previous releases, much has changed in HP-UX 11i 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 2011
Edition: 8

Summary of Contents for HP-UX 11i

Page 1: ...m 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...

Page 2: ...t under vendor s standard commercial license The information contained herein is subject to change without notice The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services Nothing herein should be construed as constituting an additional warranty HP shall not be liable for technical or editorial errors or omissions cont...

Page 3: ...ng Up Logical Volumes for File Systems 21 File System Logical Volume Guidelines 22 Setting Up Logical Volumes for Swap 22 Swap Logical Volume Guidelines 22 Setting Up Logical Volumes for Dump 23 Dump Logical Volume Guidelines 23 Setting Up Snapshot Logical Volumes for Backup 23 Planning for Availability 24 Increasing Data Availability Through Mirroring 24 Mirror Write Behavior Control 24 Allocatio...

Page 4: ...ommand Syntax 47 Review Mode vgversion r 47 Example of Migrating a Volume Group to a Different Version 48 Migration Recovery 49 Example Recovery 50 Adding a Disk to a Volume Group 51 Removing a Disk from a Volume Group 51 Creating a Logical Volume 52 Creating a Striped Logical Volume 52 Creating a Mirrored Logical Volume 53 Extending a Logical Volume 53 Extending a Logical Volume to a Specific Dis...

Page 5: ... Administering File System Logical Volumes 97 Creating a File System 97 Extending a File System 98 Reducing the Size of a File System 99 Backing Up a VxFS Snapshot File System 101 Administering Swap Logical Volumes 101 Creating a Swap Logical Volume 102 Extending a Swap Device 102 Reducing the Size of a Swap Device 102 Administering Dump Logical Volumes 102 Creating a Dump Logical Volume 102 Remov...

Page 6: ...py from a Disk 126 Removing Mirror Copy from Ghost Disk 126 Moving the Physical Extents to Another Disk 127 Removing the Disk from the Volume Group 127 Step 6 Replacing a Bad Disk Persistent DSFs 129 Replacing a Mirrored Nonboot Disk 129 Replacing an Unmirrored Nonboot Disk 131 Replacing a Mirrored Boot Disk 134 Replacing an Unmirrored Boot Disk 137 Step 7 Replacing a Bad Disk Legacy DSFs 138 Repo...

Page 7: ...olume Timeout PV timeout 161 Timeout Differences 1 1i v2 and 1 1i v3 162 F Warning and Error Messages 163 Matching Error Messages to Physical Disks and Volume Groups 163 Messages For All LVM Commands 164 lvchange 1M 164 lvextend 1M 164 lvlnboot 1M 165 pvchange 1M 166 vgcfgbackup 1M 166 vgcfgrestore 1M 166 vgchange 1M 167 vgcreate 1M 169 vgdisplay 1M 170 vgextend 1M 171 vgimport 1M 171 vgmodify 1M ...

Page 8: ...to create a usable volume A logical volume can exceed the size of a single physical disk This feature is called disk spanning because a single file system 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 Ava...

Page 9: ... treated just like disk partitions They are accessible through device special files A logical volume can span a number of physical volumes in a volume group or represent only part of one physical volume The basic allocation units for a logical volume are called logical extents LEs A logical extent is mapped to a physical extent Thus if the physical extent size is 4 MB the logical extent size is al...

Page 10: ...d or striped mirrored logical volumes each logical extent is mapped to one physical extent For mirrored logical volumes each logical extent is mapped to multiple physical extents depending on the number of mirror copies For example if one mirror copy exists then each logical extent maps to two physical extents one extent for the original and one for the mirror copy For more information on mirrorin...

Page 11: ...oot primary swap or dump the physical extents must be contiguous which means that the physical extents must be allocated in increasing order with no gaps on a single physical volume For logical volumes that are not being used for root boot primary swap or dump physical extents that correspond to contiguous logical extents within a logical volume can be noncontiguous on a physical volume or reside ...

Page 12: ...ort bootable physical volumes Version 2 2 or higher volume groups support creation of snapshots of logical volumes Version 2 x volume groups do not support disk sparing Using the z option to the vgextend or pvchange command displays an error message The pvck command is not supported on Version 2 x volume groups Some HP UX products do not support Version 2 x volume groups For more information see t...

Page 13: ...nk applications using the persistent device file are not affected provided at least one link is still active New disks are automatically discovered You can use either persistent or legacy device files for LVM disks LVM recommends the use of persistent device special files because they support a greater variety of load balancing options To facilitate migration from legacy DSF to persistent DSF HP p...

Page 14: ...at you are referring to the entire disk Removing LVM information from a physical volume using the pvremove command Restoring your volume group configuration using the vgcfgrestore command Performing a consistency check on a physical volume using the pvck command Modifying the volume group identifier on a physical volume using the vgchgid command Changing the disk type of a physical volume using th...

Page 15: ... snapshot logical volume name defaults to the string comprising of the original logical volume name the tag S and the snapshot volume minor number N where N is the decimal equivalent of the least significant 12 bits of the snapshot volume s minor number The range for N is 1 to 2047 Additionally you can use the lvcreate t option to append the timestamp to the snapshot volume name The timestamp is o...

Page 16: ... for the group file NOTE The most significant bit of the volume group number and logical volume number fields are reserved and must be zero The device number format is subject to change LVM Disk Layout NOTE This information applies only to disks belonging to Version 1 0 and Version 2 2 or higher volume groups There are two kinds of LVM disk layouts one for boot disks and another for all other LVM ...

Page 17: ...lowing information A list of physical volumes in the volume group including physical volume status and size and a map of physical extents to logical volumes A list of logical volumes in the volume group including the status and capabilities of each logical volume its scheduling and allocation policies and the number of mirror copies A volume group header containing the VGID and three configurable ...

Page 18: ...TAS Volume Manager VxVM disk for your root disk To use LVM a disk must be first initialized into a physical volume To be allocatable for storage a physical volume must be assigned to a volume group A physical volume can belong to only one volume group The extent size of a volume group is fixed when the volume group is created It cannot be changed without recreating the volume group Shared LVM Shar...

Page 19: ... daemon that handles LVM online shared volume group reconfiguration The online reconfiguration of shared volume groups is only available on volume groups version 2 1 and higher See the SLVM Online Reconfiguration white paper for details For Version 1 0 and 2 0 volume groups you can use the vgchange x option the SLVM SNOR feature to change the configuration of a shared volume group while keeping it...

Page 20: ...ditional recommendations for performance read Planning for Performance page 29 Do you need to balance high availability and I O performance If so consider striping and mirroring your logical volume as described in Increasing Data Availability Through Mirroring page 24 and Increasing Performance Through Disk Striping page 31 Is it important to recover from disk failures quickly If so see Planning f...

Page 21: ...ents shown in Figure 3 Figure 3 File System Space Components To estimate how big to make a logical volume that will contain your file system follow these steps 1 Estimate how much disk space users will need for their data in the future Allow for any anticipated changes which usually include additional growth Use the du command to see how much disk space is currently used 2 Add 10 to the above amou...

Page 22: ... You can control which physical volumes contain the physical extents of a logical volume by following these steps 1 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 2 Extend the logical volume that is allocate space to the specific physical volumes you want to co...

Page 23: ... so conserves disk space You can configure a different or multiple dump devices on your system To do this create a logical volume as a dump device This device can also be used for swap For information on adding removing or modifying dump devices and configuring the dump algorithms see the HP UX System Administrator s Guide Configuration Management Dump Logical Volume Guidelines Use the following g...

Page 24: ...r of used physical extents and therefore occupied disk space changes depending on the number of mirrored copies Mirroring increases data protection and system availability but consumes twice as much disk space or as many times more as there are mirror copies so use disk mirroring for volatile mission critical data only Mirrored logical volumes must belong to the same volume group you cannot mirror...

Page 25: ...operations The d p option to the lvcreate or lvchange command sets the scheduling policy to parallel for a logical volume Sequential Scheduling The sequential scheduling policy causes mirror write operations to proceed sequentially that is LVM waits for one mirror write to complete before it begins the next mirror write Likewise LVM mirrors are read in a predefined order On a practical level seque...

Page 26: ...chronization must occur Usually synchronization occurs automatically but sometimes it must be done manually Automatic Synchronization If you activate a volume group that is not currently active either automatically at boot time or later with the vgchange command then LVM automatically synchronizes the mirrored copies of all logical volumes with the Mirror Consistency Recovery policy enabled It rep...

Page 27: ...py of the data from all the logical volumes currently on the failed disk is created on the substitute physical volume This process is referred to as automatic sparing or sparing Sparing occurs while the logical volume remains available to users You can then schedule the replacement of the failed disk at a time of minimal inconvenience to you and your users At that time you copy the data from the s...

Page 28: ...nk and the alternate link device file names Both links must represent paths to the same physical volume Do not run pvcreate on the alternate link it must already be the same physical volume as the primary link When you indicate two device file names both referring to the same disk using vgcreate LVM configures the first one as the primary link and the second one as the alternate link For example i...

Page 29: ...observed With LVM extra CPU cycles are required to perform mirror write consistency cache operations which is the only configurable option that impacts CPU usage Disk Space Usage LVM reserves some disk space on each physical volume for its own metadata The amount of space used is proportional to the maximum values used at volume group creation time Internal Performance Factors The following factor...

Page 30: ...rite requests must be kept in distinct volume groups if possible when the MWC is being used This is the only performance consideration that affects the decision regarding the number of volume groups Physical Volume Groups This factor can be used to enforce the separation of different mirror copies across I O channels You must define the physical volume groups This factor increases the availability...

Page 31: ...ed on three disks with each disk storing every third block of data The size of each of these blocks is called the stripe size of the logical volume The stripe size in K must be a power of two in the range 4 to 32768 for a Version 1 0 volume group and a power of two in the range 4 to 262144 for a Version 2 x volume group Disk striping can increase the performance of applications that read and write...

Page 32: ... group or a power of two in the range 4 to 262144 for a Version 2 x volume group The default is 8192 NOTE The stripe size of a logical volume is not related to the physical sector size of a disk which is typically 512 bytes How you intend to use the striped logical volume determines what stripe size you assign to it For best results follow these guidelines If you plan to use the striped logical vo...

Page 33: ...groups of physical volumes within a volume group An ASCII file etc lvmpvg contains all the mapping information for the physical volume group but the mapping is not recorded on disk Physical volume groups have no fixed naming convention you can name them PVG0 PVG1 and so on The etc lvmpvg file is created and updated using the vgcreate vgextend and vgreduce commands but you can edit the file with a ...

Page 34: ...systems Swap volumes targeted for dump must be in the root volume group A better solution is to configure an extra dedicated disk for dump up front Do not use network based backup programs such as Omniback or Networker for basic root volume group backups The complexity associated with these utilities can significantly delay the resumption of processing HP recommends using Ignite UX and the make_ne...

Page 35: ...get a useful output usr sbin ioscan fk usr sbin vgdisplay v usr sbin lvlnboot v usr sbin lvdisplay v dev vgXX lvYY for every logical volume usr sbin pvdisplay v dev dsk c t d0 for every LVM disk lp etc fstab As an alternative you can write an intelligent script that detects any changes in the configuration and only print out those changes An example script is included at the end of this section 5 ...

Page 36: ... group s configuration is the latest it is recommended that you close all the logical volumes of the volume group and back up the configuration using vgcfgbackup prior to deactivating the volume group 6 Update the boot structures after every change to the root volume group This task is only required if you are using LVM on your boot disk Whenever you make changes to the root volume group which is ...

Page 37: ... f2 LVMPVOLS grep pv_name vgdisplay new cut d f1 cut d f2 cut d f1 LVMLVOLS grep lv_name vgdisplay new cut d f1 cut d f2 usr sbin pvdisplay v LVMPVOLS pvdisplay new usr sbin lvdisplay v LVMLVOLS lvdisplay new usr sbin lvlnboot v lvlnboot new 2 dev null usr sbin ioscan fk ioscan new cp etc fstab fstab new for CURRENT in new do ORIG CURRENT new if diff CURRENT ORIG dev null then files are the same d...

Page 38: ...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 HP SMH can help you with the following tasks Creating or removing volume groups Adding or removing disks within volume groups Activating and deactivating volume groups Exporting and importing volume groups Creating removing or modify...

Page 39: ...he configuration parameters of a volume group handling physical volume size changes vgcfgbackup Backing up volume group configuration information vgcfgrestore Restoring volume group configuration from a configuration file vgdisplay Displaying information about volume groups vgexport Exporting a volume group and its associated logical volumes vgimport Importing a volume group onto the system adding...

Page 40: ...pdating the boot information on the boot physical volume lvrmboot1 Removing the link that makes a logical volume a root primary swap or dump volume lvsplit Splitting a mirrored logical volume into two logical volumes lvmerge Merging two logical volumes into one mirrored logical volume lvsync Synchronizing mirror copies in a mirrored logical volume 1 The lvlnboot and lvrmboot commands are not suppo...

Page 41: ...0 VG Version 1 0 VG Max Size 1082g VG Max Extents 69248 Logical volumes LV Name dev vg01 lvol1 LV Status available syncd LV Size Mbytes 2032 Current LE 125 Allocated PE 508 Used PV 1 Physical volumes PV Name dev disk disk42 PV Status available Total PE 508 Free PE 0 Autoswitch On Proactive Polling On Use the vgdisplay command to verify whether the LVM configuration in memory has problems If the LV...

Page 42: ...00 If the physical volume is functioning properly Stale PE is 0 Information on Logical Volumes Use the lvdisplay command to show information about logical volumes For example lvdisplay v dev vg00 lvol1 Logical volumes LV Name dev vg00 lvol1 VG Name dev vg00 LV Permission read write LV Status available syncd Mirror copies 0 Consistency Recovery MWC Schedule parallel LV Size Mbytes 100 Current LE 25...

Page 43: ...lume Group page 67 Removing a Volume Group page 68 Backing Up a Mirrored Logical Volume page 68 Backing Up and Restoring Volume Group Configuration page 69 Initializing a Disk for LVM Use CAUTION Initializing a disk using pvcreate results in the loss of any existing data currently on the disk NOTE If your disk is already connected to the system skip the first four steps of this procedure To initia...

Page 44: ...e running the vgcreate command If the group file does not exist and vgcreate can not create it vgcreate displays the following message vgcreate dev vgname group not a character device To create the volume group device file follow these steps 1 Create a directory for the volume group For example mkdir dev vgname By convention vgname is vgnn where nn is a unique number across all volume groups Howev...

Page 45: ...e group can grow S For example vgcreate V 2 0 s pe_size S vg_size dev vgname dev disk disk3 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 must use the following options V 2 ...

Page 46: ...table physical volume the root volume group usually named vg00 cannot be migrated to 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 For detailed information on the versions of volume groups and the benefits of migrating your v...

Page 47: ...exit value of vgversion for a failed migration or failed migration review will be non zero echo 1 Review Mode vgversion r vgversion allows you to review r its stdout and stderr messages to determine whether an attempted migration will succeed or fail without performing the actual migration Migration Success In Review mode when the migration will succeed you should get messages that conclude with t...

Page 48: ...case we could increase the LUN size to allow for the additional metadata After you believe you have resolved the problem s displayed you can try vgversion r again to determine whether the migration will be successful Once the vgversion r output shows a successful migration you can execute the actual migration using vgversion without the r option TIP Use the v Verbose option along with the r Review...

Page 49: ...en saved in etc lvmconf vgversion_vg01 vg01_1 0 conf Deactivating Volume Group vg01 Volume group vg01 has been successfully deactivated New Volume Group configuration for dev vg01 has been saved in etc lvmconf vgversion_vg01 vg01_2 1 conf Removing the Volume Group dev vg01 from etc lvmtab Applying the configuration to all Physical Volumes from etc lvmconf vgversion_vg01 vg01_2 1 conf Volume Group ...

Page 50: ...s the name of the target volume group at the time of the actual conversion Command Syntax The syntax for the recovery script is vgversion_vg_name_restore vg_name_vg_version_old conf where vg_name is the name of the target volume group vg_version_old is the original version number of the volume group 1 0 or 2 x NOTE The target volume group should be de activated or all physical volumes of the targe...

Page 51: ...cal volume by using the pvcreate command as described in Initializing a Disk for LVM Use page 43 2 Add the physical volume to the volume group using the vgextend command and the block device file for the disk For example vgextend dev vgname dev disk disk3 Removing a Disk from a Volume Group To remove a disk from a volume group follow these steps 1 Make sure the disk has no assigned physical extent...

Page 52: ... calculate this information vgdisplay outputs data on one or more volume groups including the physical extent size under PE Size MBytes and the number of available physical extents under Free PE By multiplying these two figures you get the number of megabytes available within the volume group For more information see vgdisplay 1M 3 Create the logical volume using lvcreate For example lvcreate L si...

Page 53: ...40 MB mirrored logical volume with one mirror copy nonstrict allocation parallel scheduling and no mirror resynchronization enter the following command lvcreate m 1 s n d p M n c n L 240 n lvol1 dev vg01 TIP To change the characteristics of an existing mirrored logical volume use the lvchange command It supports the C c d M and s options For more information see lvchange 1M Extending a Logical Vol...

Page 54: ...s a total of 7680 extents To extend the logical volume follow these steps 1 After making the disks physical volumes and creating your volume group create a logical volume named lvol1 of size 0 For example lvcreate n lvol1 dev vg01 2 Allocate a third of the extents to the logical volume on the first physical volume For example lvextend l 2560 dev vg01 lvol1 dev disk disk7 3 Increase the total numbe...

Page 55: ...educe the size of the logical volume as follows lvreduce L 500 dev vg01 lvol5 This command reduces the logical volume dev vg01 lvol5 to 500 MB NOTE 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 ...

Page 56: ...sk4 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 For information about snapshots see Creating and Administering Snapshot...

Page 57: ... removes all data concerning the volume group from the system while leaving the data on the disks intact The disks of an exported volume can be physically moved or connected to another system and the volume group can be imported there Exporting a volume group removes information about the volume group and its associated physical volumes from etc lvmtab and etc lvmtab_p and removes the volume group...

Page 58: ...e LVM s alternate link features importing the volume group has several implications You must omit the N option to the vgimport command The vgimport sets the first link found as the primary link for all physical volumes If the links are not in the desired order after the import use vgreduce and vgextend on the primary link for each physical volume for which you want to change the primary The tunabl...

Page 59: ...tents the n option enables renumbering of physical extents 2 Based on the information collected in the previous step choose new values for the volume group parameters 3 The new values may increase the size of the volume group reserved area VGRA on each physical volume The VGRA resides in the LVM header so increasing its size may require moving the first physical extent of any user data on physical...

Page 60: ... saved in etc lvmconf vg32 conf Current Volume Group settings Max LV 255 Max PV 16 Max PE per PV 1016 PE Size Mbytes 32 VGRA Size Kbytes 176 VGRA space Kbytes on Physical Volumes with extents in use PV current n dev rdisk disk6 896 32768 dev rdisk disk5 896 32768 Summary 896 32768 Physical Extent zero is not free on all PVs You will not achieve these values until the first extent is made free see ...

Page 61: ...2 has been successfully changed 6 Commit the new values vgmodify p 255 e 15868 n vg32 Current Volume Group settings Max LV 255 Max PV 16 Max PE per PV 1016 PE Size Mbytes 32 VGRA Size Kbytes 176 The current and new Volume Group parameters differ An update to the Volume Group IS required New Volume Group settings Max LV 255 Max PV 255 Max PE per PV 15868 PE Size Mbytes 32 VGRA Size Kbytes 32640 New...

Page 62: ...free extents at the ends of the physical volumes to increase the maximum volume group size If insufficient free extents are available at the end of some physical volumes and those physical volume cannot be expanded further via LUN expansion it might be necessary to free the extents at the ends of those physical volumes by using the pvmove command to relocate the portions of the logical volumes tha...

Page 63: ...reprovisioning reconfiguration by running the vgdisplay v command to check the new maximum VG size the new maximum number of extents for the VG the new total number of extents for the VG and the new number of free extents for the VG Example vgmodify for a Version 2 x Volume Group Here is an example of online reprovisioning when a volume group has reached its maximum VG size limit In this example t...

Page 64: ... be used for the reconfiguration on dev disk disk46 reducing the extents on that physical volume from 38398 to 39396 4 Note that additional extents will be added to dev disk disk47 when the vgmodify S option is run in change mode as shown here vgmodify a E S 8t vg1 Reconfiguration of physical volume dev disk disk46 for the requested maximum volume group size 8388608 MB succeeded Previous number of...

Page 65: ...o create a backup image or snapshot of all the disks in a volume group you must make sure that LVM is not writing to any of the disks when the snapshot is being taken otherwise some disks can contain partially written or inconsistent LVM metadata To keep the volume group disk image in a consistent state you must either deactivate the volume group or quiesce it Deactivating the volume group require...

Page 66: ...n Renaming a Volume Group To change the name of a volume group export it then import it using the new name For more detailed information on how to export and import a volume group see Exporting a Volume Group page 57 and Importing a Volume Group page 58 To rename the volume group vg01 to vgdb follow these steps 1 Deactivate the volume group as follows vgchange a n vg01 2 If you want to retain the ...

Page 67: ...w these steps 1 Deactivate the volume group as follows vgchange a n vgold 2 Export the volume group as follows vgexport vgold 3 Change the VGID on the physical volumes to be assigned to the new volume group as follows vgchgid f dev rdisk disk2 dev rdisk disk3 dev rdisk disk4 dev rdisk disk5 4 If you are using an HP UX release before March 2008 or if you want to specify the minor number of the vgol...

Page 68: ... of those logical volumes are in use This may require stopping applications using any logical volumes in the volume group and unmounting file systems contained in the volume group Use the fuser command on each logical volume fuser cu dev vgnn lvoln 4 Remove each of the logical volumes as follows lvremove dev vgnn lvoln For more information see Removing a Logical Volume page 57 5 Remove all but one...

Page 69: ...ch volume group configuration is unique changes and uses space on several disks If you back up your volume group configuration you can restore a corrupted or lost LVM configuration in the event of a disk failure or corruption of your LVM configuration information The vgcfgbackup command creates or updates a backup file containing the volume group configuration it does not back up the data within y...

Page 70: ...he root volume group are on the root file system in case these are required during recovery To run vgcfgrestore the physical volume must be detached If all the data on the physical volume is mirrored and the mirror copies are current and available you can temporarily detach the physical volume using pvchange perform the vgcfgrestore and reattach the physical volume For example to restore volume gr...

Page 71: ... are described in Legacy Device Files versus Persistent Device Files page 12 LVM Configuration with Persistent Device Files If your LVM configuration uses persistent device files follow these steps 1 Be sure that you have an up to date backup for both the data within the volume group and the volume group configuration 2 Deactivate the volume group by entering the following command vgchange a n dev...

Page 72: ...owing example NOTE If the volume group contains any multipathed disks see the note under Importing a Volume Group page 58 To move the three disks in the volume group dev vg_planning to another system follow these steps 1 If any of the logical volumes contain a file system unmount the file system If any of the logical volumes are used as secondary swap disable swap and reboot the system for informa...

Page 73: ...mple do this to remove a disk from a volume group You can use pvmove to move the data to other specified disks or let LVM move the data to appropriate available space within the volume group subject to any mirroring allocation policies To move all data off disk dev dsk disk3 and relocate it at the destination disk dev disk disk5 enter the following command pvmove dev disk disk3 dev disk disk5 To m...

Page 74: ...extents de Specifies the starting location of the destination physical extents within a destination physical volume se1 se2 Defines the source physical extent range provided along with source physical volume Beginning with the September 2009 Update pvmove additionally provides these options a Moves data to achieve auto rebalance of disk space usage within a volume group Supported for Version 2 x v...

Page 75: ... refers to the automatic movement of extents based on the optimal number of extents calculated automatically for each logical volume on each physical volume involved in the re balance operation 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 Purpose Balancing achieves better space utiliza...

Page 76: ...e balance operation is approximately in the range of 32 32 0 to 32 32 64 and after re balance operation would be approximately 32 0 32 The pvmove command below actually moves the data for balancing pvmove a vg_01 Automatic re balance operation successfully completed Volume Group configuration for dev vg_01 has been saved in etc lvmconf vg_01 conf NOTE In the automatic re balance mode the pvmove co...

Page 77: ...reconnected disk using vgcfgrestore as follows vgcfgrestore n dev vg01 dev rdisk disk1 3 Ensure the volume group has been activated as follows vgchange a y dev vg01 4 Be sure that allocation of extents is now allowed on the replaced disk as follows pvchange x y dev disk disk1 5 Use the pvmove command to move the data from the spare to the replaced physical volume For example pvmove dev disk disk3 ...

Page 78: ...ion 2 x Volume Groups Do the following for Version 2 x volume groups NOTE Beginning with the September 2009 Update the vgmodify also supports Version 2 x volume groups but the volume groups must be in active mode to run vgmodify For more information see vgmodify 1M If the LUN for a physical volume was dynamically expanded using an array utility the vgmodify E option can be used to make available t...

Page 79: ...ed in size and whether all of the space on the physical volumes can be used vgmodify v r vg32 Current Volume Group settings Max LV 255 Max PV 16 Max PE per PV 1016 PE Size Mbytes 32 VGRA Size Kbytes 176 dev rdisk disk6 Warning Max_PE_per_PV for the volume group 1016 too small for this PV 3051 Using only 1016 PEs from this physical volume dev rdisk disk6 size changed from 4194304 to 100000000kb An ...

Page 80: ... 251 16124 516000 252 16048 513568 255 15868 507808 The table shows that if physical extents are renumbered all values of max_pv permit a max_pe large enough to accommodate the increased physical volume size For this example select a max_pv of 10 which permits a max_pe value of 10748 4 Preview the changes by using the r option to vgmodify as follows vgmodify p 10 e 10748 r vg32 Current Volume Grou...

Page 81: ...nf vg32 conf Completed the modification process New Volume Group configuration for vg32 has been saved in etc lvmconf vg32 conf old Volume group vg32 has been successfully changed 7 Activate the volume group and verify the changes by entering the following commands vgchange a y vg32 Activated volume group Volume group vg32 has been successfully changed vgdisplay vg32 Volume groups VG Name dev vg32...

Page 82: ...sical volume dev disk disk47 was not changed 2 Run online vgmodify in change mode to perform the reconfiguration and add new extents to the physical volumes vgmodify a E vg1 Reconfiguration to expand physical volume dev disk disk46 succeeded Previous number of extents 12790 Number of extents after reconfiguration 25590 Physical volume dev disk disk46 was changed Volume Group configuration for dev ...

Page 83: ...ogical volumes LV Name dev vg1 lvol1 LV Status available syncd LV Size Mbytes 102320 Current LE 12790 Allocated PE 25580 Used PV 2 Physical volumes PV Name dev disk disk46 PV Status available Total PE 25590 Free PE 12800 PV Name dev disk disk47 PV Status available Total PE 25590 Free PE 12800 For more information and examples see the Using the vgmodify Command to Perform LVM Volume Group Dynamic L...

Page 84: ...ion see vgmodify 1M Physical Extent Quantity If the physical volume has any allocated physical extents beyond the target size vgmodify prints an error message and exits without changing the physical volume In this case you must be prepared to restore the LUN to its original size ensuring the same disk space is allocated Supported LUN Changes per Release This table shows what is supported with rega...

Page 85: ... follow these steps 1 Check if any physical volumes in vg01 are bootable as follows vgcfgrestore l v n vg01 Volume Group Configuration information in etc lvmconf vg01 conf VG Name dev vg01 Physical volumes 1 PV Type Size kb Start kb PVkey c2t1d0 Bootable 35566480 2912 0 max_pv 16 max_pe 1085 max_lv 255 2 To determine which values of max_pe and max_pv are available run the following command vgmodif...

Page 86: ...lume Group settings Max LV 255 Max PV 6 Max PE per PV 56828 PE Size Mbytes 32 VGRA Size Kbytes 2784 Review complete Volume group not modified 4 Deactivate the volume group as follows vgchange a n vg01 Volume group vg01 has been successfully changed 5 Commit the new values as follows vgmodify p 6 e 56828 B n vg01 dev rdsk c2t1d0 Current Volume Group settings Max LV 255 Max PV 16 Max PE per PV 1085 ...

Page 87: ...an I O card replacing an I O card or replacing the disk containing the physical volume Detaching a link to a physical volume is a temporary operation not a permanent one If you want to permanently remove a link or physical volume from the volume group use vgreduce instead as described in Removing a Disk from a Volume Group page 51 To detach a link to a physical volume use the a option to pvchange ...

Page 88: ...For more information on the swap and dump devices and their configuration see HP UX System Administrator s Guide Configuration Management The root logical volume contains the operating system software and the root file system The boot logical volume contains the boot file system stand You can combine the root and boot logical volumes into a single logical volume or keep them separate Whether you u...

Page 89: ...ev vgroot lvextend L 512 dev vgroot bootlv dev disk disk6 NOTE The r n option for bad block reallocation in this and next two steps is used for Version 1 0 volume groups only It is ignored by Version 2 x volume groups 8 Create the primary swap logical volume For example to create a primary swap logical volume named swaplv with size 2 GB on the same disks as the boot logical volume enter the follow...

Page 90: ... 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 NOTE These examples include creating a mirror copy of the primary swap logical volume The primary swap mirror ...

Page 91: ...rent dev vg00 lvol7 00000 01252 current dev vg00 lvol8 00000 7 Mirror each logical volume in vg00 the root volume group onto the specified physical volume For example lvextend m 1 dev vg00 lvol1 dev disk disk4 The newly allocated mirrors are now being synchronized This operation will take some time Please wait lvextend m 1 dev vg00 lvol2 dev disk disk4 The newly allocated mirrors are now being syn...

Page 92: ... boot root and swap logical volumes appear to be on both disks as follows lvlnboot v 10 Specify the mirror disk as the alternate boot path in nonvolatile memory as follows setboot a 0 1 1 0 0x1 0x0 1 1 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 disk4 Where the literal l lower case L represents LVM Mirroring the Boot Di...

Page 93: ...s refers to the service partition 3 Create a bootable physical volume using the device file denoting the HP UX partition For example pvcreate B dev rdisk disk2_p2 4 Add the physical volume to your existing root volume group as follows vgextend vg00 dev disk disk2_p2 5 Place boot utilities in the boot area Copy EFI utilities to the EFI partition and use the device special file for the entire disk a...

Page 94: ...ynchronized This operation will take some time Please wait lvextend m 1 dev vg00 lvol8 dev disk disk2_p2 The newly allocated mirrors are now being synchronized This operation will take some time Please wait NOTE If lvextend fails with following message m illegal option HP MirrorDisk UX is not installed TIP To shorten the time required to synchronize the mirror copies use the lvextend and lvsync co...

Page 95: ...ource_pv_1 destination_pv_1_1 destination_pv_1_2 source_pv_2 destination_pv_2_1 destination_pv_2_2 source_pv_n destination_pv_n_1 destination_pv_n_2 This diskmap file can be manually created or generated with the i option in vgmove by simply providing a list of destination disks to which to migrate the volume group Once the diskmap file is created you can review and edit it as needed then run vgmo...

Page 96: ...e activated before running the vgmove command If the vgmove command is interrupted before it completes the volume group is in the same state it was at the beginning of the vgmove command The migration can be continued by running the vgmove command with the same options and disk mapping file NOTE For volume groups that support bootable physical volumes Version 1 0 and Version 2 2 or higher vgmove s...

Page 97: ...em 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 1 If you create a new file system of a type other than HFS you might need to reconfigure the new type into the kernel Normally VxFS has been configured into the ker...

Page 98: ...nded Check the type of file system For example usr sbin fstyp dev vg01 lvol2 vxfs If the file system is VxFS do you have the base VxFS product or the OnlineJFS product If you have only the base VxFS product you must unmount the file system before extending it To see if the OnlineJFS product is installed enter the following command swlist l product grep i OnlineJFS OnlineJFS B 11 31 Online features...

Page 99: ...example fsadm b 339968 work project5 4 If you unmounted the file system mount it again a If you had to change to single user state reboot the system sbin reboot r You can skip any additional steps to mount the file system and export it since the boot process mounts and exports any file systems b Remount the file system as follows sbin mount dev vg01 rlvol2 mount_point NOTE If the file system will ...

Page 100: ...orking directory For example fuser cu dev vg01 lvol5 NOTE If the file system is exported using NFS to other systems verify that no one is using those other systems then unmount the file system on those systems before unmounting it on the server 2 Back up the data in the logical volume For example to back up work project5 to the system default tape device enter the following command tar cv work pro...

Page 101: ...8 MB 2 Use lvcreate to create a logical volume to contain the snapshot file system For example lvcreate L 8 n snap dev vg02 This creates an 8 MB logical volume called dev vg02 snap which can contain a snapshot file system of lvol4 3 Create a directory for the mount point of the snapshot file system For example mkdir tmp house 4 Create and mount the snapshot file system For example mount f vxfs o s...

Page 102: ...end the logical volume using lvextend or HP SMH Swap logical volumes must be contiguous so extending the logical volume succeeds only if there are physical extents available at the end of the existing logical volume If contiguous disk space is not available create a new contiguous logical volume for primary swap within the root volume group You do not need to designate a specific disk For example ...

Page 103: ...or relationship with each other When created a snapshot shares all its data with that of the original logical volume The snapshot gets a copy of its own data only when a write occurs copy before write onto itself or its successor This process is called data unsharing The smallest unit for data unsharing is the volume group s unshare unit specified by the vgcreate U option See vgcreate 1M for detai...

Page 104: ...a fully allocated snapshot is created Refer to the lvcreate 1M manpage for more details and full syntax for creating snapshot logical volumes Refer to the Naming Conventions for LVM page 13 section for naming conventions used for snapshot logical volumes NOTE Once snapshots are created their size and the number of mirror copies cannot be changed using the lvextend or lvreduce commands Removing Sna...

Page 105: ...pping of these logical extents to physical extents The pvdisplay command now additionally displays the following data The number of pre allocated physical extents on it A listing of the distribution of unshared physical extents per logical volume that lie on this physical volume The extent mapping for the physical volume will indicate pre allocated extents with a status of pre allocated NOTE The v...

Page 106: ...gned different VGIDs For example you have a volume group containing four physical volumes and need to create a BC for each physical volume If you run vgchgid on only two BCs vgchgid modifies the VGID on those two BCs If you then run vgchgid again with all four BCs vgchgid reports that they belong to different volume groups To correct this you can either run vgchgid on the two unmodified BCs and th...

Page 107: ...able 9 Table 9 LVM Information to Collect and Maintain Purpose Scope Command Prints I O configuration ioscan f Prints information on root boot swap and dump logical volumes lvlnboot v Prints volume group configuration from the backup file All volume groups vgcfgrestore l Prints volume group information including status of logical volumes and physical volumes All volume groups vgdisplay v Prints lo...

Page 108: ...performs explicit consistency checking on a physical volume This command detects bad checksums caused by a forward system migration after a backward system migration Run pvck only on deactivated volume groups For more information see pvck 1M NOTE The pvck command does not support Version 2 x volume groups Maintenance Mode Boot LVM maintenance mode boot is a special way to boot your system that byp...

Page 109: ... LVM on an I O request LVM classifies the error as either recoverable or nonrecoverable Recoverable Errors When LVM encounters a recoverable correctable error it internally retries the failed operation assuming that the error will correct itself or that you can take steps to correct it Examples of recoverable errors are the following Device power failure A disk that goes missing after the volume g...

Page 110: ...for a logical volume For example to set the timeout for dev vg01 lvol1 to one minute enter the following command lvchange t 60 dev vg01 lvol1 CAUTION Setting a timeout on a logical volume increases the likelihood of transient errors being treated as nonrecoverable errors so any application that reads or writes to the logical volume can experience I O errors If your application is not prepared to h...

Page 111: ...tion occurs if less than half of the physical volumes defined for the volume group now remain fully operational For example if two disks belong to a volume group the loss of one does not cause a loss of quorum as is the case when activating the volume group To lose quorum both disks must become unavailable In that case your volume group remains active but a message prints to the console indicating...

Page 112: ...vgchange a y dev vg01 Quorum Problems with a Root Volume Group Your root volume group can also report a quorum problem If not enough disks are present in the root volume group to constitute a quorum a message indicating that not enough physical volumes are present appears during the boot sequence This error might occur if you have physically removed a disk from your system because you no longer in...

Page 113: ...lvmadm displays the following LVM Limits VG Version 2 0 Max VG Size Tbytes 2048 Max LV Size Tbytes 256 Max PV Size Tbytes 16 Max VGs 512 Max LVs 511 Max PVs 511 Max Mirrors 6 Max Stripes 511 Max Stripe Size Kbytes 262144 Max LXs per LV 33554432 Max PXs per PV 16777216 Max Extent Size Mbytes 256 If lvmadm displays no output your operating system release does not support Version 2 x volumes You must...

Page 114: ...ysical volume does not belong to the root volume group LVM Failure in attaching PV dev 0x10000nn to the root volume group The physical volume does not belong to the root volume group LVM Activation of root volume group failed Quorum not present or some physical volume s are missing LVM Scanning for Root VG PVs VGID 0xnnnnnnnn 0xnnnnnnnn If this root volume group scanning succeeds messages similar ...

Page 115: ...vation of a volume group is a missing or corrupted etc lvmtab or etc lvmtab_p file After booting in maintenance mode you can use the vgscan command to re create the etc lvmtab and etc lvmtab_p files For more information see vgscan 1M Problems After Reducing the Size of a Logical Volume When a file system is first created within a logical volume it is made as large as the logical volume permits If ...

Page 116: ... page 123 5 Step 5 Removing a Bad Disk page 126 6 Step 6 Replacing a Bad Disk Persistent DSFs page 129 7 Step 7 Replacing a Bad Disk Legacy DSFs page 138 Step 1 Preparing for Disk Recovery Recovering from system failure is a critical part of system administration Consider the following guidelines before you experience a disk failure Defining a Recovery Strategy As you create logical volumes choose...

Page 117: ...e the availability of your system keep mirror copies of logical volumes on separate I O busses if possible With multiple mirror copies on the same bus the bus controller becomes a single point of failure if the controller fails If you create physical volume groups and set the allocation policy to PVG strict LVM helps you avoid inadvertently creating multiple mirror copies on a single bus For more ...

Page 118: ...t of an error message Event Time Tue Oct 26 14 06 00 2004 Severity CRITICAL Monitor disk_em Event 18 System myhost Summary Disk at hardware path 0 2 1 0 2 0 Drive is not responding Description of Error The hardware did not respond to the request by the driver The I O request was not completed Probable Cause Recommended Action The I O request that the monitor made to this device failed because the ...

Page 119: ...ogical volume but not necessarily the disk showing stale extents For example lvdisplay v dev vg01 lvol3 more LV Status available stale Logical extents LE PV1 PE1 Status 1 PV2 PE2 Status 2 0000 dev dsk c0t3d0 0000 current dev dsk c1t3d0 0100 current 0001 dev dsk c0t3d0 0001 current dev dsk c1t3d0 0101 current 0002 dev dsk c0t3d0 0002 current dev dsk c1t3d0 0102 stale 0003 dev dsk c0t3d0 0003 curren...

Page 120: ...sk UNCLAIMED UNKNOWN SEAGATE ST34572WC disk 2 8 16 5 2 0 sdisk CLAIMED DEVICE TOSHIBA CD ROM XM 5401TA In this example the disk at hardware path 8 4 8 0 is not accessible If the disk has multiple hardware paths be sure to check all the paths 2 You can use the pvdisplay command to check whether the disk is attached or not A physical volume is considered to be attached if the pvdisplay command is ab...

Page 121: ...ogical extents LE PV1 PE1 Status 1 PV2 PE2 Status 2 0000 dev dsk c0t3d0 0000 current dev dsk c1t3d0 0100 current 0001 dev dsk c0t3d0 0001 current dev dsk c1t3d0 0101 current 0002 dev dsk c0t3d0 0002 current dev dsk c1t3d0 0102 stale 0003 dev dsk c0t3d0 0003 current dev dsk c1t3d0 0103 stale In this case LE number 2 is stale b Get the extent size for the VG vgdisplay dev vg01 grep I PE Size PE size...

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: ...n them For example lvlnboot v Boot Definitions for Volume Group dev vg00 Physical Volumes belonging in Root Volume Group dev disk disk47_p2 Boot Disk Boot lvol1 on dev disk disk47_p2 Root lvol3 on dev disk disk47_p2 Swap lvol2 on dev disk disk47_p2 Dump lvol2 on dev disk disk47_p2 0 What logical volumes are on the disk and are they mirrored If you plan to replace the disk you might need to restore...

Page 124: ...us IO Timeout Seconds default The number of mirror copies is not zero therefore the logical volume is mirrored Use lvdisplay again to determine which logical extents are mapped onto the suspect disk and whether there is a current copy of that data on another disk With the v option lvdisplay shows every logical extent its mapping to any physical extents and the status of those physical extents stal...

Page 125: ...tale command available from your HP support representative to mark one of the mirror copies as nonstale for that given extent HP recommends you use the lvunstale tool with caution Based on the gathered information choose the appropriate disk removal or disk replacement procedure detailed on the following pages The possible scenarios are Step 5 Removing a Bad Disk page 126 Step 6 Replacing a Bad Di...

Page 126: ...ysical volume or a physical volume that is not actually connected to the system but is still recorded in the LVM configuration file Such a physical volume is sometimes called a ghost disk or phantom disk You can get a ghost disk if the disk has failed before volume group activation possibly because the system was rebooted after the failure A ghost disk is usually indicated by vgdisplay reporting m...

Page 127: ...e disk is partially available and you can still read from it you can move the data onto another disk by moving the physical extents onto another disk The pvmove command moves logical volumes or certain extents of a logical volume from one physical volume to another It is typically used to free up a disk that is to move all data from that physical volume so it can be removed from the volume group I...

Page 128: ...volume groups were configured with only persistent device special files there is no need to arrange them again If needed use the following steps to rebuild the LVM configuration files etc lvmtab or etc lvmtab_p vgreduce f vgname pvname vgscan f vgname In cases where the physical volume is not readable for example when the physical volume is unattached either because the disk failed before volume g...

Page 129: ...al extents on the disk have copies on another disk and the disk is not a boot disk If the disk contains any unmirrored logical volumes or any mirrored logical volumes without an available and current mirror copy see Replacing an Unmirrored Nonboot Disk page 131 For 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 d...

Page 130: ...ice special files dev disk disk28 and dev rdisk disk28 at the same lunpath hardware path as the old disk 0 1 1 1 0x3 0x0 The old LUN instance 14 for the old disk now has no lunpath associated with it NOTE If the system was rebooted to replace the failed disk then ioscan m lun does not display the old disk 6 Assign the old instance number to the replacement disk For example io_redirect_dsf d dev di...

Page 131: ...failed disk ioscan m lun dev disk disk14 Class I Lun H W Path Driver S W State H W Type Health 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 LU...

Page 132: ...able replace it If the disk is not hot swappable shut down the system turn off the power and replace the disk Reboot the system 4 Notify the mass storage subsystem that the disk has been replaced If the system was not rebooted to replace the failed disk then run scsimgr before using the new disk as a replacement for the old disk For example scsimgr replace_wwid D dev rdisk disk14 This command allo...

Page 133: ...fa00 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 7 Restore LVM configuration information to the new disk For example vgcfgrestore n dev vgnn dev rdisk disk14 8 Restore LVM access to the disk If you did not reboot the system in Step 2 Halt LVM access to the disk reattach the disk as follows pvchange a ...

Page 134: ...s rebooting the system and the primary boot disk is being replaced you must boot from the alternate 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 an...

Page 135: ... boot options see HP UX System Administrator s Guide Configuration Management 4 Notify the mass storage subsystem that the disk has been replaced If the system was not rebooted to replace the failed disk then run scsimgr before using the new disk as a replacement for the old disk For example scsimgr replace_wwid D dev rdisk disk14 This command allows the storage subsystem to replace the old disk s...

Page 136: ...rdisk disk14 dev disk disk14_p1 dev rdisk disk14_p1 dev disk disk14_p2 dev rdisk disk14_p2 dev disk disk14_p3 dev rdisk disk14_p3 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...

Page 137: ...ot 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 92 For an HP 9000 server set up the boot area and update the autoboot file as described in step 4 and step 5 of Mirroring the Boot Disk on HP 9000 Servers page 90 Replacing an Un...

Page 138: ...isk by removing it from the volume group If pvdisplay show PV status as unavailable or if pvdisplay fails to print the status use ioscan to determine if the disk can be accessed at all If ioscan reports the disk status as NO_HW on all its hardware paths you can remove the disk If ioscan shows any other status halt LVM access to the disk by deactivaing the volume group 2 Replace the Faulty Disk If ...

Page 139: ...o the Disk This step re attaches the disk as follows pvchange a y pvname 5 Restore Lost Data to the Disk This final step can be a straightforward re synchronization for mirrored configurations or a recovery of data from backup media If a mirror of the root disk was replaced initialize its boot information as follows For an Integrity server follow steps 5 6 and 8 in Mirroring the Boot Disk on HP In...

Page 140: ...er online through the support case manager at http www itrc hp com or by calling HP Support If your warranty has expired or if you do not have a valid support contract for your product you can still obtain support services for a fee based on the amount of time and material required to solve your problem 4 If you are asked to supply any information pertaining to the problem gather the requested inf...

Page 141: ...ure and customize system settings and the behavior of subsystems Logical Volume Management Documents how to configure physical volumes volume groups and logical volumes using the HP Logical Volume Manager LVM Security Management Documents the data and system security features of HP UX 1 1i Routine Management Tasks Documents many of the ongoing tasks you must perform to keep your system running smo...

Page 142: ...nclose required content If the contents are a list separated by you must choose one of the items The preceding element can be repeated an arbitrary number of times Ellipsis is sometimes used to indicate omitted items in a range Indicates the continuation of a code example Separates items in a list of choices WARNING A warning calls attention to important information that if not understood or follo...

Page 143: ...ind system administration information for HP UX This table does not include information for specific products Table 10 Finding HP UX Information Located at Refer To If you need to The HP UX 1 1i Release Notes specific to your version of HP UX Find out HP Instant Information media What has changed in HP UX releases HP UX Technical Documentation website at http www hp com go hpux core docs The conte...

Page 144: ...can help you determine information about your system including its hardware type machine model operating system version and operating environment update status See uname 1 model 1 and swlist 1M For OS naming conventions see HP UX 1 1i Release Names and Operating System Version Identifiers page 144 Table 12 OS Version System Architecture and Machine Model Sample Output Command Topic B 11 311 uname ...

Page 145: ...and to enable enhanced delivery of your HP Warranty HP Care Pack Service or HP contractual support agreement HP Insight Remote Support supplements your monitoring 24x7 to ensure maximum system availability by providing intelligent event diagnosis and automatic secure submission of hardware event notifications to HP which will initiate a fast and accurate resolution based on your product s service ...

Page 146: ...n 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 146 Support and Other Resources ...

Page 147: ...cal volume 2048 TB 2048 TB 2048 TB 510 TB Maximum size of a volume group 256 TB 256 TB 256 TB 16 TB Maximum size of a logical volume 256 MB 256 MB 256 MB 256 MB Maximum size of a physical extent 256 MB 256 MB 256 MB 32 MB Maximum size of a stripe 51 1 51 1 51 1 255 Maximum number of stripes 33554432 33554432 33554432 65535 Maximum number of logical extents per logical volume 16777216 16777216 1677...

Page 148: ...volumes in a volume group vgmodify l max_lv 2 TB LUN Capacity 1 PE pvcreate s pv_size Size of a physical volume 16 TB 0 0 lvcreate L lv_size Size of a logical volume lvextend L lv_size 256 MB 4 MB 1 MB vgcreate s pe_size Size of a physical extent 32 MB 8 KB 4 KB lvcreate l stripe_size Size of a stripe Number of n a 2 lvcreate i stripes Number of stripes PVs in VG 65535 0 0 lvcreate l max_le Number...

Page 149: ...16 LUN Capacity 1 n a Number of physical extents per physical volume PE Size 255 0 0 n a Number of snapshots per logical volume for volume group Version 2 2 and higher only 4096KB 1024KB 512KB vgcreate U unshare_unit Size of unshare unit for snapshots for volume group Version 2 2 and higher only max_vgsize max_vgsize max_vgsize n a Maximum snapshot capacity for volume group Version 2 2 and higher ...

Page 150: ...ax LXs per LV 65535 Max PXs per PV 65535 Max Extent Size Mbytes 256 VG Version 2 0 Max VG Size Tbytes 2048 Max LV Size Tbytes 256 Max PV Size Tbytes 16 Max VGs 512 Max LVs 511 Max PVs 511 Max Mirrors 5 Max Stripes 511 Max Stripe Size Kbytes 262144 Max LXs per LV 33554432 Max PXs per PV 16777216 Max Extent Size Mbytes 256 VG Version 2 1 Max VG Size Tbytes 2048 Max LV Size Tbytes 256 Max PV Size Tby...

Page 151: ...Max PXs per PV 16777216 Max Extent Size Mbytes 256 Min Unshare unit Kbytes 512 Max Unshare unit Kbytes 4096 Max Snapshots per LV 255 Determining LVM s Maximum Limits on a System 151 ...

Page 152: ...a logical volume to become a root swap or dump area lvlnboot lvlnboot d dev vg00 lvol2 Merges split volumes into one logical volume lvmerge lvmerge dev vg00 lvol4b dev vg00 lvol4 Migrate a logical volume to new disks lvmove lvmove f newdisks txt dev vg00 lvol2 Daemon to handle online shared LVM reconfiguration and pre allocation of extents for space efficient snapshots lvmpud lvmpud Decreases the ...

Page 153: ...fgrestore n dev vg00 dev rdisk disk2 Turns a volume group off or on vgchange vgchange a y dev vg00 Changes the volume group ID of a physical volume vgchgid vgchgid dev rdisk disk3 Converts persistent device special files in a volume group to cluster device special files vgcdsf vgcdsf dev vg10 Creates a volume group vgcreate vgcreate dev vg01 dev disk disk2 dev disk disk3 Displays information about...

Page 154: ...r 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 vgsync vgsync vg00 Migrates a volume group to a different version vgversion vgversion V 2 1 vg14 154 LVM Command Summary ...

Page 155: ... of values for MAXLVs MAXPVs and MAXPXs that succeed on a volume group without bootable physical volumes may fail on a volume group with bootable physical volumes In this situation if you must add a bootable physical volume to a volume group recreate the volume group by giving lesser values for these arguments By far the biggest factor in the size of the metadata is the values for MAXPVs and MAXPX...

Page 156: ... also a limitation on the number of extents an individual volume group can contain To determine the proper size the vgcreate command has a new E option This option displays the maximum volume group size based on the given physical extent size or minimum physical extent size based on the maximum volume group size Example After you know the VG size you want to provision for use vgcreate with the E o...

Page 157: ...aid 01 The advantages of hardware based RAID 10 over RAID 01 When one disk fails and is replaced only the amount of data on this disk needs to be copied or re synchronized RAID 10 is more tolerant to multiple disk failures before data becomes unavailable The advantages of hardware based RAID 01 over RAID 10 Simpler to configure striped volumes and then extend mirroring Able to split the mirror cop...

Page 158: ...erwise LVM optimizes the extent allocation to enable you to create a striped and mirrored logical volume as long as there are enough free extents in the volume group The logical volume layout then uses a slight variation of RAID 10 and all the benefits of RAID 10 are retained For example Figure 7 shows a volume group with seven physical volumes and a logical volume striped across three disks with ...

Page 159: ...display dev vgtest lvol1 Logical volumes LV Name dev vgtest lvol1 VG Name dev vgtest LV Permission read write LV Status available syncd Mirror copies 0 Consistency Recovery MWC Schedule striped LV Size Mbytes 1024 Current LE 256 Allocated PE 256 Stripes 2 Stripe Size Kbytes 64 Bad block on Allocation strict IO Timeout Seconds default To get a striped and mirrored configuration extend the logical v...

Page 160: ...ease To import the volume group with striped and mirrored logical volume to releases prior to HP UX 1 1i v3 you must remove the incompatible logical volumes or reduce them to no mirrors NOTE Striped and mirrored logical volume is supported on HP UX 1 1i v2 with the PHCO_36744 PHKL_36745 and PHCO_36746 patches With these patches or superseding patches installed on a HP UX 1 1i v2 system you can suc...

Page 161: ...t can be configured for a specific physical volume using pvchange See the pvchange 1M manpage for details Also note the following With 1 1i v3 native multi pathing is enabled by default in mass storage stack When it is enabled For clarity it is recommended that only agile DSFs and cluster DSFs should be used in LVM when configuring or adding physical volumes to the volume group Native multi pathin...

Page 162: ...owever this situation remains only for some period of time usually up to transient_secs but could be higher in some cases until the associated LUNs transitions out of transient state either to online or offline state after which it is recovered automatically This could be due to the higher timeout value set in the SCSI tunable transient_secs and path_fail_secs If the physical volume has few links ...

Page 163: ...f the pvdisplay command fails search for the physical volume in the LVM configuration files etc lvmtab and etc lvmtab_p as follows lvmadm l V 1 0 Version 1 0 volume groups VG Name dev vg00 PV Name dev disk disk36_p2 VG Name dev vgtest PV Name dev disk disk43 VG Name dev vg03 PV Name dev dsk c2t2d0 If your version of lvmadm does not recognize the l option use the strings command as follows strings ...

Page 164: ...he 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 Logical volume dev vgname lvname could not be extended Failure possibly caused by strict allocation policy Cause There is not enough space in the v...

Page 165: ...r add more disk space to the volume group 2 Choose a smaller size for the logical volume or add more disk space to the volume group Alternatively free up space on an available disk using pvmove 3 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 Recommen...

Page 166: ...st available path to it verify that there are alternate copies of the data available on other disks in the volume group If necessary use pvchange 1M to reverse this operation Cause This warning is advisory It is generated whenever a path or physical volume is detached Recommended Action None vgcfgbackup 1M Message Text Invalid LVMREC on Physical Volume pvname Cause The LVM header on the disk is in...

Page 167: ...n first n Future operations will ask whether to update the backup The requested changes have been applied to the currently running configuration Module State Cause Notes lvmp before unused loadable unloadable now loaded best next boot loaded explicit Message Text vgchange Warning Couldn t attach to the volume group physical volume pvname Illegal byte sequence vgchange Couldn t activate volume grou...

Page 168: ...and diskinfo to confirm that the disk is functioning properly Reactivate the volume group using the following command vgchange a y vgname 2 There are several methods of recovery from this error If you are not familiar with the commands outlined in the following procedures contact your HP support representative for assistance a Restore a known good configuration to the disks using vgcfgrestore Be s...

Page 169: ...lize the disk as described in Initializing a Disk for LVM Use page 43 For example pvcreate f pvname Use the vgmodify command to convert the disk to a nonbootable disk as described in Changing Physical Volume Boot Types page 84 Alternately use the pvcreate command without the B option to reinitialize the disk as described in Initializing a Disk for LVM Use page 43 For example pvcreate f pvname Mess...

Page 170: ...minor_number vgimport m vgname map v f vgname file dev vgname 2 Remove the dev slvmvg device file and re create the etc lvmtab and etc lvmtab_p files using the following commands rm dev slvmvg mv etc lvmtab etc lvmtab old mv etc lvmtab_p etc lvmtab_p old vgscan v Message Text vgdisplay etc lvmtab No such file or directory vgdisplay No volume group name could be read from etc lvmtab vgdisplay etc l...

Page 171: ...ort 1M Message Text vgimport dev vgname group not a character device Cause The volume group device files do not exist and this version of the vgimport command does not automatically create them Recommended Action Create the directory for the volume group and create a group file as described in Creating the Volume Group Device File page 44 Message Text Verification of unique LVM disk id on each dis...

Page 172: ...re information on how to replace a disk see Step 6 Replacing a Bad Disk Persistent DSFs page 129 or Step 7 Replacing a Bad Disk Legacy DSFs page 138 Message Text Error Could not find any free minor number for volume group version 2 x Cause vgversion could not find a free minor number to create the group file for the volume group because all the minor numbers in the supported range for Version 2 x ...

Page 173: ...ogical volumes for a volume group version If the logical volume number of the logical volume is not in this range for the target Version 2 x volume group vgversion fails the migration Recommended Action 1 Use lvmadm to determine the maximum supported number of logical volumes for the target volume group version 2 For each logical volume device file in the dev vgname directory determine the logical...

Page 174: ...nts of the logical volume are contiguous see pvmove 1M 3 Change the allocation policy back to contiguous see lvchange 1M Message Text LVM VG mm 0xnn0000 Data in one or more logical volumes on PV nn 0x0nn000 was lost when the disk was replaced This occurred because the disk contained the only copy of the data Prior to using these logical volumes restore the data from backup Cause LVM cannot synchro...

Page 175: ...arked as inoperative 2 Beginning with the HP UX 1 1i v3 September 2010 Update you can enable LVM to automatically increase the number of pre allocated extents when the threshold is reached If this feature is enabled this message will be logged every time LVM tries to increase pre allocated extents Recommended Action 1 Increase the number of pre allocated extents for the space efficient snapshot us...

Page 176: ...21 occurring only in the HP UX 1 1i v3 September 2010 Update This message can be ignored Recommended Action None Message Text LVM Deletion of snapshot LV device major nnn minor Oxnnnnnn failed since there are pending I Os on the successor LV device major nnn minor Oxnnnnnn waiting for one or more offline PVs to come back online Please make the PVs available and retry Or LVM Deletion of snapshot LV...

Page 177: ...roring logical volumes using HP MirrorDisk UX you can spread the mirrored copies over different I O channels to increase system and data availability Legacy Device Special Files DSFs Legacy DSFs are used in releases prior to HP UX 1 1i v3 and also supported on HP UX 1 1i v3 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 ...

Page 178: ...figured LVM disks that were present when the volume group was last active To make a configuration change the quorum requirement is at least half If there is no quorum LVM prevents the operation Quorum is checked both during configuration changes for example when creating a logical volume and at state changes for example if a disk fails Quorum ensures the consistency and integrity of the volume gro...

Page 179: ...169 creating a dump logical volume 102 creating a file system logical volume 97 creating a logical volume 52 creating a mirror of the boot disk 90 creating a mirrored logical volume 53 creating a physical volume 43 creating a spare disk 76 creating a striped logical volume 52 creating a swap logical volume 102 creating a volume group 12 44 creating an alternate boot disk 88 D database partitions s...

Page 180: ...nts 10 Logical Interface Format see LIF volume logical volumes 23 101 see also boot logical volume see also dump logical volume see also root logical volume see also swap logical volume commands for 40 configuration information 71 creating 52 creating on a specific disk 54 defined 9 determining who is using 55 57 68 99 100 131 device file 14 15 52 56 displaying information 42 extending 53 extendin...

Page 181: ...verable errors 109 logical to physical extent mapping 10 maintenance mode 109 merging 68 152 Mirror Write Cache 29 mirroring the boot disk 90 mirroring the boot disk HP 9000 servers 90 HP Integrity servers 92 modifying mirror copies 53 physical volume groups 30 33 primary swap logical volume 90 quiescing a logical volume 66 reinstating a spare disk 77 removing a mirror 56 152 replacing a boot disk...

Page 182: ... enabling 68 error messages 1 1 1 overriding 67 1 1 1 1 12 178 overriding at boot 91 93 1 12 135 138 requirements for booting 1 15 R raw data logical volume stripe size for 32 reducing a logical volume 55 reducing the size of a file system logical volume 99 reinstating a spare disk 77 remote support 145 removing a dump logical volume 103 removing a logical volume 57 removing a mirror copy from a d...

Page 183: ...n 2 x volume groups 12 16 22 23 27 40 44 45 76 77 84 88 90 101 102 108 1 12 167 169 vgcdsf command 39 153 vgcfgbackup command 35 39 66 69 153 backup location 70 errors 164 166 vgcfgrestore command 39 70 107 153 backup location 70 checking if physical volume is bootable 85 errors 166 recovering corrupted LVM data 1 15 restating a spare disk 77 vgchange command 39 90 153 activating a volume group 58...

Page 184: ...errors 172 volume group configuration backing up 69 location 70 restoring 70 volume group identifier see VGID volume group migration to new disks 95 Volume Group Reserved Area see VGRA volume group versions 46 Version 1 0 1 1 16 44 147 Version 2 0 12 147 Version 2 1 12 147 Version 2 x 12 16 22 23 27 40 44 45 76 77 84 88 90 101 102 108 1 12 167 169 volume groups activation failures 1 1 1 1 14 comma...

Reviews: