You are not logged in.

#1 2021-01-11 18:40:05

d.ALT
Member
Registered: 2019-05-10
Posts: 23

Period TRIM: how to enable discard on SATA SSD drives only?

My storage is composed like this:

  • 1* Samsung SSD 850 PRO 256GB [SATA] (/dev/sda)

  • 1* WDC WDS256G1X0C-00ENX0 [NVMe] (/dev/nvme0n1)

  • 4* Rotational mechanical HDDs [SATA]

# lsblk --discard 
NAME        DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
sda                0      512B       2G         0
└─sda1             0      512B       2G         0
sdb                0        0B       0B         0
├─sdb1             0        0B       0B         0
├─sdb2             0        0B       0B         0
├─sdb3             0        0B       0B         0
└─sdb4             0        0B       0B         0
sdc                0        0B       0B         0
└─sdc1             0        0B       0B         0
  └─md127          0        0B       2T         0
sdd                0        0B       0B         0
└─sdd1             0        0B       0B         0
  └─md127          0        0B       2T         0
sde                0        0B       0B         0
└─sde1             0        0B       0B         0
  └─md126          0        0B       2T         0
sdf                0        0B       0B         0
└─sdf1             0        0B       0B         0
  └─md126          0        0B       2T         0
sdg                0        0B       0B         0
└─sdg1             0        0B       0B         0
nvme0n1            0        4K       2T         0
├─nvme0n1p1        0        4K       2T         0
└─nvme0n1p2        0        4K       2T         0

I was wondering how to enable periodic TRIM only on Samsung SSD 850 PRO 256GB [SATA].


Thanks!

Offline

#2 2021-01-11 19:14:36

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,625
Website

Re: Period TRIM: how to enable discard on SATA SSD drives only?

Follow https://wiki.archlinux.org/index.php/So … iodic_TRIM then edit fstrim.service, something like this in override.conf should do it:

[Unit]
ExecStart=
ExecStart=/usr/bin/fstrim /path/to/Samsung/mountpoint

Last edited by Head_on_a_Stick (2021-01-11 19:23:50)

Offline

Board footer

Powered by FluxBB