HL15 support for trim/discard

Hello!
I love my HL15s, but I just noticed that my one SSD I have plugged into the backplane suddenly does not support TRIM/discard. Is this a limitation of the SAS backplane?

Example:

$ sudo smartctl --all /dev/sda | grep "Device Model"
Device Model:     Samsung SSD 850 EVO 250GB

$ sudo fstrim -v /
fstrim: /: the discard operation is not supported

$ sudo sg_vpd -p bl /dev/sda | grep -i unmap
  Maximum unmap LBA count: 0 [Unmap command not implemented]
  Maximum unmap block descriptor count: 0 [Unmap command not implemented]
  Optimal unmap granularity: 0 blocks [not reported]
  Unmap granularity alignment valid: false
  Unmap granularity alignment: 0 [invalid]

It’s the same on both machines (one has a Samsung SSD and the other has a Kingston SSD). I haven’t tried swapping them back to regular SATA, but I imagine that would fix it. I guess my question is, is there a way to make TRIM work through the backplane? Is it maybe related to my SAS controller cards?

When you say “suddenly does not support TRIM/discard”, do you mean this was working on the HL15 and stopped? Or that the trim operation worked on that SSD in some other system? Or …

I think trim support is partially based on the file system. What file system is on the SSD? How ia it being used? ZIL, L2ARC, special device, non-ZFS?

Also, just to confirm, you have the full build with the X11SPH motherboard, the 45HL default cabling between it and the backplane, and running Rocky Linus/Houston?

1 Like

Ah sorry I should have been clearer. I have the HL15 Chassis/backplane but use my own motherboard/CPU. This drive used to trim fine with the same motherboard/CPU, the only thing that changed is that the components moved into the HL15 and instead of using the onboard SATA controller for this SSD (the boot drive) I thought I’d try mounting the SSD inside the backplane instead.

The drive is formatted with EXT4. It’s a Debian 12 boot/OS drive.

I can’t imagine there is something about the backplane that would disable trim support. It is a pretty passive component, there’s few or no logic ICs. I would think something else must be different between your old and new setup. What HBA are you using? Was that part of the old system and was that how the drive was connected in the old system?

1 Like

What does sudo hdparm -I /dev/sdX say about trim support for this drive? I assume the other Samsung SSD 850 EVO 250GB drives will show something different if you also check them with hdparm.

Hello again! Sorry for the slow reply, I was away for the weekend.

So it turns out that I suspect the issue is actually with my LSI SAS controllers. I found the following:

“The drives must support both “Data Set Management TRIM supported (limit 8 blocks)” and “Deterministic read ZEROs after TRIM” in their ATA options.
The Samsung 850 PROs don’t have “Deterministic read ZEROs after TRIM” support, and thus TRIM cannot be run on these drives when attached to a LSI SAS HBAs with IT firmware”

I don’t have any other brand controllers to verify this, but it seems plausible. I guess I’ll just attach sata SSDs to the sata controller for now. I should not have doubted my lovely HL15 :heart:

1 Like

Does the Kingston SSD support both “Data Set Management TRIM supported (limit 8 blocks)” and “Deterministic read ZEROs after TRIM” or does it also lack the latter?