|HP-UX Reference > L
Requires Optional HP MirrorDisk/UX Software
HP-UX 11i Version 3: February 2007
lvmerge — merge two LVM logical volumes into one logical volume
The lvmerge command merges two logical volumes of the same size. The copy_lv_path is added as a mirrored copy of master_lv_path and only the master_lv_path logical volume is retained. The number of mirrored copies of the master_lv_path is increased by the number of copies in the copy_lv_path.
Data previously contained in the copy_lv_path will be resynchronized using the data in the master_lv_path. All new data on the copy_lv_path will be destroyed and the copy_lv_path logical volume will be removed. lvmerge blocks until all the extents are resynchronized.
The normal usage for this command is to merge previously mirrored logical volumes that have been split using the lvsplit command. However, the two logical volumes are not required to have been the result of a previous lvsplit operation.
NOTE: Whenever a mirrored logical volume is split into two logical volumes using lvsplit, a bitmap is stored that keeps track of all writes to either logical volume in the split pair. When the two logical volumes are subsequently merged using lvmerge, the bitmap is used to decide which areas of copy_lv_path need to be resynchronized with the master_lv_path. This bitmap remains in existence until one of the following conditions occurs:
If there is no bitmap available, all the physical extents from the copy_lv_path are marked stale.
Options and Arguments
lvmerge recognizes the following options and arguments:
Merge /dev/vg00/lvol1b with /dev/vg00/lvol1. Data in /dev/vg00/lvol1b will be overwritten by /dev/vg00/lvol1 and /dev/vg00/lvol1b will be removed.
lvmerge /dev/vg00/lvol1b /dev/vg00/lvol1
lvmerge does not check to guarantee that the allocation policy of master_lv_path is preserved after the merge.