Guide: How-to setup 'hd-idle' (a HDD spin down SW) together with the OMV plugin 'Autoshutdown' in OMV 5.x.

  • Hey everybody,

    I'm happy to confirm the fix I've found works flawlessly!


    I was looking for a solution and I was inspired by this post. My solution uses the same logic but restarts hd-idle.

    1. Download the file attached
    2. Place it in /usr/lib/systemd/system-sleep/
    3. Remove the .txt extension
    4. Grant execution permissions chmod +x hd-idle-fix
    5. Reboot and enjoy

    You don't need to mess with systemctl anymore.

    If you had the previous fix installed, you can remove it by executing systemctl disable hd-idle-restart-resume.service and then deleting the actual file.

    Files

    OMV BUILD - MY NAS KILLER - OMV 5.x + omvextrasorg


    Core i3-8300 - ASRock H370M-ITX/ac - 8GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker), 3x4TB HDD (Data) - Fractal Design Node 304 - Be quiet! Pure Power 11 350W

  • I have to admit, I am starting to hate hd-idle. A week after my last post, hd-idle went inactive again.

    This is really annoying.


    2020-03-24 00-08-55-Window.jpg

    As there are 2 implementations named hd-idle I wonder which one you are using?

    a) Christian Mueller's hd-idle

    b) Andoni del Olmo's go port hd-idle

    omv 6.0.8 (Shaitan) on RPi CM4/4GB with 64bit Kernel 5.10.63

    2x 6TB 3.5'' HDDs formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 5.6.21-1 (usul) on RPi4/4GB with Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

  • As there are 2 implementations named hd-idle I wonder which one you are using?

    a) Christian Mueller's hd-idle

    b) Andoni del Olmo's go port hd-idle

    I was using the original hd-idle, but now I've switched to the new port to see if that makes a difference, in theory should have a fix for this scenario.


    But I can't understand why my parity drive is being woken up: it's only used for SnaprRAID parity which runs every day at midday, nothing else is running or mounted, but it is randomly woken. Does anybody know something to check?

    OMV BUILD - MY NAS KILLER - OMV 5.x + omvextrasorg


    Core i3-8300 - ASRock H370M-ITX/ac - 8GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker), 3x4TB HDD (Data) - Fractal Design Node 304 - Be quiet! Pure Power 11 350W

    Edited once, last by auanasgheps ().

  • Ich habe dasselbe Problem. Meine Platten RAID5 fahren nicht in den Spindown. Wie müßte der Befehl in der

    "sudo nano /etc/default/hd-idle" denn genau aussehen. Ich weiß nicht welche uuid ich nehmen muß.

    Code
    root@openmediavault ~ > sudo blkid
    /dev/sdb: UUID="4f01965b-6cbc-7509-7add-bd1265717b7a" UUID_SUB="253a04d1-6fb0-bd19-dac4-44766067d7a7" LABEL="openmediavault:NAS" TYPE="linux_raid_member"
    /dev/sda: UUID="4f01965b-6cbc-7509-7add-bd1265717b7a" UUID_SUB="b9b5beaf-0006-9a3b-ffde-3743c38ac119" LABEL="openmediavault:NAS" TYPE="linux_raid_member"
    /dev/sdc1: UUID="59b0d6fb-6ebf-422a-8f57-25d694ccef6f" TYPE="ext4" PARTUUID="b246a857-01"
    /dev/sdc5: UUID="8ebacbd5-c477-425d-bd3e-b081e978928f" TYPE="swap" PARTUUID="b246a857-05"
    /dev/sde: UUID="4f01965b-6cbc-7509-7add-bd1265717b7a" UUID_SUB="1798ab33-5189-2c8b-8f22-55a05903f9e5" LABEL="openmediavault:NAS" TYPE="linux_raid_member"
    /dev/md0: LABEL="NAS" UUID="1e88547b-0a2d-42d7-b07b-6fec145638fc" TYPE="ext4"
    /dev/sdd: UUID="4f01965b-6cbc-7509-7add-bd1265717b7a" UUID_SUB="ddd243cb-4d81-902a-b383-5f260f8a1b58" LABEL="openmediavault:NAS" TYPE="linux_raid_member"

    so habe ich es konfiguriert aber leider fahren die Platten nicht runter

    die 120 sec sind nur zum testen, werden bei gelingen auf 20 min (1200 sec) gesetzt.


    Das ganze Problem fing damit an das ich nextcloud über Docker/Portainer installiert habe. Vorher ging alles über hdparm. Seit dem habe ich das Problem

  • I can confirm the new rewrite of hd-idle by adelolmo is working fine without any additional fix/help, and has some improvements over the original version like enhanced logging which will show up in the syslog.


    To install the new rewrite, if you didn't install hd-idle before

    1. Choose a folder of your preference to download the installer, since it's not in a Debian repository.
    2. Download the latest package, linked here wget https://github.com/adelolmo/hd-idle/releases/download/v1.12/hd-idle_1.12_amd64.deb
    3. Install the package dpkg -i hd-idle_1.12_amd64.deb

    NEW! Alternatively, add the dev's repo following these instructions, then you'll be able to install hd-idle with apt-get install hd-idle and keep it updated since it's a package from a repo!

    1. Configure /etc/default/hd-idle following first posts instructions since configurations are the same.
    2. Run this command to enable the new hd-idle at boot systemctl enable hd-idle
    3. Run this command to start hd-idle right away systemctl start hd-idle
    4. Profit!

    To install the new rewrite, if you are already using the old hd-idle

    1. Backup your current hd-idle configuration at /etc/default/hd-idle . It shouldn't be removed, but you never know.
    2. Uninstall hd-idle with apt remove hd-idle
    3. Delete any additional fix used to slap hd-idle to wake up
    4. Remove the old hd-idle from system boot systemctl enable hd-idle - Not sure if needed, but won't hurt
    5. Follow the guide above from point 1.


    P.S. If you can help to improve this guide then please do it (thank you macom). If you like this guide then please show it. :)

    I think I could do it. Can I go ahead? I would like to consolidate all in a nice and clean post.

    OMV BUILD - MY NAS KILLER - OMV 5.x + omvextrasorg


    Core i3-8300 - ASRock H370M-ITX/ac - 8GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker), 3x4TB HDD (Data) - Fractal Design Node 304 - Be quiet! Pure Power 11 350W

    Edited 6 times, last by auanasgheps: fixed apt command ().

  • Most people would probably figure this out, but there's a trailing period inside the code block.


    Thanks to everyone who contributed to this thread! Big help.

    Thanks for the heads up, now it's fixed.

    OMV BUILD - MY NAS KILLER - OMV 5.x + omvextrasorg


    Core i3-8300 - ASRock H370M-ITX/ac - 8GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker), 3x4TB HDD (Data) - Fractal Design Node 304 - Be quiet! Pure Power 11 350W

  • I am having difficulties with the spindown as well and tried to get hd-idle working on my Odroid HC2.


    Install went fine, but when trying to start hd-idle it quits with the error "service is masked". So I can not even manually start the package.


    Any hints how to solve this?

  • I think I could do it. Can I go ahead? I would like to consolidate all in a nice and clean post.

    I agree with auanasgheps, he may release a new thread to summarize all useful parts of this thread. I'm late but the e-mail notifications from 'forum.openmediavault.org' are "lost" ...

    It is always nice to see that some else jumps in to finish an (otherwise endless) open topic. :-)

  • Appreciate the new guide, well done!


    Nevertheless there seems an additional safeguard required if hd-idle had been installed manually before.


    Issue:

    I had version 1.9 installed before the repository was available.

    Using the instructions for "REPOSITORY INSTALL" the version stays at 1.9


    Any hint how to fix this?


    log:

    ```

    root@nas:~# sudo apt-get install apt-transport-https

    wget -O - http://adelolmo.github.io/andoni.delolmo@gmail.com.gpg.key | sudo apt-key add -

    echo "deb http://adelolmo.github.io/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/adeReading package lists... Done

    Building dependency tree

    Reading state information... Done

    apt-transport-https is already the newest version (1.8.2.2).

    0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

    root@nas:~# wget -O - http://adelolmo.github.io/andoni.delolmo@gmail.com.gpg.key | sudo apt-key add -

    --2021-01-09 18:20:17-- http://adelolmo.github.io/andoni.delolmo@gmail.com.gpg.key

    Resolving adelolmo.github.io (adelolmo.github.io)... 185.199.110.153, 185.199.108.153, 185.199.111.153, ...

    Connecting to adelolmo.github.io (adelolmo.github.io)|185.199.110.153|:80... connected.

    HTTP request sent, awaiting response... 301 Moved Permanently

    Location: https://adelolmo.github.io/andoni.delolmo@gmail.com.gpg.key [following]

    --2021-01-09 18:20:17-- https://adelolmo.github.io/andoni.delolmo@gmail.com.gpg.key

    Connecting to adelolmo.github.io (adelolmo.github.io)|185.199.110.153|:443... connected.

    HTTP request sent, awaiting response... 200 OK

    Length: 954 [application/vnd.apple.keynote]

    Saving to: ‘STDOUT’


    - 100%[=================================================>] 954 --.-KB/s in 0.002s


    2021-01-09 18:20:17 (607 KB/s) - written to stdout [954/954]


    OK

    root@nas:~# echo "deb http://adelolmo.github.io/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/adelolmo.github.io.list

    deb http://adelolmo.github.io/buster buster main

    root@nas:~# apt-get install hd-idle

    Reading package lists... Done

    Building dependency tree

    Reading state information... Done

    hd-idle is already the newest version (1.9).

    0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

    root@nas:~#

    ```

    omv 6.0.8 (Shaitan) on RPi CM4/4GB with 64bit Kernel 5.10.63

    2x 6TB 3.5'' HDDs formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 5.6.21-1 (usul) on RPi4/4GB with Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

  • Is the Debian buster-backports version of hd-idle so old it isn't useful?

    omv 6.0.8-1 Shaitan | 64 bit | 5.15 proxmox kernel | omvextrasorg 6.0.5 | kvm plugin 6.0.3
    omv-extras.org plugins source code and issue tracker - github


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

  • Well from my understanding 1.9 has an important bug that got fixed only in 1.11

    "1.11 / 2020-10-31

    @adelolmo adelolmo released this on Oct 31, 2020 · 4 commits to master since this release


    Ignore sense response data for ata command to prevent error on arm64."

    omv 6.0.8 (Shaitan) on RPi CM4/4GB with 64bit Kernel 5.10.63

    2x 6TB 3.5'' HDDs formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 5.6.21-1 (usul) on RPi4/4GB with Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

  • Is the Debian buster-backports version of hd-idle so old it isn't useful?

    Yes, because the official Hd-idle has been abandoned and left with many bugs. There is a re-implementation in Go of hd-idle which is great and updated, but can only be added with another repo.

    Appreciate the new guide, well done!


    Nevertheless there seems an additional safeguard required if hd-idle had been installed manually before.

    I was in the same situation (the repo thing is pretty new) and I simply re-installed the package. The config file should not be deleted, but make a copy to be safe.

    OMV BUILD - MY NAS KILLER - OMV 5.x + omvextrasorg


    Core i3-8300 - ASRock H370M-ITX/ac - 8GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker), 3x4TB HDD (Data) - Fractal Design Node 304 - Be quiet! Pure Power 11 350W

  • today update to 1.12 arrived
    hd-idle/stable 1.12 armhf [upgradable from: 1.9]

    omv 6.0.8 (Shaitan) on RPi CM4/4GB with 64bit Kernel 5.10.63

    2x 6TB 3.5'' HDDs formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 5.6.21-1 (usul) on RPi4/4GB with Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

  • auanasgheps

    Hi,

    I've followed your guide, but none happened unfortunately. Can you pls help solve this annoying issue?

    System: rock 64 Transformer, OMV5.5

    I've followed your guide step by step. However, the log doesn't seem to be created, so I can't even tell what's causing all this

  • auanasgheps

    Hi,

    I've followed your guide, but none happened unfortunately. Can you pls help solve this annoying issue?

    System: rock 64 Transformer, OMV5.5

    I've followed your guide step by step. However, the log doesn't seem to be created, so I can't even tell what's causing all this

    Can you show the hd-idle configuration?

    Also run this command and show the output: service hd-idle status

    OMV BUILD - MY NAS KILLER - OMV 5.x + omvextrasorg


    Core i3-8300 - ASRock H370M-ITX/ac - 8GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker), 3x4TB HDD (Data) - Fractal Design Node 304 - Be quiet! Pure Power 11 350W

  • auanasgheps


    Config file is totally default

    Code
    START_HD_IDLE=true
    #...
    HD_IDLE_OPTS="-i 1200 -l /var/log/hd-idle.log"

Participate now!

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