From mboxrd@z Thu Jan 1 00:00:00 1970 From: chickenmarkus@freenet.de Subject: Discard is not working Date: Wed, 05 Feb 2014 23:53:56 +0100 Message-ID: <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 mout3.freenet.de ([195.4.92.93]:41554 "EHLO mout3.freenet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751256AbaBEW4Y (ORCPT ); Wed, 5 Feb 2014 17:56:24 -0500 Received: from [195.4.92.141] (helo=mjail1.freenet.de) by mout3.freenet.de with esmtpa (ID chickenmarkus@freenet.de) (port 25) (Exim 4.80.1 #4) id 1WBBOJ-0002Pb-0I for kvm@vger.kernel.org; Wed, 05 Feb 2014 23:56:23 +0100 Received: from localhost ([::1]:46921 helo=mjail1.freenet.de) by mjail1.freenet.de with esmtpa (ID chickenmarkus@freenet.de) (Exim 4.80.1 #4) id 1WBBOI-000659-Sa for kvm@vger.kernel.org; Wed, 05 Feb 2014 23:56:22 +0100 Received: from mx11.freenet.de ([195.4.92.21]:39621) by mjail1.freenet.de with esmtpa (ID chickenmarkus@freenet.de) (Exim 4.80.1 #4) id 1WBBLz-0006We-1i for kvm@vger.kernel.org; Wed, 05 Feb 2014 23:53:59 +0100 Received: from mrburnz.wh29.tu-dresden.de ([141.30.206.11]:45880 helo=[192.168.137.21]) by mx11.freenet.de with esmtpsa (ID chickenmarkus@freenet.de) (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (port 587) (Exim 4.80.1 #4) id 1WBBLy-0003AX-R7 for kvm@vger.kernel.org; Wed, 05 Feb 2014 23:53:59 +0100 Sender: kvm-owner@vger.kernel.org List-ID: 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