Spindown time not respected

  • Hi all,


    First I would like to thanks the community and the dev of OMV. I decided to create my NAS a few month ago, and I have to say that would made an amazing work. Thanks a lot for that.

    As a quick intro here is my setup :

    -AsRock J4125

    -4x4Tb Seagate ironwolf

    -PCIe TO Sata card with 2x 256 gb SSD - One as system the other one as system backup


    Then I do have docker running on the NAS with a few container :

    -Hassio supervised for my home thermostat

    -AdGuardHome to secure my network

    -Filezella

    -FileBot

    -Plex server.


    The issue I'm facing is the spin down time. I did set it up to 60 min but I notice that the 4 HDD spin down after very short period of time. The main problem for me is that when I watch something with Plex I can hear the hard drive doing spin down, wake up vas soon as Plex need to cache. I didn't time it, but probably spin down every 5 min with a wake up after a 1 min.

    If I setup the spidown time as no spin down, the hard drive are going to stay awake all the time.


    From /etc/openmediavault/config.xml the settings seems correct :


    <apm>1</apm>

    <aam>128</aam>

            <spindowntime>244</spindowntime>


    Reboot after changing the settings don't seems to work as well.


    If you have any idea, please let me know.


    In advance, thanks for your help.


    Almaire

  • In my setup I also use disk spin down, but I never have changed any of the APM and AAM default settings. APM = 1 is a very aggressive power management setting. Therefore set Apm = 127 and try again. You also should have an eye on your SMART check intervall.

    OMV 3.0.100 (Gray style)

    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1) - Fractal Design Node 304 -

    3x WD80EMAZ Snapraid / MergerFS-pool via eSATA - 4-Bay ICYCube MB561U3S-4S with fan-mod

  • Hi cabio_leo,


    Sorry I didn't came back for a while now.

    I did set Apm = 127 but it's not bringing anything. After accessing the NAS, the disk spin down very fast.

    In general it's a bit annoying while working on the NAS that I need to wait for the HDD to spin up if I didn't use them for a few minutes.

    I tried to look for solution but I could not find anyone with the same problem.


    Grégoire

  • Hi Almaire, I am resurrecting this old post to ask for your help in installing Hassio Supervised on my NAS with OMV5 installed.
    I am not an expert at all and I do everything by following step by step the various ghiuidesn that I find on the net; yesterday following one of them, I managed to intall Hassio supervised but on the docker I could only see the eight hassio containers and of my previous conteniners I had no trace.
    Then, fortunately I solved it, but now, that I have the previous situation (before install hassio conteiner) I don't see hassio anymore.

    I hope you understood my bad English

  • I have some new insight into this, that I want to share. I found that my disks never go into standby despite I set a standby time in the menus. I did some testing and my hypothesis is:


    For some reason OMV is ignoring hdparm settings.


    What I did do prove that

    I have 2 identical disks sda and sdb - both can do standby via hdparm -y
    Both disks are configured in /etc/hdparm.conf with spindown_time = 120

    When I query their status after some quiet time with


    smartctl -n standby /dev/sda


    I get something like: Device is in IDLE_B mode for both devices. Sometines IDLE_A but never did I see STANDBY
    So I set the standby time manually with:


    hdparm -S 120 /dev/sda


    for one disk only and wait. After 10+ minutes I see the following:

    sda: Device is in STANDBY mode

    sdb: Device is in IDLE_B mode

    The drive that I configured manually did spin down - the other did not (there was no disk I/O in this time, in fact the drives were not even mounted). I repeated that multiple times and changed the drive that I configured manually. The result was always: Only those drive I configured manually via hdparm went into standby.


    My question


    Does somebody know, where the spindown time should be set during the init process of the system? So we can check, if this part is actually called or not? I already did check /lib/udev/hdparm -- it does not set spindown time (stripped at the end with the perl command)


    bye, ju

  • My current theory is: hdparm configuration is broken in current OMV (incl OMV6).

    In my understanding the settings in /etc/hdparm.conf should be implemented via udev in

    /lib/udev/hdparm (this file is executed when the device is discovered by udev).


    This script reads the conf file and correctly sets "-S120" but then strips it again here:


    Code
            # strip -S (spindown) and -B (apm), force_spindown_time and -q
            # apm options are handled by /usr/lib/pm-utils/power.d/95hdparm-apm
            OPTIONS=$(echo $OPTIONS | perl -pe 's/((-S|-B|force_spindown_time)[\d]{1,3})|(-q\s?)//g')


    I don't really understand why they do that - but the result is pretty clear. Setting a spindown time in OMV is simply ignored.
    A quick&dirty fix for this is: remove the "-S" from the perl command above. But I don't want to do that before I understand better, waht is happening there and why.

    Any ideas?

  • If you look into this file you see that it is never ever calling hdparm itself. It simply does some massaging of parameters.

    I stand by my claim: hdparm is never called during the init sequence of OMV to set spindown times.

    • Offizieller Beitrag

    I stand by my claim: hdparm is never called during the init sequence of OMV to set spindown times.


    If you check the source code


    it is calling hdparm if $apm_opt is not empty. But i don't know when thios script is called. If it does not work, then i think the problem should be raised upstream at the hdparm project. OMV is only generating the configuration file which is correct IMO because it is generated accrding the docs and is using /dev/sdX device names.


    P.S.:

    I think i've found the problem. It seems over the years they renamed the configuration option from spindown_time to force_spindown_time.


    P.P.S:

    According to the what i found, spindown_time is still correct, but is only applied to devices that support APM whereas force_spindown_time is applied to non-APM devices as well.. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930796

  • votdev

    Hat das Label gelöst hinzugefügt.
  • Thanks a lot for taking action votdev


    But did you check that this really solves the problem?

    Afair the script /usr/lib/pm-utils/power.d/95hdparm-apm is called before the stripping of -S* and one of the things I saw there was converting force_spindown_time into -S


    FYI The udev script is part of the Linux device manager infrastructure. It is called when a new device is discovered. hdparm-apm is some advanced power management stuff that I don’t know. But I think it is primarily for suspending/waking the whole system.

  • Sorry - I did not mean to cause you trouble or work.

    I was just trying to be helpful and provide some information.


    But checking if a fix really fixes the problem seems a good idea to me. If you want, I could check your fix if it does what it is supposed to do. Or I can keep my mouth shut and go away if you prefer that.

  • FYI: I checked the following on my system: I manually replaced spindown_time=120 by forced_spindown_time=120 and found that

    hdparm -S120 was executed as expected. So the fix should indeed work. Thanks again votdev for your work on this!


    Could someone tell me, how I can manually trigger a creation of /etc/hdparm.conf from the OMV config files?

  • Hi,


    at my system my spindown time is being ignored. I have set it up to 60 min in the gui for this seagate drive but it spin down at arround 10-15minutes. Its a seagte st14000vn0008. In my /etc/hdparm.conf ists configured as:


    }

    /dev/disk/by-id/ata-TS4TSSD230S_H730900073 {

    apm = 127

    force_spindown_time = 120

    write_cache = on

    }



    Can someone help me plz? I´ve also tried to run "omv-salt deploy run hdparm". My System is on Version 6.3.12-1 (Shaitan)

    Case: Supermicro 836 | Netzteil: Seasonic SS400-U1L | Mainboard: ASRock X470 Taichi | CPU: AMD Ryzen 7 Pro 4750G ,CPU | Kühler: Noctua NH-D9L | Ram: 64GB DDR4 SK Hynix 3200MHz | Controler: LSI 9400-16i HBA | Intel x710-DA4 | HDD: 2x Seagate exos 16TB, 1X Seagate ironWolf 14TB. 1x 2x Seagate exos 18TB | SSD: 1x Sandis plus 2TB, 1x Samsung evo 1TB, 1x WD green 480gb (OS), WD Red SN700 1TB

Jetzt mitmachen!

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