Jump to content

warwolf7

Members
  • Posts

    26
  • Joined

  • Last visited

Community Answers

  1. warwolf7's post in disk spinning up after less than a minute, Even with docker completely disabled was marked as the answer   
    SOLVED : CONCLUSION : 
    my feb25th hypothesis was correct
    The command "btrfs filesystem show 32f96308-aa9a-4c86-b799-d222f4af4a75" was causing all disks to spinup because it couldn't find the UUID requested. That command was issued by /usr/local/emhttp/plugins/dynamix/scripts/monitor that took that information from the "/var/local/emhttp/disks.ini" file that probably gets populated from the files in this directory /boot/config/
    The dynamix monitor is called every minute from a cron job in "/etc/cron.d/root"
     
    The UUID in the config file in /boot/config/pools/ are left empty, why? That would be my question. In my case, my older pool config had an uuid that became invalid (or always have been I don't know) when the array failed due to bad ram and I reformatted 1 of the 2mirror drive in that pool and removed the other drive. That UUID was left in the config file of the pool. When I removed that uuid, the monitor script stopped waking all disk every minutes.
     
    It is my understanding that unraid created that problem somewhere during one of those manipulation because I have never played with any of those files prior to this investigation 🔍
    Proposition 1 to unraid
    Look at what happens when you create a pool array with 2 devices. remove one device, reformat the other one and look at the UUID in the config file. (I can't recreate that, I don't have unused disk right now) Why is there not UUID in the btrfs pool config file? Why did I have one before but not my new one. Was there a changes in the code from previous versions?
    Also look for other cases that can create that type of wrong UUID, there might be more that just mine.
    Proposition 2 to unraid
    The monitor script also fails to recognized the error and send a notification regarding that error. 
     
    if (exec("/sbin/btrfs filesystem show "._var($disk,'uuid')." 2>/dev/null|grep -c 'missing'")>0) { we can see here that it only looks for 'missing' but when a filesystem is not found, it actually return ERROR:
    ERROR: not a valid btrfs filesystem: 6790d0c5-bc2f-499f-a9cb-5b5bf6f03d0z
    This should be changed to 'ERROR'
    But since this script execute every minute, and the next section creates a warning on an error notification. it could potentially flood an unraid admin with warning email. Which could be too much.
    (I wish I could create a pullrequest, but I couldn't find the repo on github, the only one I found was 8years old and the code did not match the one in unraid current release)
    However, proposition1 has to be implemented first, otherwise, a lot of users might get wrong warnings.
    notes:
    @foo_fighter
    do you use the unassigned plugin? if so, I suggest you update it. This is in the changelog
    >Fix: Zpool operation that kept disks from spinning down.
     
     
    Thank you
    Thank you everyone that took a look at my thread and for help and guidance along my route. 
     
    finally
    Big hurray to me, I have very very basic knowledge of any of this. So congrats to me for finding it. It can potentially affect a lot of users. Please unraid acknowledge in this thread that something will be done.
×
×
  • Create New...