Trim Not Enabled

    • OMV 3.x
    • antsh wrote:

      I have OMV 3.0.59 installed on an SSD (fresh install). I noticed looking at fstab that trim isn't enabled. I thought that omv enabled trim automatically on SSDs. Any reason why it might not have, and how can I turn it on?

      Thank you in advance.
      You shouldn't use anymore the discard option in fstab.
      Please have a look in here to activate trim digitalocean.com/community/tut…-storage-on-linux-servers
      relatime option in fstab and weekly trim like the above howto is recommend
      OMV 3.0.XX Erasmus always up to date.
      Modded dell t20 into 19" rack case / xeon e3-1225v3 / 8GB RAM / 1x 250 SSD (OS) / 4x WD10EADS (Raid5) (hdd running now for more than 5 years ;) )
    • Indeed OMV enables the trim option if it detects a non-rotational device, see github.com/openmediavault/open…vault/initsystem/60rootfs. If it does not work, then it was not possible to detect the SSD as non-rotational device via UDEV or Linux kernel, see github.com/openmediavault/open…age/storagedevice.inc#L92.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • votdev wrote:

      Indeed OMV enables the trim option if it detects a non-rotational device, see github.com/openmediavault/open…vault/initsystem/60rootfs. If it does not work, then it was not possible to detect the SSD as non-rotational device via UDEV or Linux kernel, see github.com/openmediavault/open…age/storagedevice.inc#L92.
      Does it mean omv should add the noatime,nodiratime,discard in the fstab file?
      OMV 3.0.XX Erasmus always up to date.
      Modded dell t20 into 19" rack case / xeon e3-1225v3 / 8GB RAM / 1x 250 SSD (OS) / 4x WD10EADS (Raid5) (hdd running now for more than 5 years ;) )
    • Yes, as said before, if a SSD is detected those options are set.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • tinh_x7 wrote:

      Was this a recent changes?
      No. Like Volker said, some SSDs aren't detected as non-rotational devices by the kernel. Since OMV 3.x is using a new kernel (and udev) now, more devices should be detected correctly. That said, not all SSDs support the discard option. My Samsung SSD 850 PRO 128G SSDs don't.
      omv 5.0.14 usul | 64 bit | 5.0 proxmox kernel | omvextrasorg 5.1.5
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • tinh_x7 wrote:

      What's the easiest way to enable the trim?
      OS drive or data drive? Post cat /etc/fstab.
      omv 5.0.14 usul | 64 bit | 5.0 proxmox kernel | omvextrasorg 5.1.5
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • tinh_x7 wrote:

      Add discard in the fstab entry is enough, right?
      For the OS drive, yes. Just make sure the drive supports it. If it was a data drive, you would need to edit the mntent entry (opts tag) in config.xml and then omv-mkconf fstab.
      omv 5.0.14 usul | 64 bit | 5.0 proxmox kernel | omvextrasorg 5.1.5
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • tinh_x7 wrote:

      What do you think?
      I don't worry about it. On a physical machine (which I don't use very often anymore), I leave it at whatever OMV defaults to. I use the flashmemory plugin on usb sticks and SSDs. So, I doubt the setting will make much of a difference.
      omv 5.0.14 usul | 64 bit | 5.0 proxmox kernel | omvextrasorg 5.1.5
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • @votdev
      I read something in the internet that nodiratime is not need if noatime is activated.
      Link wiki.archlinux.org/index.php/Fstab lwn.net/Articles/244941/

      Activation of weekly ftrim is very easy see the link i posted.

      BR Robert
      OMV 3.0.XX Erasmus always up to date.
      Modded dell t20 into 19" rack case / xeon e3-1225v3 / 8GB RAM / 1x 250 SSD (OS) / 4x WD10EADS (Raid5) (hdd running now for more than 5 years ;) )
    • no_Legend wrote:

      @votdev
      I read something in the internet that nodiratime is not need if noatime is activated.
      Link wiki.archlinux.org/index.php/Fstab lwn.net/Articles/244941/

      Activation of weekly ftrim is very easy see the link i posted.

      BR Robert
      But it does not hurt when it is specified
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • ryecoaaron wrote:

      I don't worry about it. On a physical machine (which I don't use very often anymore), I leave it at whatever OMV defaults to. I use the flashmemory plugin on usb sticks and SSDs. So, I doubt the setting will make much of a difference.
      Long time since someone edits here but why make a new since it already exists. So I use as an OS an ssd drive Intel 128gb if I can recall correctly. Did things changed and trim is auto supported without extra steps?

      As for the flash memory plugin, is there a solution with the possibility to make the system read only (as tecnodad life mentions). I have already setup and configure the system and i would not like to start from scratch but since i use an ssd it would be great to set it up as proper as it can be. Do I need to install the plugin or the etc/fstab folder already exists and I only have to add the ext4 noatime, nodirtime errors=remount -ro (does thsi mean read only?)0 1 and why he is commenting out # the UUID corresponding to swap??

      How can I check if all commands are already running?

      A better way to achieve enabling of trim command?


      no_Legend wrote:

      Activation of weekly ftrim is very easy see the link i posted.
      Any guide of how to accomplish this?
    • ieronymous wrote:

      As for the flash memory plugin, is there a solution with the possibility to make the system read only
      No.

      ieronymous wrote:

      Do I need to install the plugin
      If you want to reduce writes to the ssd, then you would need to install the plugin.

      ieronymous wrote:

      I only have to add the ext4 noatime, nodirtime errors=remount -ro (does thsi mean read only?)
      This is optional even on usb sticks. Yes, the ro means it mounts / read only if there is an error.

      ieronymous wrote:

      why he is commenting out # the UUID corresponding to swap??
      Most systems don't need swap and swap writes a lot to your drive if you use it. Once again, this is optional especially with an ssd.

      ieronymous wrote:

      How can I check if all commands are already running?
      What commands? You worry too much.
      omv 5.0.14 usul | 64 bit | 5.0 proxmox kernel | omvextrasorg 5.1.5
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • @ryecoaaron your answer to my question if there was a solution with the possibility to make the system read only, you clearly answered no but inside my fstab there is already the line ext4 errors=remount -ro . Doesnt this mean its already read only?

      ryecoaaron wrote:

      If you want to reduce writes to the ssd, then you would need to install the plugin.

      If you check below, you can see that without installing the flash plugin I could easily go to the fstab and change the appropriate lines noatime, nodirtime...etc. What is the point of installing that plugin if in both cases (install it or not) you have to manually enter the fstab and make the changes?

      Source Code

      1. # /etc/fstab: static file system information.
      2. #
      3. # Use 'blkid' to print the universally unique identifier for a
      4. # device; this may be used with UUID= as a more robust way to name devices
      5. # that works even if disks are added and removed. See fstab(5).
      6. #
      7. # <file system> <mount point> <type> <options> <dump> <pass>
      8. # / was on /dev/sda1 during installation
      9. UUID=d7d2d854-8e20-4474-a580-ec762ece7877 / ext4 errors=remount-ro 0 1
      10. # swap was on /dev/sda5 during installation
      11. UUID=998f9df7-3fff-4ff4-9833-0ffa4d26a91a none swap sw 0 0
      12. tmpfs /tmp tmpfs defaults 0 0
      13. # >>> [openmediavault]
      14. /dev/disk/by-id/ata-INTEL_SSDSCKKW128G8_BTLA817310JH128I-part3 /srv/dev-disk-by-id-ata-INTEL_SSDSCKKW128G8_BTLA81$
      15. /dev/disk/by-label/Muz /srv/dev-disk-by-label-Muz ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,gr$
      16. /dev/disk/by-id/ata-WDC_WD40PURZ-85TTDY0_WD-WCC7K1EF7H4A-part1 /srv/dev-disk-by-id-ata-WDC_WD40PURZ-85TTDY0_WD-WC$
      17. /dev/disk/by-label/New\x20Volume /srv/dev-disk-by-label-New\040Volume ntfs defaults,nofail 0 2
      18. # <<< [openmediavault]
      Display All

      ryecoaaron wrote:

      Most systems don't need swap and swap writes a lot to your drive if you use it. Once again, this is optional especially with an ssd.
      So should I just comment out the UUID=998f9df7-3fff-4ff4-9833-0ffa4d26a91a none swap sw and it wont use swap anymore? Does this mean that ram is going to be used instead and I should have aspecific amount always free? (something like zfs?)


      I ve read this info manpages.debian.org/stretch/util-linux/fstrim.8.en.html but no clear example (at least for me) on how I could use the command to my ssd drive. Could you help with this (I mean the command)
      I dont want to use fstrim -a and interacts somehow negative with my spinning drives (in case any errors occur)

      Finally should I add the options above noatime, nodirtime etc as in the tecnodad videos or not?

      Isnt there any clear answer likke you have an ssd do this and that and get over.

      The post was edited 1 time, last by ieronymous ().

    • ieronymous wrote:

      your answer to my question if there was a solution with the possibility to make the system read only, you clearly answered no but inside my fstab there is already the line ext4 errors=remount -ro . Doesnt this mean its already read only?
      I answered that in my previous post - "the ro means it mounts / read only if there is an error."

      ieronymous wrote:

      If you check below, you can see that without installing the flash plugin I could easily go to the fstab and change the appropriate lines noatime, nodirtime...etc. What is the point of installing that plugin if in both cases (install it or not) you have to manually enter the fstab and make the changes?
      noatime,etc only reduce writes very little. This is why they are optional. Just changing those will not help anywhere near as much as installing the flashmemory plugin which uses ram for the most heavily written directories. Once again, installing the plugin is good enough. Making the changes to fstab are optional and probably won't extend the life of the media by much. I just added them it is one more thing to tweak the write reduction.

      ieronymous wrote:

      So should I just comment out the UUID=998f9df7-3fff-4ff4-9833-0ffa4d26a91a none swap sw and it wont use swap anymore?
      Yes, commenting that out will stop swap from being used.

      ieronymous wrote:

      Does this mean that ram is going to be used instead and I should have aspecific amount always free? (something like zfs?)
      It means if your system runs out of ram, it has nothing to use and the system will crash/reboot/something.

      ieronymous wrote:

      Could you help with this (I mean the command)
      I dont want to use fstrim -a and interacts somehow negative with my spinning drives (in case any errors occur)
      I don't use it.

      ieronymous wrote:

      Finally should I add the options above noatime, nodirtime etc as in the tecnodad videos or not?
      The flashmemory plugin was written for sd cards and usb sticks. SSDs have wear leveling and last much longer. If you are ultra paranoid (and you seem to be), add them. I have backups so I don't worry about a drive lasting a possible few weeks longer.


      ieronymous wrote:

      Isnt there any clear answer likke you have an ssd do this and that and get over.
      I thought there was a clear answer. Just install the flashmemory plugin and move on to the next thing you want to do with your server.
      omv 5.0.14 usul | 64 bit | 5.0 proxmox kernel | omvextrasorg 5.1.5
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!