OMV spins up HDDs around 7:35 am

  • Hi there,


    the hard drives in my NAS spin down after an hour if they are not used. I noticed that the drives spin up without any reason in the morning always at around 7:35 am. At this time there are no other devices active in the network, so I guess it is some OMV internal scheduled task accessing the drives. Do you guys have any idea what task or service that may be?


    Best,
    Aiakos

  • Look at all your crontabs and see is there are any set to run at that time.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • The only one in /etc/cron.d is anacron:

    Code
    # /etc/cron.d/anacron: crontab entries for the anacron package
    
    
    SHELL=/bin/sh
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    
    
    30 7    * * *   root    test -x /etc/init.d/anacron && /usr/sbin/invoke-rc.d anacron start >/dev/null


    So I guess I should have a look at the jobs that anacron runs. How can I do this?

  • Anacron will lookup /etc/anacrontab.


    First default anacron job on my install is:

    Code
    1       5       cron.daily      run-parts --report /etc/cron.daily


    In anacron format, this is every day, 5 minutes past when anacron is invoked (which as per your crontab, is 7:30am)
    There are a few cronjobs in here that could be responsible, depending on your config.


    If you're using a software RAID, I think the most likely is openmediavault-mdadm, which monitors for changes in RAID (NewArray, DegradedArray or SparesMissing) and notifies any named addresses in /etc/mdadm/mdadm.conf

  • Hi Haikoen, thanks for your reply!


    This is a full list of scripts in my /etc/cron.daily folder:

    Code
    0anacron      man-db                      openmediavault-mdadm                   samba
    apt           mlocate                     openmediavault-pending_config_changes  sysstat
    bsdmainutils  ntp                         openmediavault-samba-recycle
    dpkg          openmediavault-cron-apt     passwd
    logrotate     openmediavault-flush-mailq  quota


    I do not use a software RAID which is why I don't think that this is the cause. However, on all my drives are samba shares and some use (but not all) use the recycle bin feature of the sambda plugin. Could that be the cause? I'm not quite sure because none of the shares on one specific disk use the recycle bin but this disk gets woken up, too.

  • Thank you for the hint with the script. I tried it with all three of my data drives this morning. At 7:35 two of the woke up (sdb and sdd), while sdc maintained standby. Unfortunately the script did not output any information after it detected that the drive was awake.


    So either activating the block dump did not work, or this was an access which is not recorded in the block dump. What could that be - just a reading access?


    Code
    root@omv:~# ./find_culprit.sh sdb
    Putting the disk sdb into standby...
    Checking the status of sdb.
    Drive is still in standby.  Sleeping 45 seconds...
    Drive is still in standby.  Sleeping 45 seconds...
    Drive is still in standby.  Sleeping 45 seconds...
    Drive is still in standby.  Sleeping 45 seconds...
    Drive is awake!
    root@omv:~#


    I will try using the script again as soon as I have time...


    Edit: Going through the script again, I noticed that (de) activating the block dump is not disk specific but global. So, as far as I understand, having multiple instances of this script running at the same time will result in deactivating the block dump and thus the other instances of the script wont be able to find anything in de dump once their drive wakes up. I'll try it with only one disk next time.

  • Today, all three drives woke up. While there were still no entries for sdb and sdc, the block dump for sdd shows two entries:

    Code
    Drive is awake!
    [74455.733541] updatedb.mlocat(26784): READ block 5310054712 on sdd (8 sectors)
    [74462.091576] updatedb.mlocat(26784): READ block 5310181568 on sdd (8 sectors)


    I am fairly sure that updatedb.mlocat is the reason for my drives waking up, since it is called in cron.daily.


    Now my question is: Can I savely deactivate this cronjob or does OMV somehow depend on it? I already uninstalled the "locate" plugin, but this did not deactivate the cronjob.

    • Offizieller Beitrag

    Delete the cron job.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


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


    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!

  • If you want your locate database to be kept reasonably current then you will have to update it manually.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

Jetzt mitmachen!

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