Trim Not Enabled

  • 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.

  • 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 https://www.digitalocean.com/c…-storage-on-linux-servers
    relatime option in fstab and weekly trim like the above howto is recommend

    OMV 5.x always up to date.
    Modded dell t20 into 19" rack case with Pearl LCD Display (Status Display!)

    xeon e3-1225v3 / 32GB RAM / 1x500GB WD Blue SSD (OS) / 1x250 SSD (not used) / 1x1 TB Toshiba HHD (MultiDisk) / 4x 4TB WD40EFRX (Raid5)

  • Indeed OMV enables the trim option if it detects a non-rotational device, see https://github.com/openmediava…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 https://github.com/openmediava…age/storagedevice.inc#L92.

    Does it mean omv should add the noatime,nodiratime,discard in the fstab file?

    OMV 5.x always up to date.
    Modded dell t20 into 19" rack case with Pearl LCD Display (Status Display!)

    xeon e3-1225v3 / 32GB RAM / 1x500GB WD Blue SSD (OS) / 1x250 SSD (not used) / 1x1 TB Toshiba HHD (MultiDisk) / 4x 4TB WD40EFRX (Raid5)

  • Hello vot,


    According to the documentation, those options enabled by default, but I installed OMV3 a few months ago, and those options have to be added manually to my SSD.


    Was this a recent changes?

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

    • Offizieller Beitrag

    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 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    What's the easiest way to enable the trim?

    OS drive or data drive? Post cat /etc/fstab.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    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 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    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 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    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 https://wiki.archlinux.org/index.php/Fstab https://lwn.net/Articles/244941/


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


    BR Robert

    OMV 5.x always up to date.
    Modded dell t20 into 19" rack case with Pearl LCD Display (Status Display!)

    xeon e3-1225v3 / 32GB RAM / 1x500GB WD Blue SSD (OS) / 1x250 SSD (not used) / 1x1 TB Toshiba HHD (MultiDisk) / 4x 4TB WD40EFRX (Raid5)

  • 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?



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

    Any guide of how to accomplish this?

    • Offizieller Beitrag

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

    No.


    Do I need to install the plugin

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


    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.


    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.


    How can I check if all commands are already running?

    What commands? You worry too much.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    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?


    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?


    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 https://manpages.debian.org/st…il-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.

    • Offizieller Beitrag

    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."


    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.


    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.


    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.


    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.


    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.



    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 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!