From: Stefan Hajnoczi <stefanha@gmail.com>
To: Qixiaozhen <qixiaozhen@huawei.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
"Luohao (brian)" <brian.luohao@huawei.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Xujunxi <xujunxi@huawei.com>
Subject: Re: [Qemu-devel] [Qemu/Virtio-scsi]The feature of 'raw device mapping' cannot isolate the LUN to the owning virtual machine
Date: Mon, 27 Jan 2014 15:06:10 +0100 [thread overview]
Message-ID: <20140127140610.GA23841@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <F3FF02E5B1A52F44A89CA6A3523CE5577184EB0D@szxema507-mbx.china.huawei.com>
On Mon, Jan 27, 2014 at 02:50:04AM +0000, Qixiaozhen wrote:
> A instance was created by virsh command in the CentOS 6.4.
>
> The LUN in the Storage Array Network(SAN) was attached to the instance with the following xml.
>
> <disk type='block' device='lun'>
> <driver name='qemu' type='raw' cache='none'/>
> <source dev='/dev/mapper/360022a110000ecba5db427db00000023'/>
> <target dev='vdb' bus='virtio'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
> </disk>
> <controller type='scsi' model='virtio-scsi'/>
>
>
> A scsi report command was executed in the instance, for example "sg_luns /dev/vdb". However, It returned the list of the Luns in the SAN.
>
>
> 1) The unrelated luns in the SAN were not isolated in the instance.
> [root@localhost ~]# sg_luns /dev/vdb
> Lun list length = 80 which imples 10 lun entries
> Report luns [select_report=0]:
> 0000000000000000
> 0001000000000000
> 0002000000000000
> 0003000000000000
> 0004000000000000
> 0005000000000000
> 0006000000000000
> 0007000000000000
> 0008000000000000
> 0009000000000000
You are using virtio-blk with SCSI-passthrough, not virtio-scsi (it's
confusing but libvirt type='block' device='lun' means virtio-blk). This
feature has fallen out of favor and is generally best replaced with
virtio-scsi instead of virtio-blk.
If you do not require raw SCSI commands from the guest, then change
device='lun' to device='disk'.
What exactly are you trying to do?
Stefan
next prev parent reply other threads:[~2014-01-27 14:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-27 2:50 [Qemu-devel] [Qemu/Virtio-scsi]The feature of 'raw device mapping' cannot isolate the LUN to the owning virtual machine Qixiaozhen
2014-01-27 11:35 ` Paolo Bonzini
2014-01-27 12:22 ` Qixiaozhen
2014-01-27 12:42 ` Paolo Bonzini
2014-01-27 14:06 ` Stefan Hajnoczi [this message]
2014-01-28 1:28 ` Qixiaozhen
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=20140127140610.GA23841@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=brian.luohao@huawei.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qixiaozhen@huawei.com \
--cc=xujunxi@huawei.com \
/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).