HP-UX HB v13.00 Ch-13 - LVM

HP-UX Handbook Rev 13.00 Page 30 (of 110)
Chapter 13 LVM
October 29, 2013
Modifying a VG
The vgchange command can be used to (de)activate a VG. Certain parameters like
max_pe (see above) cannot be changed without recreating the VG.
In order to rename a VG you have to export and re-import it:
# umount /dev/vg01/lvol1
# umount /dev/vg01/lvol2
...
# vgchange -a n vg01
# vgexport -m /tmp/mapfile vg01
# ll /dev/*/group (choose a unique minor no.)
# mkdir /dev/vgnew
# mknod /dev/vgnew/group c 64 0x010000
# vgimport -m /tmp/mapfile vgnew /dev/dsk/c4t0d0 /dev/dsk/c5t0d0 ...
NOTE: If you are dealing with a large amount of disks it is recommend to use the
-f outfile” option with vgexport and vgimport. See section Importing and
exporting VGs for details.
# vgcfgbackup vgnew
For details regarding vgchange look at the man page. vgexport/vgimport is described
below in greater detail.
Removing a PV / VG / LV
Remove an LV
# umount /data
# lvremove /dev/vg01/lvsap
Remove a PV from a VG
# vgreduce vg01 /dev/dsk/c5t0d0
Remove a VG
umount any LV of this VG, deactivate and export it: