From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzoUP-0007Y8-Of for qemu-devel@nongnu.org; Fri, 10 Aug 2012 08:38:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzoUK-0003KF-Ug for qemu-devel@nongnu.org; Fri, 10 Aug 2012 08:38:53 -0400 Received: from mail.profihost.ag ([85.158.179.208]:38564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzoUK-0003K8-Ha for qemu-devel@nongnu.org; Fri, 10 Aug 2012 08:38:48 -0400 Message-ID: <502500D7.3070903@profihost.ag> Date: Fri, 10 Aug 2012 14:38:47 +0200 From: Stefan Priebe - Profihost AG MIME-Version: 1.0 References: <502283FA.2080506@profihost.ag> <5022912B.2000607@redhat.com> <50235527.4090804@profihost.ag> <50236059.7060801@redhat.com> <4A799203-5BFF-4DE9-9B85-459096EBEC22@profihost.ag> <50236484.2090702@redhat.com> <502369C7.7000300@profihost.ag> <50238E2A.1050203@profihost.ag> <5024D2E7.40700@profihost.ag> <5024E06A.4070603@redhat.com> <5024E232.5020706@profihost.ag> <5024E2CB.2050208@redhat.com> <5024F66D.8050905@profihost.ag> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] virtio-scsi vs. virtio-blk List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ronnie sahlberg Cc: Paolo Bonzini , qemu-devel , Stefan Hajnoczi never used this tool. Output is: This looks like this: # sg_unmap --lba=0x1000 --num=1 /dev/sde # sg_get_lba_status --lba=0x1000 /dev/sde get LBA status: transport: Host_status=0x10 is invalid Driver_status=0x08 [DRIVER_SENSE, SUGGEST_OK] Get LBA Status command failed try '-v' option for more information Stefan Am 10.08.2012 13:58, schrieb ronnie sahlberg: > You can easily verify if your target supports thin-provisioning via > the UNMAP command. > > Download the sg3-utils package > and either mount the LUN locally via the kernel open-iscsi or apply > the libiscsi patch to sg3-utils to make it iscsi-aware > > then use the commands "sg_unmap" to try to unmap regions and > "sg_get_lba_status" to check that the regions are now unmapped. > > > > On Fri, Aug 10, 2012 at 9:54 PM, Stefan Priebe - Profihost AG > wrote: >> http://www.nexenta.com/corp/products/what-is-openstorage/nexentastor >> >> tells me: >> "SCSI UNMAP as a client-side feature frees up storage in the back end, in >> the context of thin provisioning (a 100-to-one reduction in space for VDI >> when using NexentaStor)." >> >> So i would say nexenta supports it. But i'm using virtio-scsi-pci? I'm >> really sorry to ask so many questions. >> >> Stefan >> Am 10.08.2012 13:20, schrieb ronnie sahlberg: >> >>> On Fri, Aug 10, 2012 at 8:30 PM, Paolo Bonzini >>> wrote: >>>> >>>> Il 10/08/2012 12:28, Stefan Priebe - Profihost AG ha scritto: >>>>> >>>>> I'm using iscsi. So no raw or qcow2. >>>> >>>> >>>> Ok, then you need to use scsi-block as your device instead of scsi-disk >>>> or scsi-hd. This will disable the QEMU SCSI emulation and let your VM >>>> talk directly to the NAS. >>>> >>>> CCing Ronnie who may be interested in bug reports since I'm on holiday >>>> starting "soon". >>>> >>> >>> I think it works on any, >>> You can of course not boot from a if=scsi disk in qemu, >>> >>> but any '-drive file=iscsi://...,if=scsi' should work as long as it is >>> not the boot device. >>> >>> SCSI emulation in qemu picks this up via WRITESAME10/16 and then calls >>> bdrv_aio_discard() >>> block/iscsi.c is invoked for discard and then translates this back to >>> a SBC UNMAP command it sends to the target. >>> >>> >>> Now, block/iscsi.c does assume that any target that reports that it >>> supports thin-provisioning actually implements UNMAP command. >>> There could be targets that support thin-provision ing that does NOT >>> support UNMAP and unly support discard via WRITESAME10/16 >>> so at some stage I should send a patch to iscsi.c to check which >>> commands the target supprots and use one of the supported ones instead >>> of a blanket >>> "you say you support thin-provisioning, I take that as confirmation >>> you support SBC UNMAP" >>> >>> >>> regards >>> ronnie sahlberg >>> >>