Removing A Volume Group; Backing Up A Mirrored Logical Volume - HP -UX 11i Administrator's Manual

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

Advertisement

# vgreduce -f vgold
# vgreduce -f vgnew
1 1. Enable quorum checks for the old volume group as follows:
# vgchange -a y -q y /dev/vgold
On completion, the original volume group contains three logical volumes (lvol1, lvol2, and
lvol3) with physical volumes /dev/disk/disk0 and /dev/disk/disk1. The new volume
group vgnew contains three logical volumes (lvol4, lvol5, and lvol6) across physical volumes
/dev/disk/disk2, /dev/disk/disk3, /dev/disk/disk4, and /dev/disk/disk5.

Removing a Volume Group

TIP:
It is easier to export a volume group than to remove it, because removing the volume group
requires that you remove all the logical volumes and physical volumes from the volume group
before running vgremove. In addition, exporting the volume group leaves the LVM information
on the disks untouched, which is an advantage if you want to reimport the volume group later. For
the procedure to export a volume group, see
To remove a volume group, follow these steps:
1.
Back up all user data.
2.
Find the names of all logical volumes and physical volumes in the volume group. Enter the
following command:
# vgdisplay -v /dev/vgnn
3.
Make sure that none 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
5.
Remove all but one of the physical volumes as follows:
# vgreduce /dev/vgnn /dev/disk/diskn
For more information, see
6.
Use the vgremove command to remove the volume group as follows:
# vgremove vgnn

Backing Up a Mirrored Logical Volume

NOTE:
Mirroring requires the optional product HP MirrorDisk/UX.
You can split a mirrored logical volume into two logical volumes to perform a backup on an offline
copy while the other copy stays online. When you complete the backup of the offline copy, you
can merge the two logical volumes back into one. To bring the two copies back in synchronization,
LVM updates the physical extents in the offline copy based on changes made to the copy that
remained in use.
You can use HP SMH to split and merge logical volumes, or use the lvsplit and lvmerge
commands.
To back up a mirrored logical volume containing a file system, using lvsplit and lvmerge,
follow these steps:
68
Administering LVM
"Exporting a Volume Group" (page
"Removing a Logical Volume" (page
"Removing a Disk from a Volume Group" (page
57).
57).
51).

Advertisement

Table of Contents
loading

Table of Contents