- Red Hat Enterprise Linux 5
- LVM snapshots
- Does LVM snapshot merge work in RHEL 5?
- Using the
--mergeoption of the
lvconvertcommand does not work in RHEL5
--mergeoption can be used in Rescue Mode if booted with RHEL6 installation media and the LV is not mounted, ie: 'When asked to Detect your current installation, choose No'.
- Alternatively, all data from the snapshot can be copied into a new logical volume of equal size
# lvcreate -L <size> -n NewLV VolumeGroupName
# dd if=/dev/VolumeGroupName/OldLV of=/dev/VolumeGroupName/NewLV bs=8M iflag=direct oflag=direct
- Kernel support for merging LVM snapshots is not in RHEL5.
- Only RHEL6 supports merging of LVM snapshots.
- There are no plans to backport this functionality to RHEL5 due to the complexity of the changes required.
- Look through the kernel source, in drivers/md/dm-snap.c, and look for "merge". In RHEL5, there is no "merge" code. This code only exists in RHEL6.
# grep merge ./rhel6/drivers/md/dm-snap.c -c
# grep merge ./rhel5/kernel/drivers/md/dm-snap.c -c
- LV fails to activate after merge
Can't process LV lv_name: snapshot-merge target support missing from kernel?
- Check to see if dmsetup lists snapshot-merge as a target type
# dmsetup targets
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.