Previous  |  Next  >  
Product: Volume Manager Guides   
Manual: Volume Manager 4.1 Migration Manager   

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.


Note   Note    The following features in VxVM require an additional license: Mirroring, Mirroring and Striping, Dynamic Multipathing of Active/Active Devices, Hot-relocation, Online Migration, and RAID-5.

All the VxVM tasks listed in the task comparison chart can be performed by the VERITAS Volume Manager Storage Administrator. For more information, refer to the VERITAS Volume Manager Storage Administrator Administrator's Guide.

For more information on LVM commands, refer to HP-UX Managing Systems and Workgroups, and LVM manual pages in the Reference Volumes 2, 3, and 5. For information on VxVM commands, refer to the VERITAS Volume Manager documentation package (see the Preface).


Note   Note    Mirroring of a VxVM root disk is supported in this release.

Mirroring in LVM is supported only if you have MirrorDisk/UX already installed as an add-on product. In addition, mirroring in VxVM requires an additional license.

LVM 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.

LVM

Create a volume group

vgcreate /dev/vol_grp /dev/dsk/disk_name

VxVM

Create a disk group.

vxdg init disk_group disk_name

Option 1 in the vxdiskadm menu performs this task.

LVM

Add a new disk to the existing volume group.

vgextend /dev/vol_grp /dev/rdsk/disk_name

VxVM

Add a disk to an existing disk group.

vxdg -g disk_group adddisk disk=devicename

LVM

Extend a logical volume or increase space allocated to a logical volume.

lvextend -l 50 /dev/vol_grp/lvol_name

l---indicates the number of logical extents in the logical volume

VxVM

Increase the volume by or to a given length.

vxresize  -g disk_group -F vxfs vol_name length

vxassist growto vol_name new_length

vxassist growby vol_name length_change

Grow the file system after growing the volumes.

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.

vgimport -v /dev/vol_grp/dev/dsk/disk_name

vgchange -a y /dev/vol_grp

VxVM

Import a disk group to make the specified disk group accessible on the local machine.

vxdg -tfC -n newname import disk_group

Option 8 in the vxdiskadm menu performs this task.

LVM

Export and deactivate an LVM volume group, and its associated logical volumes.

vgchange -a n vol_group

vgexport /dev/vol_group

VxVM

Deport a disk group to disable access to the specified disk group. A disk group cannot be deported if any volumes in the disk group are currently open.

vxdg deport disk_group

Option 9 in the vxdiskadm menu performs this task.

LVM

Back up volume group configuration information.

vgcfgbackup -f /pathname/filename vol_grp

VxVM

Back up volume group configuration information.

dgcfgbackup -f /pathname/filename vol_grp

LVM

Restore volume group configuration to a particular physical volume.

vgrestore -n /dev/vol_grp /dev/rdsk/disk_name

VxVM

Restore volume group configuration to a particular physical volume.

dgcfgrestore -n /dev/vol_grp /dev/rdsk/disk_name

LVM

Increase or decrease secondary swap space.

Enlarge an existing swap logical volume, or add a new swap logical volume.

lvextend---to increase swap space

lvreduce---to decrease swap space

VxVM

Add a new swap volume (HP-UX 11i Version 1.5 only).

vxassist make swapvol2 size (HP-UX 11i Version 1.5 only)

LVM

Remove a volume group.

This destroys a volume group by removing its last disk and removing it from /etc/lvmtab.

vgremove /dev/vol_grp

This is preceded by lvremove and vgreduce down to the last disk.

VxVM

Destroy a disk group.

vxdg deport disk_group

vxdg init disk_group

LVM

Extend a volume group by adding LVM disks to the volume group.

vgextend /dev/vol_grp/\ /dev/dsk/disk_name

VxVM

Add one or more disks to the disk group.

vxdiskadd disk_name

Option 1 in the vxdiskadm main menu performs this task.

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. lvextend -m no_of_mirrors \ /dev/vol_grp/lvol_name \ /dev/dsk/second_disk

VxVM

Mirroring a disk

To mirror volumes on a disk or control default mirroring and causes a disk to have its contents mirrored to available space on another disk.

vxmirror -g disk_group -d yes|no \ disk_name [new_disk_name]

vxmirror -d yes disk_name

Option 6 in the vxdiskadm menu performs this task.

LVM

Mirroring an LVM root disk involves several steps.

  1. pvcreate -B /dev/rdsk/second_disk
  2. mkboot -l /dev/dsk/second_disk
  3. vgextend /dev/vol_grp \ /dev/dsk/second_disk
  4. lvextend -m no_of_mirrors \ /dev/vol_grp/root_lvol \ /dev/dsk/second_disk
  5. lvlnboot -r /dev/vol_grp/lvol_name

VxVM

Mirroring the VxVM root disk.

vxrootmir [-v] [-t tasktagdisk_access_name | disk_media_name

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

A RAID-5 volume

vxassist make vol_name length

vxassist make vol_name length layout=mirror, stripe

vxassist make vol_name length layout=raid5

LVM

Display information about logical volumes.

lvdisplay /dev/vol_grp/lvol_name

VxVM

Display all volume information.

Display information about a specific volume.

vxprint -vt 

vxprint -ht vol_name

LVM

Display information about volume groups.

vgdisplay -v /dev/vol_grp

VxVM

Display disk group information.

Display information about a specific disk group.

vxdisk list 

vxprint -g disk_group

vxdg list

vxdisk list disk_group

LVM

Display information about physical volumes.

pvdisplay /dev/dsk/disk_name

VxVM

Display information about Volume Manager volumes.

vxinfo or vxprint

LVM

Remove a logical volume.

lvremove /dev/vol_grp/lvol_name

VxVM

Remove a volume.

vxedit rm vol_name

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.

Before attempting to remove the volume group, you must remove the logical volumes using lvremove, and all physical volumes except the last one using vgreduce.

vgremove /dev/vol_grp

VxVM

Deport a disk group. You must unmount and stop any volumes in the disk group first.

vxdg deport disk_group

LVM

Set up alternate links to a physical volume.

If a disk has two controllers, you can make one primary and the other an alternate link.

vgcreate /dev/vol_grp/dev/dsk/disk_name /dev/dsk/disk_name_2

To remove the link:

vgreduce /dev/vol_grp /dev/dsk/disk_name

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. It is not required to set up links separately.

Refer to the manual page vxdmp (7) and the VERITASs Volume Manager Administrator's Guide for more information on DMP.

LVM

Create a mirrored logical volume.

lvcreate -l num_log_extents -m 1 -n mirr_lv /dev/vol_grp

VxVM

Create a mirrored volume/plex
or add a mirror to an existing volume.

vxassist make vol_name length layout=mirror

LVM

Reduce a single/double mirrored logical volume to an unmirrored logical volume.

Remove a mirrored logical volume.

lvreduce -m 0 /dev/vol_grp/mirr_lv

lvremove /dev/vol_grp/mirr_lv

VxVM

Remove mirrors or reduce the number of plexes/mirrors.

Remove a volume with the plexes associated with it.

vxplex -o rm dis plex_name

vxedit -rf rm vol_name

LVM

Increase the number of mirror copies.

lvextend -m 2 /dev/vol_grp/lvol_name

VxVM

Add mirrors to a volume or increase the number of plexes.

vxassist mirror vol_name

LVM

Convert a mirrored logical volume into two logical volumes.

Split a logical volume.

lvsplit -s backup /dev/vol_grp/lvol_name

VxVM

Snapshot a volume and create a new volume.

vxassist snapshot vol_name new_vol_name

LVM

Combine two logical volumes back into a mirrored logical volume

lvmerge /dev/vol_grp/split_vol_name/dev/vol_grp/lvol_name 

split_vol_name= active logical volume

VxVM

Returns the snapshot plex to the original volume from which it was snapped.

vxassist snapback new_vol_name

LVM

Move a mirrored logical volume from one disk to another.

pvmove -n /dev/vol_grp/lvol_name\ /dev/dsk/disk_name /dev/dsk/disk_name2

VxVM

Move a plex.

vxplex mv orig_plex new_plex

LVM

Synchronize a mirrored logical volume.

Synchronize extents within a mirrored logical volume.

lvsync /dev/vol_grp/lvol_name

VxVM

Resynchronize operations for the given volumes.

vxvol resync

LVM

Synchronize extents within mirrored logical volumes in a volume group.

vgsync /dev/vol_grp

VxVM

Resynchronize operations for the named volumes, or for volumes residing on the named disks.

If no medianame or volume operands are specified, then the operation applies to all volumes.

vxrecover -s vol_name

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.

lvchange -a n /dev/vol_grp/lvol_name

VxVM

Stop a volume.

vxvol stop vol_name

LVM

Make a disk available as a hot spare.

pvchange -z y /dev/dsk/disk_name

VxVM

Make a disk available as a hot spare.

vxedit set spare=on disk_name


Example for a disk_group = veritasdg, medianame = disk01, vol_name -= veritasvol, plex name = veritasvol-01, subdisk -= disk01-01, devicename = c0t0d0.


 ^ Return to Top Previous  |  Next  >  
Product: Volume Manager Guides  
Manual: Volume Manager 4.1 Migration Manager  
VERITAS Software Corporation
www.veritas.com