On ubuntu 14.04 how do you check if TRIM is on for an SSD drive? Other settings worth verifying for an SSD drive?

share|improve this question

To see the details for your weekly cron jobs, change directory to /etc/cron.weekly or include it in the command as below:

more /etc/cron.weekly/fstrim 

You should see an output which looks something like:

#!/bin/sh
# trim all mounted file systems which support it
/sbin/fstrim --all || true

If this is present trim is active/checked and executed once a week. The help on this command will show you...

fstrim --help

Usage:
 fstrim [options] <mount point>

Options:
 -a, --all           trim all mounted filesystems that are supported
 -o, --offset <num>  the offset in bytes to start discarding from
 -l, --length <num>  the number of bytes to discard
 -m, --minimum <num> the minimum extent length to discard
 -v, --verbose       print number of discarded bytes

 -h, --help     display this help and exit
 -V, --version  output version information and exit

To see if trim is supported (change sda if you have more than 1 disks):

sudo hdparm -I /dev/sda | grep "TRIM supported"

and it should show something similar to this:

*   Data Set Management TRIM supported (limit 8 blocks)
share|improve this answer
1  
FWIW, this works as shown in Ubuntu 15.04 as well. – John T Jun 13 '15 at 4:47
    
I read somewhere that this trim option is supported only on Samsung and Intel SSDs? Is this true? – Ljiljan Veselinovic Apr 29 '16 at 5:27
    
@LjiljanVeselinovic those at least. But others do too. My OCZ works as well for instance, – Rinzwind Apr 29 '16 at 6:37
    
I bought Trascent 370S. Trim is supported. Is Ubuntu 16.04 going to perform this job periodically? – Ljiljan Veselinovic Apr 30 '16 at 6:52
    
yes once a week (see cron.weekly ;) ) – Rinzwind Apr 30 '16 at 6:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.