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 blogLinux queued trim blacklist
sudo fstrim -v /
/: 265691136 bytes were trimmed
cat /sys/block/sda/queue/discard_granularity
4096
discard_granularity (RO)
–---------------------
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
discardmaxbytes (RO)
–--------------------
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
discardzeroesdata (RO)
–----------------------
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 here
1 Reply
patchpost
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.