1. Home
  2. Docs
  3. Hardware and Network
  4. Harddisks and Partition
  5. Solid State Disk TRIM
  6. Periodic TRIM

Periodic TRIM

[Source: Periodic_TRIM]

Warning: Users need to be certain that their SSD supports TRIM before attempting to use it. Data loss can occur otherwise!

check if your drive support it:

sudo hdparm -I /dev/sdx | grep TRIM 

(change to the drive letter (x) you want to check)

make sure util-linux is installed:

sudo pacman -S util-linux hdparm --needed

check what you have already running:

cat /etc/fstab

if your drive shows like this:

/dev/sda1 / ext4 defaults,discard 0 1

continous TRIM is enabled! what in my opinion is bad to use as it will put system under continous load…

enable periodic TRIM:

remove discard option from your device inside fstab that it looks like this:

/dev/sda1 / ext4 defaults 0 1

Starting the scheduler to trim device/s once a week::

sudo systemctl start fstrim.timer
sudo systemctl enable fstrim.timer

to check if it works see:

systemctl status fstrim.timer

Follow us
Was this article helpful to you? Yes 4 No

How can we help?