Best configuration NAS HDD for Plex Server and Samba

  • Hi,

    Openmediavault works really really great on my Raspberry pi 5 8GB with a NVME. I moved from using only raspbian OS with desktop to this: just beatifull.


    I was playing with some configurations, and I ended up on the section Storage > Disk. So I selected my external HDD.

    This is the screen:


    I've read online that some people set the spindown time to 5 minutes. However, I believe the HDD automatically shuts down when not in use, as after leaving it idle for several hours, I can hear it spin up again when I try to upload a file. Is it usefull? should I use it?

    Also I read that Enabling the write-cache should be an advantage, because it firstly stores the file in RAM and then in the HDD, or am I wrong?

    What would be the best configuration for using the system as a Samba server (I use it about once a week) and a Plex server?


    Thanks everybody!

  • chente

    Approved the thread.
  • Tizfaver

    Changed the title of the thread from “Best configuration for HDD spin-down with Plex” to “Best configuration NAS HDD for Plex Server and Samba”.
    • New
    • Official Post

    Regarding whether or not to stop the hard drives, you will have to decide for yourself. There are opinions in both directions. Stopping the hard drive (theoretically) saves power when it is stopped. I say theoretically because you will have to see the consumption of the hard drive during starts and stops and how many times you are going to do it at the end of the day.

    On the other hand, stopping and starting hard drives causes their mechanical part to wear out more quickly, reducing their useful life. So if you want to value saving real money by configuring automatic stopping and starting of the hard drive, you will also have to consider the cost of replacing a prematurely damaged hard drive.

    My personal opinion, for what it's worth, is that it is preferable to never stop the hard drives of a NAS and let them run 24/7, which is what they are designed for. But, as I said, this is just a personal opinion.

    You will find a lot of information on Google about this topic if you do a search.


    Regarding whether or not to enable the cache, I would tell you to enable it if you have a UPS and leave it disabled if you don't have a UPS. In reality, any NAS, and this is again a personal opinion, should be connected to a UPS, that will save you a lot of headaches. But if it isn't, at least disable the cache to lose as little data as possible in the event of a power outage.

    • New
    • Official Post

    I believe the HDD automatically shuts down when not in use

    I assume the HDD is in an USB connected enclosure. In that case it might well be that the USB-to-sata controller is spinning down the drive. You might be able to change the time with a software provided by the supplier of the case.

  • This is why lately I am considering changing my CORE OS from OMV [With NAS Drives] to a Proxmox core OS and run OMV as a VM and "pass through" the Hardware RAID 26TB NAS Drive that way if ever OMV needs a reboot, the NAS drives are not 'on off on off' depending on needed OMV reboots.


    Would this be a legitimate reason to transition to Proxmox as a core OS over OMV, so the drives stay ON while OMV reboots if needed?

    • New
    • Official Post

    Would this be a legitimate reason to transition to Proxmox as a core OS over OMV, so the drives stay ON while OMV reboots if needed?

    In my opinion that is no reason to virtualize OMV. The reboots that Debian may require in OMV will be more or less the same as those that Proxmox may require. So you would be in the same situation. And anyway I don't think those reboots are significant in the useful life of the hard drives.

    To virtualize OMV I think there should be other reasons and I really don't know of any compelling reason. On the few occasions when I have considered virtualizing OMV, it has always seemed like unnecessary complexity without any obvious advantage.

    • New
    • Official Post

    In this thread I am giving some opinions that are personal and often controversial, even though I try to contain myself. I'm sure there are many other opinions against some of mine. But life is like that, it is full of contradictions and controversies. LOL

  • So, based on your opinion, the best configuration seems to be to never stop the drives, as suggested in these threads:

    To Spin or Not to Spin: What’s Best for Drive Life

    How Spinning Down Disks Affects Life

    However, I’m still not 100% convinced about keeping them always active. I wonder if the saved power might offset the cost of the HDDs. For context, I paid $120 for a 10TB 3.5” HDD: Amazon link.

    I’m aiming for the best lifespan for my HDDs, considering that I use Plex once a day (though sometimes I don’t use it for a few days). But now that I think about it, when I watch Plex, the app buffers about 5 minutes or more of video before playback starts (so I think the HDD spin down). So, maybe I should increase the spin-down delay to something like 20 minutes instead of the default? so for like 20 hours a day it should be stopped and not spinning.


    Apologies, I’m still a bit confused on this!

    • New
    • Official Post

    I wonder if the saved power might offset the cost of the HDDs.

    I'm almost convinced that it doesn't pay off in any case, but I can't generalize. That depends on the cost of energy in your country and the cost of replacing the hard drive, so you will have to do your numbers. The really difficult thing is determining the reduction in the useful life of the hard drive if you stop and start it continuously.

    • New
    • Official Post

    Did you find some data which show a correlation between lifetime and spin down/spin up frequency? Those could give a hint based on the user scenario.

    It's not easy to find that kind of information, but for example through the truenas forum link provided by the OP you can access this Google report. https://static.googleuserconte…archive/disk_failures.pdf

    The user who links to it in that forum concludes that the absolute failure rate for units 3 years old or older can increase beyond 2%. But we cannot forget that this data is extracted from a specific hardware environment studied by Google. So that 2% may not be extrapolated to another environment at all.

    In any case, even if you find a very exhaustive report, it will still be statistical. It may give a general idea but nothing more.

    What seems to be demonstrated in any way is that stopping and starting the hard drive influences its useful life. And in the end we return to the starting point, the difficult thing is to quantify and compare with energy savings.

  • Ok, so from what i understand, this would be a balanced solution:


    so NO SPINDOWN and minimum acoustic output?
    with this configuration, i get maximum speed that my router can handle:
    download from server:

    :

    upload to server:


    BUT from what i hear, the disk is still spinning down... because after a while, when I try access the disk, I can hear the disk spinning up. Could this be a problem with the Raspberry pi 5?

    • New
    • Official Post

    I guess so, that seems reasonable. Anyway, keep in mind the information that Macom gave you about the USB enclosure.

    The SATA-USB adapter in that enclosure has its own firmware and depending on how it is designed it could completely ignore any configuration you make in the OMV GUI. Then you will have to check if what you have configured is actually being respected. If you see that this is not the case, you may have no choice but to investigate the manufacturer's website to explore the configuration options, if they exist. Generally, this process usually involves connecting the cabinet to a Windows PC, installing some type of software, configuring the cabinet according to your preferences, and once configured, connecting it back to the NAS.

  • Something I haven't seen anyone mention (or I missed it.) Generally a specific CMR model designed for NAS by Seagate has a 5 yr warranty and is covered for 24x7 operation. Conversely their SMR type drives that are generally the cheapest come with 2 yr warranties and there may be fine print that they won't be covered if they were run 24x7 (they can get the load/unload cycle counts from SMART.) I didn't see your model number but Google is your friend on this one.

    7.4.16-1 (Sandworm)

    Raspberry Pi 4 Model B Rev 1.5

    Linux 6.6.62+rpt-rpi-v8

  • Ok i fixed the spindown problem on my raspberry pi. To do this i created a service that every 30 seconds triggers the HDD:
    1) create the file .sh:

    Code
    sudo nano /usr/local/bin/prevent_spindown.sh

    this is the content:

    Bash
    #!/bin/bash
        while true; do
        touch /dev/sda/.keepalive
        sleep 30
    done

    2) made it exectuable:

    Code
    sudo chmod +x /usr/local/bin/prevent_spindown.sh


    3) then i created a service:

    Code
    sudo nano /etc/systemd/system/prevent_spindown.service

    inside the service file

    4) then enable and start the service

    Code
    sudo systemctl enable prevent_spindown.service
    sudo systemctl start prevent_spindown.service


    So now I hope this will increase the HDD life time!


    Thanks everybody for your time!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!