Page 4 of 4 FirstFirst ... 234
Results 31 to 33 of 33

Thread: Do I need to enable TRIM?

  1. #31

    Default Re: Do I need to enable TRIM?

    I have the custom firmware in the meantime, support was very helpful yesterday (we played email ping pong for some hours). :-)
    Kind regards


  2. #32

    Default Re: Do I need to enable TRIM?

    I currently don't have Tumbleweed installed, but I just made a fresh install of Leap 15.1 on a SSD during which I did not format the existing encrypted /home (luks, created with Leap 42.3). I just deleted the hidden files there (yes, I have a backup of the folder .thunderbird and the bookmarks of firefox).
    Installation is done and most things run smooth now.

    With still one exception:

    # fstrim -v /
    /: 17.8 GiB (19079819264 bytes) trimmed
    # fstrim -v /home
    fstrim: /home: the discard operation is not supported
    From this it is obvious that in this case the output of

    # systemctl status fstrim.timer
    ● fstrim.timer - Discard unused blocks once a week
       Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; enabled; vendor preset: enabled)
       Active: active (waiting) since Tue 2019-09-10 11:26:08 CEST; 1h 1min ago
      Trigger: Mon 2019-09-16 00:00:00 CEST; 5 days left
         Docs: man:fstrim
    is completely irrelevant with respect to /home, because fstrim may be run by some timer from time to time, but if fstrim doesn't even work for /home if run manually, then it won't work if run automatically either - with the difference that in the latter case the user won't even take notice of that!
    So, what should one say if the user trusts that everything with respect to trim is setup well in this case: happy wear?

    The crypttab file generated by the 15.1 installer
    cr-auto-3  /dev/sdb6
    is a disaster, at least for having /dev/sdb6 instead of some /dev/disk/by-uuid/... or /dev/disk/by-id/... .

    Under previous versions of Leap/openSUSE I did spend a bit of time getting fstrim work for an encrypted /home .

    A question that I have: is the situation with respect to that better in Tumbleweed than in Leap 15.1 ?

  3. #33

    Default Re: Do I need to enable TRIM?

    After some back and forth I finally got fstrim working for /home again for Leap 15.1 - this time even using UUIDs ...

    For the sake of completeness: the fstab generated by the installer was
    UUID=36c9cf12-4e80-4838-bed6-f3b0b8f2d796  /      ext4  noatime,acl,user_xattr,nodiratime  0  1
    UUID=c9711634-b09e-4167-8c08-b172e600c3e2  /home  ext4  noatime,acl,user_xattr,data=ordered,nodiratime  0  2
    UUID=76cca290-a1ef-43e8-b295-a3a704857f9e  swap   swap  defaults  0  0
    (I entered the parameter 'nodiratime' at "Arbitrary Option Value" in the "Fstab Options" of the partitioner).

    In this the UUID of /home is the UUID of the volume within the encrypted partition, which can not be known unless that partition is decrypted or made accessible by the encryption algorithm.

    Now I changed crypttab from (c.f. previous posting).
    cr-auto-3  /dev/sdb6
    cr_home  /dev/disk/by-uuid/b5ee7005-3b4a-440b-9e58-d75836ae6101  none luks,discard
    In the latter the UUID is the UUID of the (outer) partition that contains the encrypted volume, which can be known at boot, and which is not the same as the UUID for the (inner) volume with /home in the above version of fstab.

    After that I changed fstab to
    UUID=36c9cf12-4e80-4838-bed6-f3b0b8f2d796  /      ext4  noatime,nodiratime,acl,user_xattr  0  1
    /dev/mapper/cr_home                        /home  ext4  noatime,nodiratime,acl,user_xattr,data=ordered,nofail 0 2
    UUID=76cca290-a1ef-43e8-b295-a3a704857f9e  swap   swap  sw,discard  0  0
    In this, I included the parameter 'discard' for swap after looking around at the internet a bit, but I didn't get to know a way to actually check if that really works.
    Does somebody here know about such a way?

    And the parameter 'nofail' for /home in this version of fstab should help to at least be able to log in to a root session if one should ever forget the password for the encrypted /home ...

    After these changes to crypttab and fstab and rebooting I got
    # fstrim -v /home
    /home: 27.4 GiB (29455220736 bytes) trimmed
    So, now TRIM is enabled for my encrypted /home in my installation of 15.1 - which it was not, before!
    Should work for Tumbleweed too, right?

Page 4 of 4 FirstFirst ... 234

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts