[Pkg-libvirt-maintainers] Bug#883208: Bug#883208: libvirt0 version 3.0.0-4+deb9u1 fails to migrate qemu guests that use disks with cache='directsync'
Guido Günther
agx at sigxcpu.org
Fri Dec 1 16:44:20 UTC 2017
Hi,
On Thu, Nov 30, 2017 at 06:16:15PM +0100, Carsten Burkhardt wrote:
> Package: libvirt0
> Version: 3.0.0-4+deb9u1
>
> libvirt0 version 3.0.0-4+deb9u1 fails to migrate qemu guests that use disks with cache='directsync'
>
> Directsync is necessary for us to maintain drbd data integrity. However, libvirt in the stable debian release prevents us from using that cache mode for live migration.
>
> This has been fixed in the git version:
>
> https://github.com/libvirt/libvirt/commit/fed9cc85eaff6f75e3d232e350d78a53f314815f#diff-6ec6f76d45ea0e7e9e53e36eac65a923
>
> Here is my attempt at backporting that change:
>
>
> --- qemu_migration.c.orig 2017-11-30 15:58:34.143882478 +0100
> +++ qemu_migration.c 2017-11-30 16:26:27.801361294 +0100
> @@ -2377,7 +2377,8 @@
> /* Our code elsewhere guarantees shared disks are either readonly (in
> * which case cache mode doesn't matter) or used with cache=none */
> if (qemuMigrateDisk(disk, nmigrate_disks, migrate_disks) &&
> - disk->cachemode != VIR_DOMAIN_DISK_CACHE_DISABLE) {
> + disk->cachemode != VIR_DOMAIN_DISK_CACHE_DISABLE &&
> + disk->cachemode != VIR_DOMAIN_DISK_CACHE_DIRECTSYNC) {
> int rc;
>
> if (virDomainDiskGetType(disk) == VIR_STORAGE_TYPE_FILE) {
> @@ -2396,7 +2397,7 @@
>
> virReportError(VIR_ERR_MIGRATE_UNSAFE, "%s",
> _("Migration may lead to data corruption if disks"
> - " use cache != none"));
> + " use cache != none or cache != directsync"));
> return false;
> }
> }
I've cherry-picked the patch form upstream. Please test the packages at:
https://people.debian.org/~agx/libvirt/
Cheers,
-- Guido
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-libvirt-maintainers/attachments/20171201/b18f4f16/attachment.sig>
More information about the Pkg-libvirt-maintainers
mailing list