On Fri, Nov 13, 2020 at 07:59:23AM +0100, J??rgen Gro?? wrote: > a large customer is asking for storage migration of the disk images of > their virtual machines. They don't want to migrate the VM to another > host, but only the disk image from one filer to another while the VM > keeps running. > > The natural way to setup something like this would be LVM and use > mirroring, but the problem is that this requires to copy the image to > a LVM enabled disk first, and this is no option due to time constraints > (copying many GB of data takes too long, and in the end I'd like to be > able to do the switch from the original image to the LVM backed with > the VM kept running). > > So my idea was to enhance the loop driver to be capable to support a > list of backing files instead of only one and use a small prepended > file for storing the needed LVM metadata, resulting in the ability to > keep the existing disk image. > > Would such an addition be acceptable? Just use device mapper on top of the loop device, no need for changes to the loop driver itself. Also qemu has some interesting migration features that you might want to look into as they might suit you.