Re: CFT: TRIM Consolodation on UFS/FFS filesystems

From: Jan Henrik Sylvester <me_at_janh.de>
Date: Thu, 23 Aug 2018 13:11:58 +0200
On 8/23/18 5:38 AM, bob prohaska wrote:
> On Tue, Aug 21, 2018 at 06:47:19PM -0700, Mark Millard wrote:
>>
>> I've used a SSD both directly via SATA and via a USB enclosure,
>> the same partitions/file systems across the uses. Only when it
>> was SATA-style-use did TRIM work.
>>
> This is likely the key to my question. If USB blocks the TRIM service
> the behavior of the device doesn't matter.

This is kind of off-topic in this thread about UFS, but if you 
investigate TRIM on USB enclosures:

Some of them advertise TRIM support, for example Startech SM21BMU31C3 
(based on Asmedia ASM1351 USB 3.1 Gen 2 chipset), but that is not the 
whole story. Using the UASP protocol, they pass on the ata trim command, 
which is used by Windows for NTFS trim support, but they do not pass the 
SCSI UNMAP command, which is used by Linux. Sorry, I have not yet tested 
this on FreeBSD, but on Linux, security erase of the entire SSD works 
with the enclosure I have just mentioned, whereas trimming of a 
filesystem (fstrim) does not work.

I have had exactly one enclosure that offered trimming on filesystems on 
Linux: I have bought it on Ebay directly from China and I think it is 
based on JMicron JMS567 USB 3.0 chipset. I have not found an mSATA 
enclosure from any vendor in Europe that has this chipset. Of course, 
having the right chipset is not enough, either, the firmware also has to 
support it.

Please, correct me if I am wrong, but I think FreeBSD does not implement 
UASP, yet. Hence, I doubt there will be any kind of trim support for any 
USB-SATA bridge on FreeBSD and even security erase will probably not be 
passed on.

Cheers,
Jan Henrik
Received on Thu Aug 23 2018 - 09:22:20 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:17 UTC