Announcement

Collapse
No announcement yet.

fstab entries in KDEneon (for SSD)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] fstab entries in KDEneon (for SSD)

    I recently did a fresh install of KDEneon for testing purposes on a spare partition of one of my SSDs and discovered that the installer added "discard" to the options of / in etc/fstab (file system is ext4).

    On all my other ext4 partitions (no matter which distribution, if /, /home, or …) I purely rely on fstrim/fstrim.timer and have never used the discard option.
    Fstrim.timer is also activated in KDEneon by default, afaik.

    Kick "discard" from my fstab or not? That is the million dollar question!
    (Disclaimer: No, I really don't have a million dollars - but I am thankful for any justified pros and cons. )

    PS: I just saw on another system that Lubuntu 22.04 did the same: adding "discard". Strange, as Kubuntu 22.04 has never done this (yet?).
    Last edited by Schwarzer Kater; Dec 13, 2022, 10:31 AM. Reason: added PS
    Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
    Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

    get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
    install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

    #2
    General consensus is that enabling discard in fstab is a bad idea. I've not seen that happen automatically on any of my installs, but that may be due to file system choice - I almost always use BTRFS.

    The reason it's considered bad (or at least a poor choice) is that trim is activated at every write to the disk, possibly hurting performance and causing excessive wear to an SSD.

    The default and preferred way is to use the fstrim.timer function, which is enabled by default I believe. To see if you have it enabled, enter this in a console:

    Code:
    sudo systemctl status fstrim.timer

    You should see this:
    Code:
    ● fstrim.timer - Discard unused blocks once a week
        Loaded: loaded (/lib/systemd/system/fstrim.timer; enabled; vendor preset: enabled)
        Active: active (waiting) since Mon 2022-12-12 18:21:18 EST; 17h ago
       Trigger: Mon 2022-12-19 01:29:47 EST; 5 days left
      Triggers: ● fstrim.service
          Docs: man:fstrim
    ​

    Please Read Me

    Comment


      #3
      Originally posted by Schwarzer Kater View Post
      PS: I just saw on another system that Lubuntu 22.04 did the same: adding "discard". Strange, as Kubuntu 22.04 has never done this (yet?).
      Lubuntu is using Calamares as the installer, as is neon, while Kubuntu is using the normal *buntu Ubiquity installer. This would explain the differences in install options. This must be its standard options for this, or rather an option the end user (the distro) needs to set, maybe?

      https://github.com/calamares/calamares/issues/1395
      Last edited by claydoh; Dec 13, 2022, 11:50 AM.

      Comment


        #4
        Thank you both!

        oshunluvr: Yes, that is exactly what I knew about "discard" in fstab so far - so I disabled it in KDEneon now (I thought there could be something "special" about KDEneon I was not aware of…).

        claydoh: Very good explanation why this could have happened.
        Last edited by Schwarzer Kater; Dec 13, 2022, 12:20 PM.
        Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
        Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

        get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
        install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

        Comment


          #5
          Just if somebody is interested in this topic: Garuda KDE - using btrfs as the default file system - has fstrim.timer disabled and has "discard=async,ssd" options in /etc/fstab.

          https://www.phoronix.com/news/Btrfs-Async-Discard
          Last edited by Schwarzer Kater; Dec 15, 2022, 03:14 PM.
          Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
          Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

          get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
          install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

          Comment


            #6
            Just to add my 2C. Neon also installed the discard option when I did a completely clean install. I just added my own mount points and left the rest alone.

            UUID=blahblahblah /boot/efi vfat defaults,noatime 0 2
            UUID=blah-blah-blah-blah / ext4 defaults,noatime,discard 0 1
            UUID=blah-blah-blah-blah /home ext4 defaults,noatime,discard 0 2
            tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0​

            1nvme Evo970 (root & home - neon autogen)
            2 SSD Evo 860 (custom mount)
            1 SSD Evo 840 (custom mount)
            Last edited by ShadYoung; Jan 03, 2023, 07:42 PM.

            Comment

            Working...
            X