# ext4 discard flag, trim on Intel 520 SSD

## gaebb3r

Hey together,

I have now set up my Gentoo on an Intel 520 SSD with a capacity of 60 GB.

Linux is booting extremely fast and quiet, just as expected.  :Very Happy: 

The filesystem for both - / and /boot - is ext4 which allows to enable trim on the SSD as native option. But before I enable this I need to know if this is already stable in order to prevent data loss.

Is any of you already using this trim command and wants to share his/her experience?

```
agph mw # cat /etc/fstab | grep /dev/sda

/dev/sda1               /boot                   ext4            defaults,noatime,data=ordered   1 1

/dev/sda3               /                       ext4            defaults,noatime,data=ordered   1 1

/dev/sda2               swap                    swap            defaults                        0 0
```

Many thanks for your help!

Cheers

----------

## geki

running since july 2011 - operating 24/7. survived some power-outages. so, nothing experienced so far ... luckily?!  :Rolling Eyes: 

 *Quote:*   

> /dev/sda1       /boot                   ext4    discard,noauto,noatime,nodiratime       1 2
> 
> /dev/sda2       /                       ext4    discard,noatime,nodiratime              0 1

 added nodiratime - being paranoid.  :Wink: 

----------

## asturm

I think trim support exists since 2.6.32 or so, it'd better be stable then by now  :Wink: 

----------

## gaebb3r

 *geki wrote:*   

> added nodiratime - being paranoid. 

 

Thanks for this "hint"...  :Wink: 

Which kind (manufacturer, type) of SSDs do you all use?

----------

## asturm

Got an Intel SSD 311 Series (SLC) in our server system, ext4 on it, since about half a year without issues.

Personally, I've put a Seagate Momentus XT 500 into my Laptop, it's got a 4GB OS-agnostic SLC cache inside. I still prefer that as a good fast access/data storage compromise when there's just one hdd slot available.

EDIT: discard is set as default anyway!

----------

## geki

got an intel 520 / 120gb

----------

## EatMeerkats

 *geki wrote:*   

> running since july 2011 - operating 24/7. survived some power-outages. so, nothing experienced so far ... luckily?! 
> 
>  *Quote:*   /dev/sda1       /boot                   ext4    discard,noauto,noatime,nodiratime       1 2
> 
> /dev/sda2       /                       ext4    discard,noatime,nodiratime              0 1 added nodiratime - being paranoid. 

 

Noatime implies nodiratime: http://lwn.net/Articles/245002/

----------

