From mboxrd@z Thu Jan 1 00:00:00 1970 From: chickenmarkus@freenet.de Subject: Fwd: Discard is not working Date: Fri, 07 Feb 2014 16:51:44 +0100 Message-ID: <52F50110.1010909@freenet.de> References: <52F2C104.4040503@freenet.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from mout2.freenet.de ([195.4.92.92]:37862 "EHLO mout2.freenet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751699AbaBGPy2 (ORCPT ); Fri, 7 Feb 2014 10:54:28 -0500 Received: from [195.4.92.141] (helo=mjail1.freenet.de) by mout2.freenet.de with esmtpa (ID chickenmarkus@freenet.de) (port 25) (Exim 4.80.1 #4) id 1WBnl4-00078H-N4 for kvm@vger.kernel.org; Fri, 07 Feb 2014 16:54:26 +0100 Received: from localhost ([::1]:39789 helo=mjail1.freenet.de) by mjail1.freenet.de with esmtpa (ID chickenmarkus@freenet.de) (Exim 4.80.1 #4) id 1WBnl4-00027H-J4 for kvm@vger.kernel.org; Fri, 07 Feb 2014 16:54:26 +0100 Received: from mx3.freenet.de ([195.4.92.13]:48800) by mjail1.freenet.de with esmtpa (ID chickenmarkus@freenet.de) (Exim 4.80.1 #4) id 1WBniT-0008JC-AE for kvm@vger.kernel.org; Fri, 07 Feb 2014 16:51:45 +0100 Received: from p54b50535.dip0.t-ipconnect.de ([84.181.5.53]:60974 helo=[192.168.178.35]) by mx3.freenet.de with esmtpsa (ID chickenmarkus@freenet.de) (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (port 587) (Exim 4.80.1 #4) id 1WBniT-0006oV-6l for kvm@vger.kernel.org; Fri, 07 Feb 2014 16:51:45 +0100 In-Reply-To: <52F2C104.4040503@freenet.de> Sender: kvm-owner@vger.kernel.org List-ID: Hello, I did not get response to my private mail address. So I'm subscribed now. Bye Markus -------- Original-Nachricht -------- Betreff: Discard is not working Datum: Wed, 05 Feb 2014 23:53:56 +0100 Von: chickenmarkus@freenet.de An: kvm@vger.kernel.org Hello, after reading the "invitation" for some one-off questions without subscribing excuse my disturbing, please. At first my setup of host: * in general Debian Wheezy * Kernel: 3.11-0.bpo.2-amd64 (http://packages.debian.org/wheezy-backports/linux-image-3.11-0.bpo.2-amd64) * LVM 2.02.98 (http://packages.debian.org/jessie/lvm2) * thin-provisioning-tools 0.2.8-1 (http://packages.debian.org/jessie/thin-provisioning-tools) * Qemu-KVM: 1.7.0 (http://packages.debian.org/jessie/qemu-kvm) The new kernel and dirty things from Jessie are for working thin volumes with discard on my ssd. Everything's fine up to this point. Afterwards I start a guest (also Debian Wheezy) over the following command (over libvirt) as root (for test only): kvm [...] -drive file=/dev/ssd0/sarabi,if=none,id=drive-scsi0-0-0-0,format=raw,discard=unmap -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=2 [...] Neither lsblk -D nor the try of fstrim ends positive. Both say that discard is not supported. I read that guests need at least kernel 3.4 to support discard (and virtio-scsi). But the same backports kernel 3.11 did not changed anything. Did I understand something wrong? Is the command wrong? Are any requirements not met? Bye Markus