[linux-lvm] Unable to determine sync status errror when trying split LVM2 RAID 1 mirror

Faheem Mitha faheem at faheem.info
Tue Jul 4 10:36:33 UTC 2017


Hi,

Please see the issue detailed in

https://unix.stackexchange.com/q/375051/4671

Short version:

If I create a RAID 1 mirror,

      lvconvert --type raid1 --mirrors 1 /dev/newdebian/debian_boot /dev/md2

and then try to split it using

      lvconvert --splitmirrors 1 --name debian_boot_copy /dev/newdebian/debian_boot

I get the error

     Unable to determine sync status of newdebian/debian_boot.
     Unable to split newdebian/debian_boot while it is not in-sync.

See the full transcript at at the foot of this email.

Based on looking at the code in lvconvert, it seems this error is thrown 
when sync percentage for the RAID is missing. But there is no indication 
why this percentage is missing.

Any suggestions for debugging appreciated. And please copy me on any
response. Thanks.

Regards, Faheem Mitha

#####################################################################

Given volume groups debian and newdebian, make a copy of lv
/dev/debian/boot in newdebian.

Rename `/dev/debian/boot` to `/dev/debian/debian_boot`.
Rename `/dev/debian/home` to `/dev/debian/debian_home`.
Rename `/dev/debian/root` to `/dev/debian/debian_root`.

     lvrename /dev/debian/boot /dev/debian/debian_boot
     lvrename /dev/debian/home /dev/debian/debian_home
     lvrename /dev/debian/root /dev/debian/debian_root

Make debian VG inactive.

     vgchange -a n debian

Run merge command. This merges debian into newdebian.

      vgmerge -A y -l -v newdebian debian

Then create a RAID 1 mirror pair from `/dev/newdebian/debian_boot`
using lvconvert. The `dest-pv` argument tells lvconvert to make the
mirror copy on /dev/md2.

     lvconvert --type raid1 --mirrors 1 <<source-lv>> <<dest-pv>>
     lvconvert --type raid1 --mirrors 1 /dev/newdebian/debian_boot /dev/md2

Then split the mirror. The new LV is now `debian_boot_copy`.

     lvconvert --splitmirrors 1 --name <<source-lv-copy>> <<source-lv>>
     lvconvert --splitmirrors 1 --name debian_boot_copy /dev/newdebian/debian_boot

Make /dev/newdebian/debian_boot, /dev/newdebian/debian_home,
/dev/newdebian/debian_root inactive.

     vgchange -a n /dev/newdebian/debian_boot /dev/newdebian/debian_home /dev/newdebian/debian_root

Then split the VGs.

     vgsplit -v <<source-vg>> <<destination-vg>> <<moved-to-pv>>
     vgsplit -v /dev/newdebian /dev/debian /dev/md1




More information about the linux-lvm mailing list