Trim on KVM Linode
I've been doing some testing with a kvm linode and it appears that Trim is enabled. (Ubuntu 14.04.2 LTS - 4.0.5-x86_64-linode58)
I'm wondering given the issues with ssd firmware lately (
Algolia blog Linux queued trim blacklist
sudo fstrim -v / /: 265691136 bytes were trimmed cat /sys/block/sda/queue/discard_granularity 4096
This shows the size of internal allocation of the device in bytes, if
reported by the device. A value of '0' means device does not support
the discard functionality.
cat /sys/block/sda/queue/discard_max_bytes 1073741824
Devices that support discard functionality may have internal limits on
the number of bytes that can be trimmed or unmapped in a single operation.
The discardmaxbytes parameter is set by the device driver to the maximum
number of bytes that can be discarded in a single operation. Discard
requests issued to the device must not exceed this limit. A discardmaxbytes
value of 0 means that the device does not support discard functionality.
cat /sys/block/sda/queue/discard_zeroes_data 0
When read, this file will show if the discarded block are zeroed by the
device or not. If its value is '1' the blocks are zeroed otherwise not.
(/sys/block qutoes from
However still doesn't address the issue of buggy NCQ trim firmware but, drives that are known to exhibit issues have this feature disabled in the driver.