[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Block format 'raw' does not support the option 'locking
From: |
Changlimin |
Subject: |
Re: [Qemu-devel] Block format 'raw' does not support the option 'locking' when disable image locking with option locking=off |
Date: |
Thu, 26 Oct 2017 01:06:12 +0000 |
share-rw=on is good for raw format file, but bad for qcow2 format file:
Failed to get "write" lock
Is another process using the image?
Is this intented?
BR
Chang Limin
-----Original Message-----
From: Fam Zheng [mailto:address@hidden
Sent: Wednesday, October 25, 2017 9:31 PM
To: changlimin 00148 (Cloud)
Cc: address@hidden
Subject: Re: [Qemu-devel] Block format 'raw' does not support the option
'locking' when disable image locking with option locking=off
On Wed, 10/25 08:15, Changlimin wrote:
> Hi,
> When running Oracle RAC, one image is shared between multiple vms, so I want
> to disable locking with option locking=off, But Block format 'raw' does not
> support the option 'locking'.
> How to disable locking?
>
> The version is git e822e81e350825dd94f41ee2538ff1432b812eb9
>
> The command line is
> -drive
> file=/var/lib/libvirt/images/r0605-share.img,format=raw,if=none,id=dri
> ve-virtio-disk1,cache=directsync,aio=native,locking=off \ -device
> virtio-blk-pci,scsi=off,bus=pci.0,addr=0xa,drive=drive-virtio-disk1,id
> =virtio-disk1 \
Hi, in this case you probably want to use share-rw=on:
-device virtio-blk-pci,share-rw=on,scsi=off,...
The -drive option is the same. This is more semantically correct than
locking=off as it means "the device can share the image with other QEMUs".
But for really disabling locking with "locking=off", the right syntax is:
-drive file.filename=/var/lib/...,file.locking=off \
or alternatively:
-drive driver=file,filename=/var/lib/...,locking=off \
Fam