Trim on KVM Linode

Hello,

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) with queued trim (and possibly non-queued trim) does linode officially support the use of trim? Does Linode use ssds with firmware that isn't known to have issues with trim? (Linux 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

I just wanted to post an update, it looks like the data corruption bug Algolia reported in their blog is actually a Linux kernel bug. A patch addressing the root cause of the issue has been made available. (See Slashdot post) It seems that only Linux software raid (raid 0 and raid 10) were affected.

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.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct