VERITAS Volume Manager 3.1 Migration Guide for HP-UX 11i and HP-UX 11i Version 1.5 June, 2001 Manufacturing Part Number: B7961-90017 E0601 United States © Copyright 1983-2000 Hewlett-Packard Company. All rights reserved.
Legal Notices The information in this document is subject to change without notice. Hewlett-Packard makes no warranty of any kind with regard to this manual, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard shall not be held liable for errors contained herein or direct, indirect, special, incidental or consequential damages in connection with the furnishing, performance, or use of this material.
Copyright 1979, 1980, 1983, 1985-93 Regents of the University of California. This software is based in part on the Fourth Berkeley Software Distribution under license from the Regents of the University of California. Copyright 2000 VERITAS Software Corporation Copyright 1988 Carnegie Mellon University Copyright 1990-1995 Cornell University Copyright 1986 Digital Equipment Corporation. Copyright 1997 Isogon Corporation Copyright 1985, 1986, 1988 Massachusetts Institute of Technology.
Publication History The manual publication date and part number indicate its current edition. The publication date will change when a new edition is released. The manual part number will change when extensive changes are made. To ensure that you receive the new editions, you should subscribe to the appropriate product support service. See your HP sales representative for details.
Contents 1. VxVM and LVM Introducing the VERITAS Volume Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Notable Features of VxVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VxVM and LVM—Conceptual Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coexistence of VxVM and LVM Disks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 14 18 22 2.
Contents Listing Logical Volumes in SAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 A.
Preface This Guide describes how to migrate from HP-UX Logical Volume Manager (LVM) to VERITAS Volume Manager (VxVM) and convert disks and volumes managed by LVM to VxVM. It includes information on differences between VxVM and LVM commands and terminology. This Guide also discusses the use of both graphical user interfaces: Storage Administrator, the Volume Manager GUI, and SAM (System Administration Manager), the Logical Volume Manager GUI.
Audience This introductory guide is intended for system administrators responsible for configuring and maintaining systems using HP-UX Logical Volume Manager.
Scope The purpose of this Guide is to provide system administrators with information on how to convert from the HP-UX Logical Volume Manager to the VERITAS Volume Manager.
Organization This guide is organized as follows: • Chapter 1, VxVM and LVM, compares the VERITAS Volume Manager to the HP Logical Volume Manager conceptually. • Chapter 2, Converting LVM to VxVM, describes the procedures for identifying and converting an LVM configuration to a VxVM configuration. • Chapter 3, Command Differences, describes the differences between LVM and VxVM commands. It also lists LVM tasks and equivalent or similar VxVM tasks.
Related Documents The following documents provide related information: • VERITAS Volume Manager 3.1 Administrator’s Guide • VERITAS Volume Manager 3.1 Reference Guide • VERITAS Volume Manager 3.1 Storage Administrator Administrator’s Guide • VERITAS Volume Manager 3.
Conventions We use the following typographical conventions. audit (5) An HP-UX manpage. audit is the name and 5 is the section in the HP-UX Reference. On the web and on the Instant Information CD, it may be a hot link to the manpage itself. From the HP-UX command line, you can enter “man audit” or “man 5 audit” to view the manpage. See man (1). Book Title The title of a book. On the web and on the Instant Information CD, it may be a hot link to the book itself. KeyCap The name of a keyboard key.
VxVM and LVM 1 VxVM and LVM This chapter provides an overview of the VERITAS Volume Manager (also referred to as VxVM) and its features. A brief description of the benefits of migrating from the HP-UX Logical Volume Manager (LVM) to VxVM, and the coexistence of VxVM disks with LVM disks is also given.
VxVM and LVM Introducing the VERITAS Volume Manager Introducing the VERITAS Volume Manager The VERITAS Volume Manager is an alternative Volume Management product for HP-UX that includes mirroring features. It offers many capabilities that are not available with the LVM and MirrorDisk/UX products today. • The VERITAS Volume Manager can coexist with LVM. Users can decide which volumes they want managed by each volume manager.
VxVM and LVM Introducing the VERITAS Volume Manager Manager documents (listed under “Related Documents” in the “Preface”) for more details about using these features. VERITAS Volume Manager includes the following features: • Concatenation, the combining of discontiguous disk regions into virtual devices. • Spanning, concatenation across different physical media. • Striping, distribution of storage mappings for a virtual device so that multi-threaded accesses tend to cause even use of all physical media.
VxVM and LVM Introducing the VERITAS Volume Manager paths such as xp256, EMC Symmetrix disk array, and other OEM array devices. • Multiple mirroring with up to 32 mirror copies of a volume’s address space. • Mirrored stripes (RAID-0 + RAID-1) and striped mirrors (RAID-1 + RAID-0). VxVM supports the combination of mirroring and striping.
VxVM and LVM Introducing the VERITAS Volume Manager remains available during the relayout. • Improved RAID-5 subdisk, using layered volume technology where the RAID-5 subdisk move operation leaves the old subdisk in place while the new one is being synchronized, thus maintaining redundancy and resiliency to failures during the move. NOTE For more information on LVM, refer to the HP-UX document, Managing Systems and Workgroups, and LVM manual pages in HP-UX Reference Volumes 2, 3, and 5.
VxVM and LVM VxVM and LVM—Conceptual Comparison VxVM and LVM—Conceptual Comparison The following section compares the terminology used in LVM and VxVM at a conceptual level. For more information, refer to the glossary of this Guide for precise and detailed definitions of these terms. Table 1-1A Conceptual comparison of LVM and VxVM LVM Term VxVM Term LVM VxVM Both LVM and VxVM enable online disk storage management. They both build virtual devices, called volumes, on physical disks.
VxVM and LVM VxVM and LVM—Conceptual Comparison Table 1-1A Conceptual comparison of LVM and VxVM LVM Term VxVM Term An LVM logical volume and a VxVM volume are conceptually the same. Both are virtual disk devices that appear to applications, databases, and file systems like physical disk devices, but do not have the physical limitations of physical disk devices. Due to its virtual nature, a volume (LVM or VxVM) is not restricted to a particular disk or a specific area of a disk.
VxVM and LVM VxVM and LVM—Conceptual Comparison Table 1-1A Conceptual comparison of LVM and VxVM LVM Term VxVM Term User data is contained in physical extents in LVM and subdisks in VxVM. The LVM physical extents are of a fixed length. LVM allocates space in terms of physical extents which is a set of physical disk blocks on a physical volume. The extent size for all physical volumes within a volume group must be the same, and is usually 4 MB.
VxVM and LVM VxVM and LVM—Conceptual Comparison Table 1-1A Conceptual comparison of LVM and VxVM LVM Term VxVM Term In LVM, exporting removes volume group information from /etc/lvmtab. The volume group must have already been deactivated. Similarly in VxVM, deport makes a disk group inaccessible by the system. Import Import In LVM, import adds a volume group to the system and the volume group information to /etc/lvmtab but does not make the volumes accessible.
VxVM and LVM Coexistence of VxVM and LVM Disks Coexistence of VxVM and LVM Disks Both LVM disks and VxVM disks can exist together on a system. The LVM disks are detected and displayed as such by VxVM. LVM disks are not selected by VxVM for initialization, addition, or replacement. Both LVM and VxVM utilities are aware of the other volume manager, and will not overwrite disks that are being managed by the other volume manager.
Converting LVM to VxVM 2 Converting LVM to VxVM This chapter explains how to convert your LVM configuration to a VxVM configuration and presents the following main topics: • “Converting Unused LVM Physical Volumes to VxVM Disks” • “Converting LVM Volume Groups to VxVM Disk Groups” • “Restoring the LVM Volume Group Configuration” • “Examples” The basic tools for conversion are the VxVM commands, vxvmconvert and vxdiskadm, and the LVM administrative utilities such as pvremove and vgcfgbackup.
Converting LVM to VxVM Converting Unused LVM Physical Volumes to VxVM Disks Converting Unused LVM Physical Volumes to VxVM Disks LVM disks which are not part of any volume group, and contain no user data, are simply cleaned up, so that there are no LVM disk headers. Then the disks are given over to VxVM through the normal means of initializing disks. CAUTION Exercise caution while using this procedure to give disks over to VxVM.
Converting LVM to VxVM Converting Unused LVM Physical Volumes to VxVM Disks lvmtab and the LVM headers indicate it is not a member of any volume group. (That is, it has been pvcreated but not been an argument for vgcreate or vgextend.) After running pvcreate, then use pvremove to erase all vestiges of LVM disk headers.
Converting LVM to VxVM Converting LVM Volume Groups to VxVM Disk Groups Converting LVM Volume Groups to VxVM Disk Groups This section outlines the process for converting LVM volume groups to VxVM disk groups. NOTE It is recommended that you read through this section carefully before beginning any volume group conversion. The conversion process involves many steps. Though there are tools to help you with the conversion, some of these steps cannot be automated.
Converting LVM to VxVM Converting LVM Volume Groups to VxVM Disk Groups Volume Group Conversion Limitations There are certain LVM volume configurations that cannot be converted to VxVM. Some of the reasons a conversion could fail are: • A volume group with insufficient space for metadata. In the conversion of LVM to VxVM, the areas of the disks used to store LVM metadata are overwritten with VxVM metadata.
Converting LVM to VxVM Converting LVM Volume Groups to VxVM Disk Groups primary swap volumes. These are volumes known to the boot process. However, swap volumes on volumes other than the root volume can be converted (as long as this volume is not in the same volume group as the root volume). • Volume group disks used in MC/ServiceGuard clusters. The conversion process does not support conversion of any volume group that is marked as a member of a MC/ServiceGuard or OPS Edition high availability cluster.
Converting LVM to VxVM Converting LVM Volume Groups to VxVM Disk Groups there are problems during conversion. Some of them (e.g. backing up user data) are left to you to accomplish through your regular administrative processes. The steps in the conversion process are: Step 1. Identifying LVM volume groups for conversion. Step 2. Analyzing an LVM group to see if conversion is possible. Step 3. Taking actions to make conversion possible if analysis fails. Step 4.
Converting LVM to VxVM Converting LVM Volume Groups to VxVM Disk Groups You can also list the LVM disks with the following VxVM command: # vxdisk list 2. Analyzing an LVM volume group to see if conversion is possible After you have selected a volume group for conversion, you need to analyze it to determine if conversion for VxVM use is possible. Use the analyze option of vxvmconvert to check for problems that would prevent the conversion from completing successfully.
Converting LVM to VxVM Converting LVM Volume Groups to VxVM Disk Groups 3. Taking actions to make conversion possible if analysis fails Analysis may fail for any of the reasons listed in the section “Volume Group Conversion Limitations””. Messages from vxvmconvert will explain the type of failure and any actions that can be taken before retrying the analysis. Refer to Appendix A, Conversion Error Messages, for complete details of specific error messages and actions. 4.
Converting LVM to VxVM Converting LVM Volume Groups to VxVM Disk Groups NOTE The vxvmconvert utility itself also saves a snapshot of the LVM metadata in the process of conversion for each disk. This data is saved in a different format from that of vgcfgbackup. It can only be used via the vxvmconvert program. With certain limitations, you can reinstate the LVM volumes after they have been converted to VxVM using this data. (See section “Example: displaying the vxvmconvert menu”.
Converting LVM to VxVM Converting LVM Volume Groups to VxVM Disk Groups the volume group. VxVM creates its device nodes in /dev/vx/dsk and /dev/vx/rdsk. When conversion is complete, the old LVM device nodes are gone from the system, and the system will access data on the device nodes in /dev/vx. This change in names can present problems. Any application that refers to specific device node names will be at risk when these names change.
Converting LVM to VxVM Converting LVM Volume Groups to VxVM Disk Groups changed in any way, the database could refer to a missing or different volume. You may want to use this symbolic link approach to ease the transition to VxVM. You can set up the symbolic links after the successful conversion to VxVM. Then, you can do the investigation on a case by case basis for each volume. Once you are satisfied that there are no problems introduced by the name change, the symbolic link to that volume can be removed.
Converting LVM to VxVM Converting LVM Volume Groups to VxVM Disk Groups vxvmconvert. To unmount a file system, use the following command: # umount filesystem Conversion and Reboot During conversion, after the analysis phase is complete, the disks to be converted are deemed to be conversion ready. The vxvmconvert program asks if you are ready to commit to the conversion changes.
Converting LVM to VxVM Converting LVM Volume Groups to VxVM Disk Groups the only object naming that is done through vxvmconvert. For details on modifying VxVM volume names, see “step “11. Tailoring your VxVM configuration”. As described earlier in “step “2. Analyzing an LVM volume group to see if conversion is possible”,” on page 12, the volume groups selected for conversion are analyzed to ensure that conversion is possible.
Converting LVM to VxVM Converting LVM Volume Groups to VxVM Disk Groups 11. Tailoring your VxVM configuration vxvmconvert provides a default name for naming the newly formed VxVM disk group during conversion only as an option. However, you will be given the choice of choosing your own VxVM disk group name. By default, vxvmconvert renames the LVM volume group by replacing the prefix vg in the volume group name with the prefix dg. For example, vg08 would become dg08.
Converting LVM to VxVM Restoring the LVM Volume Group Configuration Restoring the LVM Volume Group Configuration In some circumstances, you may need to restore the LVM configuration that existed before you converted to VxVM with vxvmconvert. For example: • If something went wrong during the conversion, such as a system crash or a disk crash that caused the conversion to be unworkable.
Converting LVM to VxVM Restoring the LVM Volume Group Configuration NOTE The name changes that vxvmconvert makes as part of the conversion are managed by rollback, and do not count as VxVM configuration changes for the purposes of choosing a restoration method. NOTE vgrestore (1M) should not be confused with the LVM command, vgcfgrestore (1M). vgcfgrestore is used to restore the LVM configuration information saved by vgcfgbackup (1M), but it will not restore your device files and /etc/fstab entries.
Converting LVM to VxVM Restoring the LVM Volume Group Configuration To rollback to LVM from the VxVM conversion, run vxvmconvert and choose option 3. See “Example: VxVM to LVM rollback” for illustration. CAUTION Do not use this option unless you are certain that you want to restore LVM volume groups. Once this is run, the VxVM disks that were created as a result of the original conversion from LVM to VxVM no longer exists. This option is not a full complement to vxvmconvert.
Converting LVM to VxVM Restoring the LVM Volume Group Configuration Step 1. Use vgrestore to restore LVM internal data. # vgrestore vol_grp_name Step 2. Use the recovery method to restore user or application data. In preparation for conversion, the recovery method should have been done with the standard backups you made in preparation for conversion. The following example shows an frecover from the fbackup example in “step “4. Backing up your LVM configuration and user data”.
Converting LVM to VxVM Examples Examples Example: displaying the vxvmconvert menu To display the vxvmconvert menu, use the following command: # vxvmconvert The following menu is displayed: Volume Manager Support Operations Menu: Volume Manager/LVM_Conversion 1Analyze LVM Volume Groups for Conversion 2Convert LVM Volume Groups to VxVM 3Roll back from VxVM to LVM list List disk information listvg List LVM Volume Group information ?Display help about menu ??Display help about the menuing system qExit from men
Converting LVM to VxVM Examples none) none Example: listing LVM volume group information To list LVM volume group information, use the listvg option of vxvmconvert. Select the listvg option from the vxvmconvert Main Menu: Menu: Volume Manager/LVM_Conversion/ListLVMVolumeGroups # listvg Use this menu option to display a list of LVM volume groups. You can also choose to list detailed information about the LVM volume groups at a specific disk device address.
Converting LVM to VxVM Examples VGDA 2 PE Size (Mbytes) 4 Total PE 250 Alloc PE 250 Free PE 0 Total PVG 0 --- Logical volumes --LV Name /dev/vg08/lvol1 LV Status available/syncd LV Size (Mbytes) 500 Allocated PE 125 Used PV 1 --- Physical Extent --LV Name /dev/vg08/lvol2 LV Status available/syncd LV Size (Mbytes) 500 Current LE 125 Allocated PE 125 Used PV 1 --- Physical volumes --PV Name /dev/dsk/c0t8d0 PV Status available Total PE 250 Free PE 0 List another LVM Volume Group? [y,n,q,?] (default: n) Select
Converting LVM to VxVM Examples listList disk information listvgList LVM Volume Group information ?Display help about menu ??Display help about the menuing system qExit from menus Select an operation to perform: 1 Analyze one or more LVM Volume Groups Menu: Volume Manager/LVM_Conversion/Analyze_LVM_VGs Use this operation to analyze one or more LVM volume groups for possible conversion using the VxVM Volume Manager.
Converting LVM to VxVM Examples c8t8d0 To allow analysis, a new VxVM disk group, dg08, will be fabricated and the disk device c4t8d0 will be added to the disk group with the disk name dg0801. The c4t8d0 disk has been configured for conversion. The first stage of the Analysis process has completed successfully.
Converting LVM to VxVM Examples possible conversion using the VxVM Volume Manager. This operation checks for problems that would prevent the conversion from completing successfully. It calculates the space required to add the volume groups disks to a Volume Manager disk group, and to replace any existing partitions and volumes with Volume Manager volumes, plexes, and sub-disks. More than one volume group or pattern may be entered at the prompt.
Converting LVM to VxVM Examples RECORDS neededs to convert = 399 MAXIMUM records allowable= 392 The smallest disk in the Volume Group (vg08) does not have sufficient private space for the conversion to succeed. There is only enough private space for 392 VM Database records and the conversion of Volume Group (vg08) would require enough space to allow 399 VxVM Database records. This would roughly translate to needing an additional 896 bytes available in the private space.
Converting LVM to VxVM Examples Select an operation to perform: 2 Convert one or more LVM Volume Groups Menu: VolumeManager/LVM_Conversion/Convert_LVM_VGs Use this operation to convert one or more LVM Volume Groups to one or more VxVM disk groups. This adds the disks to a disk group and replaces existing partitions with volumes. LVM-VxVM Volume Group conversion may require a reboot for the changes to take effect. For this release, only Non-root LVM Volume Groups are allowed to be converted.
Converting LVM to VxVM Examples c4t8d0 will be converted and added to the disk group with the disk name dg0801. The c4t8d0 disk has been configured for conversion. The first stage of the conversion operation has completed successfully. If you commit to the changes hereafter, the system will attempt to umount all of the associated file systems, stop and export each Volume Group, and then attempt to complete the conversion without having to reboot the system.
Converting LVM to VxVM Examples still in use, which may prevent the completion of the conversion without having to robot the system. You may want to double check that none of the volumes in the volume group are in use before continuing with the conversion. Hit RETURN to continue. Are you ready to commit to these changes? [y,n,q,?] (default: y) Saving LVM configuration records for Volume Group vg08 Volume Group configuration for /dev/vg08 has been saved in /etc/vx/reconfig.d/vgrecords/vg08/vg08.
Converting LVM to VxVM Examples Example of a failed conversion # vxvmconvert Volume Manager Support Operations Menu: VolumeManager/LVM_Conversion 1Analyze LVM Volume Groups for Conversion 2Convert LVM Volume Groups to VxVM 3Roll back from VxVM to LVM listList disk information listvgList LVM Volume Group information ?Display help about menu ??Display help about the menuing system qExit from menus Select an operation to perform: 2 Convert one or more LVM Volume Groups Menu: VolumeManager/LVM_Conversion/Conve
Converting LVM to VxVM Examples vg05 Non-Root c4t5d0 vg03 Non-Root c4t3d0 c4t2d0 vg08 Non-Root c4t8d0 Select Volume Groups to convert : [,all,list,listvg,q,?] vg08 vg08 Convert this Volume Group? [y,n,q,?] (default: y) Name a new disk group [,list,q,?] (default: dg08) The following disk has been found in the vg08 volume group and will be configured for conversion to a VxVM disk group.
Converting LVM to VxVM Examples device. You will need to update any other references such as backup scripts, databases, or manually created swap devices. If you do not like the default names chosen for the corresponding logical volumes, you may change these to whatever you like using vxedit.
Converting LVM to VxVM Examples Example: list, listvg, and vxprint outputs of an LVM volume group before and after conversion The examples given below, shows the vxvmconvert listvg, list, and vxprint output for an LVM volume group vg08 converted to a VxVM disk group dg08.
Converting LVM to VxVM Examples dm disk01 - c0t10d0 - 2079468 - - list, listvg outputs are from within the vxvmconvert command. vxprint is a command line command. Example of the listvg output after conversion of vg08: LVM VOLUME GROUP INFORMATION Name Type Physical Volumes vg00 ROOT c0t5d0 vg09 Non-Rootc0t9d0 Volume Group to list in detail: None NOTE Note that vg08 is no longer listed under LVM information.
Converting LVM to VxVM Examples dg08lv1. The VxVM disk dg0801 is associated with disk device c0t8d0 and is 2080768 blocks in length. The volume dg08lv1 is of type fsgen, is enabled in the VxVM kernel driver, is of length 102400, and is in the ACTIVE state. This means that the volume is started, and the plex is enabled. Operations to the volume such as recovery and data access will be governed by the usage type fsgen.
Converting LVM to VxVM General Information Regarding Conversion Speed examples: all:Rollback all converted LVM Volume Groups listvg:list all LVM Volume Groups eligible for rollback list:list all disk devices vg_name:a single LVM Volume Group, named vg_name :for example vg08 vg09 vg05 Select Volume Group(s) to rollback : [,all,list,listvg,q,?] vg08 Roll back this Volume Group? [y,n,q,?] (default: y) Rolling back LVM configuration records for Volume Group vg08 Selected Volume Groups hav
Converting LVM to VxVM General Information Regarding Conversion Speed have their LVM metadata copied. However, for the striped volume, 50 disks need to be checked and the LVM metadata for 50 disks must be copied. Also, the complexity of reproducing the VxVM commands to set up the striped volumes requires more VxVM commands to be generated to represent more smaller sub-disks representing the same amount of space. Another factor in converting stripes is that stripes create more work for the converter.
Converting LVM to VxVM General Information Regarding Conversion Speed 60 Chapter 2
Command Differences 3 Command Differences This chapter describes the differences between LVM and VxVM commands, and tasks. It includes a task comparison chart which lists some of the tasks performed using LVM with a near equivalent task performed using VxVM. It also provides a list of VxVM tasks which are not available with LVM, and the LVM features currently not supported in VxVM.
Command Differences LVM and VxVM Command Equivalents LVM and VxVM Command Equivalents The table below lists the LVM commands and a near equivalent command to use in VxVM. For more information, refer to the Task Comparison chart. For information on VxVM commands, refer to the VERITAS Volume Manager documentation package (see the 'Preface' . Table 3-1Command Comparison LVM Description/Action VxVM Description/Action lvchange Changes the characteristics of logical volumes.
Command Differences LVM and VxVM Command Equivalents Table 3-1Command Comparison LVM Description/Action VxVM Description/Action lvextend Increases disk space allocated to a logical volume. vxassist Increases a volume in size with the growto or growby parameter. Example: vxassist growto vol_name 200M, vxassist growby vol_name 100M vxassist creates and modifies volumes. lvreduce Decreases disk space allocated to a logical volume.
Command Differences LVM and VxVM Command Equivalents Table 3-1Command Comparison LVM Description/Action VxVM Description/Action lvsplit Splits a mirrored logical volume into two logical volumes. vxassist snapshot The snapshot operation takes one of the attached temporary mirrors and creates a new volume with the temporary mirror as its one plex. Example: vxassist snapshot vol_name new_volume lvmerge Reverses and converts the lvsplit logical volumes to a single logical volume.
Command Differences LVM and VxVM Command Equivalents Table 3-1Command Comparison LVM Description/Action VxVM Description/Action pvchange Sets physical volume characteristics to allow/deny allocation of additional physical extents from this disk. vxdisk The vxdisk utility performs basic administrative operations on VxVM disks. Operations include initializing and replacing disks, as well as taking care of some book-keeping necessary for the disk model presented by the Volume Manager.
Command Differences LVM and VxVM Command Equivalents Table 3-1Command Comparison LVM Description/Action VxVM Description/Action vgdisplay Displays information on all volume groups. vxdg list Displays the contents of a disk group. vxprint Displays information about all objects or a subset of objects. vgchange Activates or deactivates one or more volume groups. vxdg -g diskgroupset activation= mode Activates a shared disk group. vgextend Extends a volume group by adding one or more disks to it.
Command Differences LVM and VxVM Command Equivalents Table 3-1Command Comparison LVM Description/Action VxVM Description/Action vgremove Removes the definition of a volume group from the system. vxdg deport Deports a disk group from the system. Removes a volume group from the system. vxdg deport Adds a volume group to the system by scanning physical volumes which have been exported using vgexport. vxdg import Imports a disk group. vxdiskadm Option 8 in the vxdiskadm menu imports a disk group.
Command Differences Comparison of LVM and VxVM Tasks Comparison of LVM and VxVM Tasks This section contains a list of tasks which you can perform using LVM, and near equivalent tasks which you can perform using the VERITAS Volume Manager. You can perform the LVM tasks by using SAM or the command line interface. Similarly, you can choose to perform VxVM tasks by using the VERITAS Volume Manager Storage Administrator or from the command line interface. This document focuses on the command line interface.
Command Differences Comparison of LVM and VxVM Tasks disk_group = veritasdg, medianame = disk01, vol_name -= veritasvol, plex name = veritasvol-01, subdisk -= disk01-01, devicename = c0t0d0. Table 3-2LVM and VxVM Task Comparison Task Type Description Example LVM Create an LVM disk. pvcreate /dev/rdsk/disk_name VxVM Bring a disk under Volume Manager control. vxdiskadd device_name Option 1 in the vxdiskadm menu adds a disk and initializes it.
Command Differences Comparison of LVM and VxVM Tasks Table 3-2LVM and VxVM Task Comparison Task Type Description Example LVM Reduce a logical volume. lvreduce -L to_size /dev/vol_grp/lvol_name -L indicates the number of megabytes. VxVM Reduce a volume by or to a given length. vxresize -g disk_group -F vxfs vol_name to_length vxassist -b shrinkby vol_name length vxassist -b shrinkto vol_name newlength Shrink the file system before reducing the volume. LVM Import and activate a volume group.
Command Differences Comparison of LVM and VxVM Tasks Table 3-2LVM and VxVM Task Comparison Task Type Description Example VxVM Back up volume group configuration information. dgcfgbackup -f /pathname/filename vol_grp LVM Restore volume group configuration to a particular physical volume. vgcfgrestore -n /dev/vol_grp /dev/rdsk/disk_name VxVM Restore volume group configuration to a particular physical volume.
Command Differences Comparison of LVM and VxVM Tasks Table 3-2LVM and VxVM Task Comparison Task Type Description Example LVM Reduce a volume group by reducing the number of disks in a volume group vgreduce /dev/vol_grp /dev/dsk/disk_name VxVM Remove a disk from disk group. vxdg -g disk_group -k rmdisk disk_name LVM Mirroring a disk involves several steps. 1.pvcreate /dev/rdsk/second_disk 2.vgextend /dev/vol_grp\ /dev/dsk/second_disk 3.
Command Differences Comparison of LVM and VxVM Tasks Table 3-2LVM and VxVM Task Comparison Task Type Description Example LVM Create a logical volume in LVM volume group. lvcreate -L vol_size /dev/vol_grp VxVM Create a volume of one of these layout types: A concatenated volume A striped mirror volume vxassist make vol_name length vxassist make vol_name length layout=mirror, stripe A RAID-5 volume vxassist make vol_name length layout=raid5 LVM Display information about logical volumes.
Command Differences Comparison of LVM and VxVM Tasks Table 3-2LVM and VxVM Task Comparison Task Type Description Example LVM Remove disks from a volume group or reduce the number of disks in the volume group. vgreduce /dev/vol_grp /dev/dsk/disk_name VxVM Remove disks from a disk group. vxdisk rm disk_group vxdg rmdisk disk_name vxdg -g group_name rmdisk disk_name LVM Remove an entire volume group.
Command Differences Comparison of LVM and VxVM Tasks Table 3-2LVM and VxVM Task Comparison Task Type Description Example VxVM The Multipathing disk devices in the Volume Manager represent virtual devices with one or more physical access paths to a particular physical disk. Dynamic Multipathing provides reliability of disk access by dynamically switching to another physical path in the event of failure of a path. The DMP feature in VxVM sets up links automatically.
Command Differences Comparison of LVM and VxVM Tasks Table 3-2LVM and VxVM Task Comparison Task Type Description Example LVM Convert a mirrored logical volume into two logical volumes. lvsplit -s backup /dev/vol_grp/lvol_name Split a logical volume. VxVM Snapshot a volume and create a new volume.
Command Differences Comparison of LVM and VxVM Tasks Table 3-2LVM and VxVM Task Comparison Task Type Description Example VxVM Resynchronize operations for the named volumes, or for volumes residing on the named disks. vxrecover -s vol_name If no medianame or volume operands are specified, then the operation applies to all volumes. LVM Start a volume. lvchange -a y /dev/vol_grp/lvol_name VxVM Start a volume. vxrecover -s vol_name vxvol start vol_name LVM Stop a volume.
Command Differences Tasks With No Direct LVM Equivalents Tasks With No Direct LVM Equivalents The following table lists tasks which have no direct LVM equivalent. Most of these tasks can be performed either with the VxVM GUI (Storage Administrator), or the command line interface. For more information, refer to the VERITAS Volume Manager 3.1 Storage Administrator Administrator’s Guide and the VERITAS Volume Manager 3.1 Administrator’s Guide.
Command Differences Tasks With No Direct LVM Equivalents Table 3-3Additional VxVM Tasks with no LVM equivalents Task Description Example Replace a disk. Select menu option 4 of vxdiskadm. Recover volumes on a disk. vxrecover -g disk_group vol_name medianame Display a DMP node. vxdisk list meta_device Rename a disk group. vxdg -tC -n newdg_name Rename a volume. vxedit -v rename name newname Update the /usr/fstab file with the new name. Add a DRL log to a volume.
Command Differences Existing Features in LVM not supported in VxVM Existing Features in LVM not supported in VxVM Some of the existing features in LVM are not supported in the current release of VxVM. Given below is a table with the unsupported LVM features, and possible workarounds in VxVM. Table 3-4LVM features and VxVM equivalents LVM Feature VxVM Equivalent Physical volume groups VxVM has no equivalent feature.
Command Differences Existing Features in LVM not supported in VxVM Table 3-4LVM features and VxVM equivalents LVM Feature VxVM Equivalent Logical Volume Timeout (LVTO). If LVTO on a logical volume is set to zero, which is the default, an I/O is retried forever. VxVM does not support the LVTO feature. However, VxVM supports the powerfail timeout feature to handle transient error conditions. VxVM tries an I/O only on active paths to a disk; hence, it never retries indefinitely.
Command Differences Existing Features in LVM not supported in VxVM 82 Chapter 3
SAM and Storage Administrator 4 SAM and Storage Administrator This chapter describes the VERITAS Volume Manager GUI, the Storage Administrator and its relationship with the LVM GUI, and the System Administration Manager (SAM). This chapter also describes how to launch the Storage Administrator from SAM.
SAM and Storage Administrator Launching Storage Administrator from SAM Launching Storage Administrator from SAM From SAM, there are two ways to launch the Storage Administrator: • Double click on any VxVM object on any SAM screen. • From the Disks and File Systems SAM area, pull down the Actions menu and choose Run VxVM Storage Administrator. See Figure 4-1, “Listing LVM and VxVM Disk Devices with SAM.
SAM and Storage Administrator Listing Disk Devices in SAM Listing Disk Devices in SAM To list disk devices in SAM, from the Disks and File Systems SAM area, select Disk Devices. The Disk Devices screen lists the system’s disk devices. When VxVM is installed on the system, SAM includes a “Use” column to indicate whether a disk is under LVM or VxVM control, or whether it is unused. If a VxVM disk is online and part of a disk group, the disk group name is listed under the “Volume Group” column.
SAM and Storage Administrator Listing Volume Groups and Disk Groups in SAM Listing Volume Groups and Disk Groups in SAM To list volume groups and disk groups in SAM, from the Disks and File Systems SAM area, select Volume Groups. The Volume Groups screen lists the LVM volume groups and the VxVM disk groups on the system. The following figure shows a Volume Groups screen for the same example system.
SAM and Storage Administrator Listing Logical Volumes in SAM Listing Logical Volumes in SAM To list logical volumes in SAM, from the Disks and File Systems SAM area, select Logical Volumes. The Logical Volumes screen lists the LVM logical volumes and the VxVM volumes on the system. The “Type” column indicates whether a volume is controlled by LVM or VxVM. The “Use” column shows whether a volume is in use and if so, what it is used for.
SAM and Storage Administrator Listing Logical Volumes in SAM NOTE VxVM volumes cannot be used as a swap device in this release. For more information on the VERITAS Volume Manager Storage Administrator and VERITAS Volume Manager, refer to the VERITAS Volume Manager documentation package (see the 'Preface').
Conversion Error Messages A Conversion Error Messages This appendix lists the error messages that may be encountered during conversion of LVM volume groups to VxVM disk groups and volumes. It describes what the problem is and how to troubleshoot it. Some of the error messages you may encounter during conversion are: • Message - vxdiskadm or vxvmconvert is already being run. • Message - Too many LVM Volumes to convert in this LVM Volume Group.
Conversion Error Messages If you are certain that no other users are running any of these programs, you can remove the file: /var/spool/locks/.DISKADD.LOCK • Description The system detects that the vxdiskadd or vxvmconvert program is already running. • Action You can retry at a later time. If you are certain that no other users are running any of these programs, you can remove the file DISKADD.LOCK.This allows you to run vxvmconvert. The lock file is present in: /var/spool/locks/.DISKADD.
Conversion Error Messages The conversion process was unable to deactivate the volume group. The conversion cannot proceed without reboots being done. If you choose to not reboot your system, the conversion will be aborted. • Action The system responds with an option to complete the conversion by rebooting the system. Message Analysis shows that there is insufficient private space available to convert this volume group.
Conversion Error Messages • Action The conversion cannot be completed without rebooting the machine. If you cannot afford to reboot, then choose abort and try again later. Message This Volume Group contains one or more logical volumes with mirrored data. Conversion of this Volume Group requires that the VxVM package on your system be enabled for mirroring. This system does not appear to have VxVM mirroring enabled.
Conversion Error Messages Step 1. Back up all the data associated with the physical volume. Step 2. Make a current backup of the LVM headers, for example: vgcfgbackup /dev/vg01 Step 3. Close all the logical volumes associated with the volume group and then deactivate the volume group. Step 4. Create a dummy link to the raw device, for example: ln /dev/rdsk/c0t0d0 /dev/rdsk/temp Step 5. Destroy the LVM headers using pvcreate -f on the dummy link, for example: pvcreate -f /dev/rdsk/temp Step 6.
Conversion Error Messages 94 Appendix A
Glossary block A unit of space for data on a disk, typically having a size of 1024-bytes. Dirty Region Logging Dirty Region Logging (DRL) is an optional property of a volume, used to provide a speedy recovery of mirrored volumes after a system failure. DRL keeps track of the regions that have changed due to I/O writes to a mirrored volume. file system The organization of files on storage devices.
public region A region of a physical disk managed by VxVM that contains available space and is used for allocating subdisks. private region A region of a physical disk used to store private, structured VxVM information. The private region contains a disk header, a table of contents, and a configuration database. The table of contents maps the contents of the disk. physical extent A set of physical disk blocks on a physical volume that forms a basic unit of access in LVM.
Index A alternate links, 74 analyze, 44 B back up volume group, 70 Backup vgcfgbackup, 31 C coexistence VxVM and LVM disks, 22 commands vxedit, 62 configuration LVM, 23 configuration VxVM, 23 conversion errors, 89 speed, 58 vxvmconvert, 26 D deactivate disk group, 70 volume group, 70 deport disk group, 70 destroy disk group, 71 disable mirror, 79 disk designate, 78 disk space, 28 evacuate, 78 offline, 78 online, 78 recoverx09, 78 rename, 78 replace, 78 disk group, 69 rename, 79 disk headers, 25 disks coexis
Index disk group, 70 volume group, 70 increase disk group, 71 swap, 71 J join subdisk, 79 L list LVM, 42 Logical Volume, 18, 19, 20 logical volume convert, 76 split, 76 synchronize, 76 Logical Volume Manager, 13 lvchange, 62 lvcreate, 62 lvextend, 63 lvlnboot, 62 LVM, 13 metadata, 27 LVM names symbolic names, 34 lvmerge, 64 lvreduce, 63 lvremove, 63 lvsplit, 64 lvsync, 64 M manual page, 61 mapping LVM device nodes, 33 VxVM device nodes, 33 messages error, 89 mirror disable, 79 disk group, 72 logical volume,
Index vxvmconvert, 26 tools vxdiskadm, 23 vxvmconvert, 23 troubleshoot errors, 89 VxVM volumes resynchronize, 76 vxvmboot, 62 vxvmconvert, 44 vxvol, 64, 67 V VERITAS Volume Manager, 13 vgchange, 66 vgcreate, 65 vgdisplay, 66 vgexport, 67 vgextend, 66 vgimport, 67 VGRA, 20 vgreduce, 66 vgremove, 67 vgscan, 66 vgsync, 66 volume concatenated, 73 logical, 73 RAID-5, 73 reduce, 70 striped, 73 Volume Manager features, 14 volumes Logical Volume, 18, 19, 20 physical volumes, 18, 19, 20 vxassist, 62, 63, 64 vxdg,