wyang
2017-Jul-18 10:06 UTC
[libvirt-users] Why cannot block copy local storage to network disk
Martin Kletzander
2017-Jul-18 13:33 UTC
Re: [libvirt-users] Why cannot block copy local storage to network disk
On Tue, Jul 18, 2017 at 06:06:45PM +0800, wyang wrote:>Hi, guys > >I was executing the following command to lively migrate local storage to >network storage, > > [root@192-168-152-51 ~]# virsh blockcopy > a75056a4-44e0-4b97-bc77-78142ee17038 vda —xml rbd.xml —wait —verbose > —pivot > error: argument unsupported: non-file destination not supported yet > >but I get the following error: > > error: argument unsupported: non-file destination not supported yet > >I check my libvirt source code, and find the following code sniff in >/qemuDomainBlockCopyCommon/ function > >|if (!virStorageSourceIsLocalStorage(mirror)) { >virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", _("non-file >destination not supported yet")); } | > >it was introduced by Eric. > > commit e53ee6c123321a1775ef3b36e15a5fa351d10fe4 > Author: Eric Blake eblake@redhat.com <http://mailto:eblake@redhat.com> > Date: Fri Aug 29 16:30:46 2014 -0600 > > blockcopy: tweak how rebase calls into copy > >So my question is that why we cannot block copy to network storage? >The answer is in the commit message. It was not supported even before the commit, it's just that now it needs to be explicitly checked. IIUC, before that commit the stat() call would just fail. It's just that nobody implemented it yet. Having said that, I'm unaware of the actual limitations that there are. Martin
Peter Krempa
2017-Jul-25 09:17 UTC
Re: [libvirt-users] Why cannot block copy local storage to network disk
On Tue, Jul 18, 2017 at 15:33:24 +0200, Martin Kletzander wrote:> On Tue, Jul 18, 2017 at 06:06:45PM +0800, wyang wrote: > >Hi, guys > > > >I was executing the following command to lively migrate local storage to > >network storage, > > > > [root@192-168-152-51 ~]# virsh blockcopy > > a75056a4-44e0-4b97-bc77-78142ee17038 vda —xml rbd.xml —wait —verbose > > —pivot > > error: argument unsupported: non-file destination not supported yet > > > >but I get the following error: > > > > error: argument unsupported: non-file destination not supported yet > > > >I check my libvirt source code, and find the following code sniff in > >/qemuDomainBlockCopyCommon/ function > > > >|if (!virStorageSourceIsLocalStorage(mirror)) { > >virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", _("non-file > >destination not supported yet")); } | > > > >it was introduced by Eric. > > > > commit e53ee6c123321a1775ef3b36e15a5fa351d10fe4 > > Author: Eric Blake eblake@redhat.com <http://mailto:eblake@redhat.com> > > Date: Fri Aug 29 16:30:46 2014 -0600 > > > > blockcopy: tweak how rebase calls into copy > > > >So my question is that why we cannot block copy to network storage? > > > > The answer is in the commit message. It was not supported even before > the commit, it's just that now it needs to be explicitly checked. IIUC, > before that commit the stat() call would just fail. It's just that > nobody implemented it yet. Having said that, I'm unaware of the actual > limitations that there are.I'm working on that currently. The code was never adapted to target network in this case. As it was never implemented yet, the new approach will use blockdev-add and blockdev-mirror, since we also need to support multi-host based protocols, which are impossible to use with drive-mirror command in qemu.