Description of problem:
Tried using mirror and split mirror to back up a running system before upgrade (f14->f16) and tripped over this problem. lvconvert does not validate the new volume name before starting the mirror split. If you mistakenly include the volume group in the new volume name then the split-off volume is there but completely unusable and inaccessible.
Version-Release number of selected component (if applicable):
lvm2-2.02.84-2.fc14.x86_64.rpm
How reproducible:
Just follow my mistake!
Steps to Reproduce:
0. Take a copy of the VG configuration!!!
vgcfgbackup -f vgXX.good -v vgXX
1. Create a test logical volume on a machine with three or more disks.
2. Convert to a mirrored volume.
lvconvert --mirrors 1 --alloc contiguous vgXX/lvXX /dev/sdXN /dev/sdYN
3. Split the mirror to create a new volume with a bad name.
lvconvert --splitmirrors 1 -n vgXX/lvYY vgXX/lvXX /dev/sdXN
------------------------------^^^^^ Oops.
Actual results:
New LV fails activation leaving:
vgXX/lvXX
vgXX/lvXX_mimage_0
vgXX/lvXX_mlog
vgXX/vgXX/lvYY
LV "vgXX/vgXX/lvYY" is listed but none of the LVM tools will work with it.
LVM GUI crashes on start-up.
Expected results:
Error message at invocation and refuse to split off an invalid volume name.
Additional info:
Do not test on a valuable system!
Use vgcfgbackup before testing and use vgcfgrestore after to unwind the changes, or manually edit a configuration and restore. That's the only way I could restore sanity!
--DaveG.