Gionatan Danti
2017-Feb-17 11:33 UTC
[libvirt-users] Unsafe migration with copy-storage-all (non shared storage) and writeback cache
Hi list, I would like to understand if, and why, the --unsafe flag is needed when using --copy-storage-all when migrating guests which uses writeback cache mode. Background: I want to live migrate guests with writeback cache from host A to host B and these hosts only have local storage (ie: no shared storage at all). From my understanding, --unsafe should be only required when migrating writeback-enabled guests between two hosts which share non-cluster-aware storage (ie: NFS), but it should not be necessary when not sharing storage. However, when trying to migrate from a CentOS6 host to a CentOS7 machine with command [root@source ~]# virsh migrate Totem --live --copy-storage-all --persistent --verbose qemu+ssh://root@172.31.255.11/system I have the following error: error: Unsafe migration: Migration may lead to data corruption if disks use cache != none So, my questions are: 1) it is safe to do a live migration with --copy-storage-all when guests are using writeback cache mode? 2) if so, why libvirt complains about that? 3) if not, what is the best method to migrate a running quest using writeback cache mode? Thanks. -- Danti Gionatan Supporto Tecnico Assyoma S.r.l. - www.assyoma.it email: g.danti@assyoma.it - info@assyoma.it GPG public key ID: FF5F32A8
Jiri Denemark
2017-Feb-17 18:50 UTC
Re: [libvirt-users] Unsafe migration with copy-storage-all (non shared storage) and writeback cache
On Fri, Feb 17, 2017 at 12:33:28 +0100, Gionatan Danti wrote:> Hi list, > I would like to understand if, and why, the --unsafe flag is needed when > using --copy-storage-all when migrating guests which uses writeback > cache mode. > > Background: I want to live migrate guests with writeback cache from host > A to host B and these hosts only have local storage (ie: no shared > storage at all). > > From my understanding, --unsafe should be only required when migrating > writeback-enabled guests between two hosts which share non-cluster-aware > storage (ie: NFS), but it should not be necessary when not sharing storage.I think your understanding is correct.> 1) it is safe to do a live migration with --copy-storage-all when guests > are using writeback cache mode?Yeah storage migration should be safe regardless of the cache mode used.> 2) if so, why libvirt complains about that?This looks like a bug in libvirt. The code doesn't check whether an affected disk is going to be migrated (--copy-storage-all) or accessed on the shared storage. Jirka
Gionatan Danti
2017-Feb-21 09:32 UTC
Re: [libvirt-users] Unsafe migration with copy-storage-all (non shared storage) and writeback cache
On 17/02/2017 19:50, Jiri Denemark wrote:> > Yeah storage migration should be safe regardless of the cache mode used. >Very good news, thanks. Let me be paranoid: is it *surely* safe?> > This looks like a bug in libvirt. The code doesn't check whether an > affected disk is going to be migrated (--copy-storage-all) or accessed > on the shared storage. > > Jirka >Any chances the bug will be corrected? Should I open a BZ against it? Thanks. -- Danti Gionatan Supporto Tecnico Assyoma S.r.l. - www.assyoma.it email: g.danti@assyoma.it - info@assyoma.it GPG public key ID: FF5F32A8