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


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to