I have a Thinkpad X60s with an OSZ agility SSD. I use ext2.

I read that I should execute the trim command from time to time, however, this command doesn't work on my machine:

boris@boris-ThinkPad-X60s:~$ fstrim /
fstrim: /: FITRIM ioctl failed: Inappropriate ioctl for device

What will be the consequences of me not using it? Will it affect speed, SSD life etc?

Why isn't the command working and what are the possible solutions to get it working?

2 Answers 2


Update: I wrote the answer below before seeing you were using ext2. I keep the answer for reference in case anyone else has a similar problem because of LUKS or LVM.

For your case however the anser is different: ext2 does not support trimming, only ext4 or btrfs do.

----- original answer -----

Make sure to activate trim support on all filesystem abstraction layers. In particular, LVM and / or dm-crypt come to mind here!

  1. Activate trim support in lvm: /etc/lvm/lvm.conf

    issue_discards = 1
  2. Activate trim support in dm-crypt/luks: /etc/crypttab

    sda1_crypt UUID=<YOUR_DISKS_UUID> none luks,**discard**

    (adapt to your UUID and partition)

  3. write changes to your initrd:

    sudo update-initramfs -u
  4. reboot

  • fstrim works with all ext*, only ext4 and btrfs do it automaticly on deletion of files
    – borrel
    Oct 29, 2013 at 1:31
  • @borrel I'm seeing it not work with ext3 Jan 23, 2014 at 3:09
  • @NormanRamsey for me it works, unless you have snapshots of the volume in lvm
    – borrel
    Feb 3, 2014 at 15:55

You need to run fstrim as root. Try:

sudo fstrim /

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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