qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Changlimin <changlimin@h3c.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Block format 'raw' does not support the option 'locking' when disable image locking with option locking=off
Date: Wed, 25 Oct 2017 21:31:15 +0800	[thread overview]
Message-ID: <20171025133115.GA23458@lemon> (raw)
In-Reply-To: <BC29A004BA570342A4CC0044A3845572CFCE5592@H3CMLB12-EX.srv.huawei-3com.com>

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=drive-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

  reply	other threads:[~2017-10-25 13:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25  8:15 [Qemu-devel] Block format 'raw' does not support the option 'locking' when disable image locking with option locking=off Changlimin
2017-10-25 13:31 ` Fam Zheng [this message]
2017-10-26  1:06   ` Changlimin
2017-10-26  7:11     ` Max Reitz
2017-10-26  7:18       ` Changlimin
2017-10-26  7:32         ` Max Reitz
2017-10-27  1:28           ` Changlimin
2017-10-31 20:00         ` John Snow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171025133115.GA23458@lemon \
    --to=famz@redhat.com \
    --cc=changlimin@h3c.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).