# How to TRIM a SSD on a ATA channel without AHCI?



## User23 (Dec 6, 2011)

I would like to TRIM two SSDs once that are connected on a normal ATA channel without AHCI support.
Any suggestions? Or is it impossible?


----------



## SirDice (Dec 6, 2011)

User23 said:
			
		

> I would like to TRIM two SSDs once that are connected on a normal ATA channel without AHCI support.
> Any suggestions?


Have a look with tunefs(8).


----------



## User23 (Dec 6, 2011)

The SSDs are used as ZFS cache usally. 

So, in order to trim them i would need to 

create a UFS on them with the trim enabled
fill the SSDs with data
delete all data

correct?

Well, i figured out that the SSDs need a new firmware to support TRIM, so i need to remove them from the FreeBSD machine anyway in order to flash them with the windows tools. I will "secure erase" them on this occasion with the Intel tools.


----------



## phoenix (Dec 6, 2011)

You don't need to TRIM an SSD used as an L2ARC device.  Writes are throttled to 8 MBps.  Even a clean, brand-new, just-opened SSD will not write data any faster than that when used as an L2ARC device.


----------



## mav@ (Dec 15, 2011)

User23 said:
			
		

> I would like to TRIM two SSDs once that are connected on a normal ATA channel without AHCI support.
> Any suggestions? Or is it impossible?



TRIM is not an NCQ command, so you don't need AHCI. Any ATA/SATA controller can do it.


----------



## mav@ (Dec 15, 2011)

User23 said:
			
		

> The SSDs are used as ZFS cache usally.
> 
> So, in order to trim them i would need to
> 
> ...



newfs has -E option to TRIM the media before creating FS, so you don't need last two steps.


----------



## alie (Dec 15, 2011)

Please do read this post: http://forums.freebsd.org/showpost.php?p=156112&postcount=6


----------

