From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7mpT-0004Lt-9s for qemu-devel@nongnu.org; Mon, 27 Jan 2014 09:06:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7mpK-0001eB-Sr for qemu-devel@nongnu.org; Mon, 27 Jan 2014 09:06:23 -0500 Received: from mail-wg0-x236.google.com ([2a00:1450:400c:c00::236]:39583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7mpK-0001dw-LI for qemu-devel@nongnu.org; Mon, 27 Jan 2014 09:06:14 -0500 Received: by mail-wg0-f54.google.com with SMTP id x13so5508686wgg.33 for ; Mon, 27 Jan 2014 06:06:12 -0800 (PST) Date: Mon, 27 Jan 2014 15:06:10 +0100 From: Stefan Hajnoczi Message-ID: <20140127140610.GA23841@stefanha-thinkpad.redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [Qemu/Virtio-scsi]The feature of 'raw device mapping' cannot isolate the LUN to the owning virtual machine List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Qixiaozhen Cc: Paolo Bonzini , "Luohao (brian)" , "qemu-devel@nongnu.org" , Xujunxi 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. > > > > > >
> > > > > 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