Your message dated Thu, 02 Oct 2014 13:29:12 +0400
with message-id <[email protected]>
and subject line Re: Bug#763318: qemu-kvm: discard='unmap' not working for 
qcow2 disks on virtio-scsi controller
has caused the Debian Bug report #763318,
regarding qemu-kvm: discard='unmap' not working for qcow2 disks on virtio-scsi 
controller
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
763318: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763318
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: qemu-kvm
Version: 2.1+dfsg-4
Severity: normal

Dear Maintainer,

I am not able to get discard to work on qcow2 disks

In my libvirt xml file I have the following:
  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <controller type='scsi' index='0' model='virtio-scsi'/>
   ................
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none' io='native' 
discard='unmap'/>
      <source file='/opt/marshall/vm/media-image/david.qcow2'/>
      <target dev='sdd' bus='scsi'/>
    </disk>
  ...........
  </devices>

>From an lspci in the VM I can see that a virtio-scsi device exists
00:04.0 SCSI storage controller: Red Hat, Inc Virtio SCSI
        Subsystem: Red Hat, Inc Device 0008
        Physical Slot: 4
        Flags: bus master, fast devsel, latency 0, IRQ 11
        I/O ports at c100 [size=64]
        Memory at febf4000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: [40] MSI-X: Enable+ Count=4 Masked-
        Kernel driver in use: virtio-pci

When I mount the disk I get the following messages in /var/log/kern.log
Sep 29 19:24:51 media kernel: [ 1732.180531] EXT4-fs (sde): mounting with 
"discard" option, but the device does not support discard
Sep 29 19:24:51 media kernel: [ 1732.180536] EXT4-fs (sde): mounted filesystem 
with ordered data mode. Opts: discard

When I run fstrim I get the following error:
fstrim: /personal/david: FITRIM ioctl failed: Operation not supported


-- System Information:
Debian Release: jessie/sid
  APT prefers testing-updates
  APT policy: (500, 'testing-updates'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.14-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages qemu-kvm depends on:
ii  qemu-system-x86  2.1+dfsg-4

qemu-kvm recommends no packages.

qemu-kvm suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
Control: retitle -1 discard does not work with old machine types

01.10.2014 15:48, David Marshall wrote:
> Hi,
> 
> Did you see anything obvious in my kvm command line.

Yes.  You're using -machine pc-0.12, but in 0.12, discard weren't supported,
so to honour your request, it is not enabled for the guest.

With more recent machine type(s), including default 2.1, it works.

Closing this bugreport now.

Thanks,

/mjt

--- End Message ---

Reply via email to