• TRIM (again)


    Hello

    I am wondering if Antergos sets TRIM to enabled on a fresh install. I have a NVME SSD and would like to set a periodic trim job. There seem to be different ways of doing this and I am not sure if Antergos comes with it enabled.

    Hope someone can help me.

  • Don’t know if it’s just me, but on my laptop I have to manually add the “discard” (trim) option to the partition entries in fstab after installing it.

  • adding discard inside fstab is enabeling continious TRIM.
    to get periodic trim you need to remove discard option from fstab and enable the fstrim-timer:
    sudo systemctl enable fstrim.timer
    To make sure it works start it once:
    sudo systemctl start fstrim.timer

    then it do trimming once a week:

    systemctl status fstrim.timer
    ● fstrim.timer - Discard unused blocks once a week
       Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; enabled; vendor preset: disabled)
       Active: active (waiting) since Mon 2018-10-08 14:38:57 CEST; 9min ago
      Trigger: Mon 2018-10-15 00:00:00 CEST; 6 days left
         Docs: man:fstrim
    

    SOURCE: https://wiki.archlinux.org/index.php/Solid_state_drive#TRIM

    as far as i know Antergos is using continious trimming with discard option inside fstab for ssd drives…

  • @joekamprad said in TRIM (again):

    as far as i know Antergos is using continious trimming with discard option inside fstab for ssd drives…

    I can be wrong, at least that’s how it was …

  • as far as i know Antergos is using continious trimming with discard option inside fstab for ssd drives…

    I can confirm that. I installed Antergos to my new laptop this Summer, and in /etc/fstab there is the discard option on the main disk (SSD) by default.

    It may be more desirable to TRIM the SSD weekly (by the service) than continuously (with /etc/fstab option).
    So if you enable fstrim.service, then you probably want to remove the discard option on your SSD drive(s) in /etc/fstab.

  • https://github.com/Antergos/Cnchi/issues/792

    discussed this some times ago at github and also on forum…

  • @knightfall Yes this was the case with my former laptop as well. It was an Asus Zenbook UX31E. It had the “discards” from the beginning.

    On my new Laptop XPS 13 the fstab looks like this:

    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    #
    UUID=8b9633c8-eb8d-475f-aaa3-7c0dd5cf8c39 /boot ext4 defaults,relatime,data=ordered 0 0
    UUID=8873cca1-ebd2-43c2-82ff-47f32fdfb537 / ext4 defaults,relatime,data=ordered 0 1
    UUID=288db7a7-9afe-4c4c-bab0-30a66f6397a5 swap swap defaults 0 0
    

    @joekamprad Thanks for your adive I’ll try that.

  • @joekamprad

    That’s what I got:

    [[email protected] ~]$ sudo systemctl is-enabled fstrim.timer
    [sudo] Passwort für amilopowers: 
    disabled
    [[email protected] ~]$ sudo systemctl enable fstrim.timer
    Created symlink /etc/systemd/system/timers.target.wants/fstrim.timer → /usr/lib/systemd/system/fstrim.timer.
    [[email protected] ~]$ sudo systemctl start fstrim.timer
    [[email protected] ~]$ systemctl status fstrim.timer
    ● fstrim.timer - Discard unused blocks once a week
       Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; enabled; vendor preset>
       Active: active (waiting) since Mon 2018-10-08 20:39:36 CEST; 17s ago
      Trigger: Mon 2018-10-15 00:00:00 CEST; 6 days left
         Docs: man:fstrim
    
    Okt 08 20:39:36 Polar systemd[1]: Started Discard unused blocks once a week.
    lines 1-7/7 (END)
    
    

    I think your answer solved my question, thanks.

trim4 Posts 8Views 241
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.