Il 10/08/2012 11:22, Stefan Priebe - Profihost AG ha scritto: > virtio-scsi is now working fine. Could you please help me to get discard > / trim running? I can't find any information what is needed to get > discard / trim working.
You need to add discard_granularity=NNN, where NNN is usually 512 for raw and the cluster size (65536) for qcow2. However, discard is supported only for XFS on raw, and on qcow2 it will not reclaim space---the space will only be reused for future qcow2 allocation. Better support for discard on raw (other filesystems + block devices), and more efficient support also on other formats is on my todo list for the future. However, an efficient implementation unfortunately requires changes at all levels including the kernel. I hope to present something about it at KVM Forum. Paolo
