For context, see my answer: Move a logical volume from one volume group to another.
I tried to use this recipe for real. See the transcript at https://gist.github.com/anonymous/1611380eafd0c738ef0f8ad09e0f0ab0
It looks like I didn't test this enough. While trying to apply this to my system, I got the following error
root@orwell:/tmp# lvconvert --type raid1 --mirrors 1 /dev/newdebian/debian_boot /dev/md2
Logical volume newdebian/debian_boot successfully converted.
root@orwell:/tmp# lvconvert --splitmirrors 1 --name debian_boot_copy /dev/newdebian/debian_boot
Unable to determine sync status of newdebian/debian_boot.
Unable to split newdebian/debian_boot while it is not in-sync.
I'm not finding any information about this on the net, but I also think it's unlikely that I'm the first person in the world to run into this. Note that the two volume groups in this case are on separate md RAID devices. Here is what the layout currently looks like.
And I merged the debian
VG into the newdebian
VG.
This is an awkward position to be in - I may not be able to use my regular installation, which is on the debian
VG, till this is fixed.
root@orwell:/tmp# lvs -a -o name,copy_percent,devices newdebian
LV Cpy%Sync Devices
acl /dev/md1(80472)
boot /dev/md2(35761)
data /dev/md1(95835)
debian_boot debian_boot_rimage_0(0),debian_boot_rimage_1(0)
[debian_boot_rimage_0] /dev/md1(0)
[debian_boot_rimage_1] /dev/md2(36000)
[debian_boot_rmeta_0] /dev/md1(117666)
[debian_boot_rmeta_1] /dev/md2(35999)
debian_home /dev/md1(12158)
debian_root /dev/md1(238)
home /dev/md2(11920)
postgres /dev/md1(105563)
root /dev/md2(0)
swap /dev/md1(35999)
swap /dev/md1(113243)
vboxshare /dev/md1(117410)
video /dev/md1(42072)
video /dev/md1(83035)
windows /dev/md1(36952)
windows /dev/md1(80475)
windows /dev/md1(114338)
windows10 /dev/md1(100955)
windows10 /dev/md1(115618)
For the moment, I've converted back to linear
root@orwell:/tmp# lvconvert --type linear /dev/newdebian/debian_boot
Unable to determine sync status of newdebian/debian_boot.
Logical volume newdebian/debian_boot successfully converted.
but of course, I'd like to know what the problem is.
lvchange -ay newdebian/debian_boot
. LVM does not synchronize inactive volumes. You should wait until Cpy%Sync is 100%. Then it should be safe to split. – Martian Jul 17 '17 at 16:41