Re: Good SAS adapters for 6 Gb/s SATA SSD's (with TRIM)?

Ric Wheeler
2011-08-12T09:35:11Z

On 08/12/2011 10:24 AM, Prof. Dr. Klaus Kusche wrote:
> On 2011-08-12 11:01, Ric Wheeler wrote:
>> Lukas has a more generic bulk tool that should do the job and has the
>> advantage that it does not have to fill the file system first (it can
>> lock regions and do its work).
>
> Any pointers to that?

I think that the easiest (and most natural way) to do this is through the
updated fsck (-K) tool which will discard the unused block ranges when you fsck
a file system.

Lukas can add in details about versions, etc :)

>
> Thanks!
>
>> Note that discard is not just for physical devices like SCSI or ATA, it
>> is also useful for "software" stacks like various device mapper targets,
>> virtual block devices, etc so we should be keeping the abstraction at a
>> high level for our tooling.
>
> I agree, but wiper.sh has been the first such tool and is widespread
> and well-known. I'm not aware of alternatives using the generic fstrim
> command (which is still missing on some major distributions)
> or FITRIM ioctl.
>

FITRIM is somewhat misnamed. It will end up issuing a discard to the storage
stack, not an ATA specific TRIM command (invoking sb_issue_discard()).

Anything that uses FITRIM should work if I followed the code correctly,

Ric