Jump to content

Unassigned Devices - Managing Disk Drives and Remote Shares Outside of The Unraid Array


Recommended Posts

I am pretty new to Unraid and I have the following problem related to Unassigned Devices:

 

I run a VM with FreeNAS on Unraid and I pass through all the hard disks that FreeNas uses (those disks I leave as unassigned in Unraid). This all works fine, however, as I manage a media server which is sometimes only accessed a few times per month I need to let the disks spin down. This all works perfectly fine on a bare metal FreeNas install without Unraid, hence it is not a FreeNas issue. 

 

This does not work, however with Unraid as hypervisor and hence my asking what in Unraid wakes Unassigned Devices and what can I do to avoid it. I saw, for example, that even when manually spinning down unassigned devices in Unraid that as soon as I click on the 'VM' tab the unassigned devices are spun up again. Is there a way to completely hide certain drives from Unraid? It has already cost me a lot of time and headache to pinpoint the issue and I would hope there is a solution, after all those are unassigned devices which Unraid should NEVER touch in any event not even "poke" via S.M.A.R.T checks. 

 

Is there any solution out I have overlooked or could someone chime in how to tackle this issue?

 

Thanks a lot, and aside this issue, Unraid is awesome, 

 

Matt

 

 

 

Link to comment
On 1/30/2016 at 9:20 PM, dlandon said:

 

The plugin sets a 15 minute idle time with 'hdparm -S180' to the device when it is mounted.  You could issue a no idle time to the device in the script when it is mounted with 'hdparm -S0'.  This tells the drive to never go to the idle (spin down) mode.  The script will look like this:

 


#!/bin/bash
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
## Available variables: 
# AVAIL      : available space
# USED       : used space
# SIZE       : partition size
# SERIAL     : disk serial number
# ACTION     : if mounting, ADD; if unmounting, REMOVE
# MOUNTPOINT : where the partition is mounted
# FSTYPE     : partition filesystem
# LABEL      : partition label
# DEVICE     : partition device, e.g /dev/sda1
# OWNER      : "udev" if executed by UDEV, otherwise "user"

case $ACTION in
  'ADD' )
    // do your stuff here
    echo "Added"
    hdparm -S0 $DEVICE 
;;

  'REMOVE' )
    // do your stuff here
    echo "Removed"
  ;;
esac
 

 

 

You'll have to do the same thing on unmount if you want the drive to not enter the idle mode.

 

This won't work until the next release because currently the sleep time is set after the drive script is executed.  I changed this to be before the drive script is executed in the next release.

 

Caveat: The drive has to accept the 'hdparm -S0' command.

 

I want to achieve the opposite, to spin down unassigned devices. Somehow I cannot spin down the devices, neither via Gui and using this plugin nor in the terminal with hdparm. I think I found what the issue might be, in the post I reference here you state that only mounted devices will be affected by this plugin and the 15minute idle time before devices are spun down. 

 

However, I have devices (which I pass through in VMs) that hold zfs_member paritions and cannot be mounted in UnRaid. Could this be the problem why none of the settings in Unraid (with UD plugin installed or not) can cause my unassigned disks to spin down? If only mounted devices can be spun down what can I do to have my zfs_member partition holding disks, that cannot be mounted, spun down? Ideally I don't want Unraid in any way affect unassigned and unmounted devices but it in fact does, there is no way for me to spin down those particular disks at the moment. Is this intended or something that has not been considered? 

 

I guess the simpler question to ask is : How can I prevent unassigned and unmounted disks from spinning up and more importantly how I can make them spin down and stay spun down in case they spun up during boot? 

 

 

 

Edited by Matt173
Link to comment
7 hours ago, Matt173 said:

I am pretty new to Unraid and I have the following problem related to Unassigned Devices:

 

I run a VM with FreeNAS on Unraid and I pass through all the hard disks that FreeNas uses (those disks I leave as unassigned in Unraid). This all works fine, however, as I manage a media server which is sometimes only accessed a few times per month I need to let the disks spin down. This all works perfectly fine on a bare metal FreeNas install without Unraid, hence it is not a FreeNas issue. 

 

This does not work, however with Unraid as hypervisor and hence my asking what in Unraid wakes Unassigned Devices and what can I do to avoid it. I saw, for example, that even when manually spinning down unassigned devices in Unraid that as soon as I click on the 'VM' tab the unassigned devices are spun up again. Is there a way to completely hide certain drives from Unraid? It has already cost me a lot of time and headache to pinpoint the issue and I would hope there is a solution, after all those are unassigned devices which Unraid should NEVER touch in any event not even "poke" via S.M.A.R.T checks. 

 

Is there any solution out I have overlooked or could someone chime in how to tackle this issue?

 

Thanks a lot, and aside this issue, Unraid is awesome, 

 

Matt

 

 

 

Posting this same issue all over the forum does not help you get an answer and is not appropriate.  Please post in the appropriate thread and be patient for an answer.

 

See this:

 

Link to comment
27 minutes ago, Matt173 said:

 

No, I pass the disks to the VM. But it cannot be the issue as my unassigned (and unmounted) disks do not spin down even when I do not run any VM at all. 

 

I don't know but I was thinking perhaps if the VM had the disk controller then unRAID wouldn't and so Unassigned Devices wouldn't know about the disks.

Link to comment
1 minute ago, trurl said:

I don't know but I was thinking perhaps if the VM had the disk controller then unRAID wouldn't and so Unassigned Devices wouldn't know about the disks.

yes, I thought it might be a possibility and tested that initially but quickly excluded this possibility. It is an issue of UnRaid touching disks that are unassigned and not even mounted and I believe that should not be the case. If I wanted UnRaid to handle those disks I would mount them or even add them to the array. I am just not sure at this point whether it is a bug and unintended or an issue on my hardware end or there is a reason I don't current grasp why UnRaid keeps those disks spinning. 

Link to comment
7 minutes ago, Matt173 said:

yes, I thought it might be a possibility and tested that initially but quickly excluded this possibility. It is an issue of UnRaid touching disks that are unassigned and not even mounted and I believe that should not be the case. If I wanted UnRaid to handle those disks I would mount them or even add them to the array. I am just not sure at this point whether it is a bug and unintended or an issue on my hardware end or there is a reason I don't current grasp why UnRaid keeps those disks spinning. 

Please click on this post and read.  It is potentially a bug.

 

Link to comment
14 minutes ago, dlandon said:

Please click on this post and read.  It is potentially a bug.

 

I saw it but it does not directly relate to the issue I described. Without touching a thing and waiting hours none of the unassigned/unmounted disks spin down, I double-checked there were no system messages generated during that time span. 

 

By the way, and I am not addressing you with this at all, this has been an issue for years, many users brought it up, were ignored, and when they reminded others of this issue they were criticized and shot down. If this is a bug then it has been pointed out uncountable times and perhaps it was the reason I posted across threads because it cost me many hours of debugging and pinpointing issues. But I apologize for cross posting and can delete the other posts in other threads.

 

The problem description really is rather simple: Unassigned disks, unmounted, and still UnRaid holds a tight grip on power management of those disks (something that has also been denied in multiple threads). I don't want to come across as being hostile but after all this is a for-pay software (again, I don't address you here or your volunteer efforts) but those are facts and they don't relate to any controllers or hardware resources because power management works perfectly fine when running other apps outside of UnRaid, such as a bare metal FreeNas setup. 

Edited by Matt173
Link to comment
13 minutes ago, Matt173 said:

 

I saw it but it does not directly relate to the issue I described. Without touching a thing and waiting hours none of the unassigned/unmounted disks spin down, I double-checked there were no system messages generated during that time span. 

 

By the way, and I am not addressing you with this at all, this has been an issue for years, many users brought it up, were ignored, and when they reminded others of this issue they were criticized and shot down. If this is a bug then it has been pointed out uncountable times and perhaps it was the reason I posted across threads because it cost me many hours of debugging and pinpointing issues. But I apologize for cross posting and can delete the other posts in other threads.

 

The problem description really is rather simple: Unassigned disks, unmounted, and still UnRaid holds a tight grip on power management of those disks (something that has also been denied in multiple threads). I don't want to come across as being hostile but after all this is a for-pay software (again, I don't address you here or your volunteer efforts) but those are facts and they don't relate to any controllers or hardware resources because power management works perfectly fine when running other apps outside of UnRaid, such as a bare metal FreeNas setup. 

Here is how to get resolution to your problem:

- Boot your server without any plugins and then post a defect report with LT describing the issue with a diagnostics report if it occurs without any plugins installed.

- If it occurs with plugins installed, add plugins one by one to determine which one causes the problem.  Then post on the appropriate plugin thread what you see.

 

There are a lot of very talented and helpful people here that provide excellent support on this forum.  I can see you are frustrated and want a resolution to your issue, but you need to take your intensity down a notch and give us a chance to help you.  Support may seem to be slow at times, but most forum support is provided by people like me that do it as a part time effort.  We do have day jobs and get back to you as soon as we can with help.

Link to comment
1 minute ago, dlandon said:

Here is how to get resolution to your problem:

- Boot your server without any plugins and then post a defect report with LT describing the issue with a diagnostics report if it occurs without any plugins installed.

- If it occurs with plugins installed, add plugins one by one to determine which one causes the problem.  Then post on the appropriate plugin thread what you see.

 

There are a lot of very talented and helpful people here that provide excellent support on this forum.  I can see you are frustrated and want a resolution to your issue, but you need to take your intensity down a notch and give us a chance to help you.  Support may seem to be slow at times, but most forum support is provided by people like me that do it as a part time effort.  We do have day jobs and get back to you as soon as we can with help.

 

I appreciate your suggestions and sorry if I came across as being abrasive. I have not installed any plugins and experienced the same issues. Then I added the Unassigned Devices plugin with same results. I will post a report with LT, thanks for your suggestion. 

Link to comment

If I understand your posts correctly, it seems to me that the unassigned device spins up due to activity of the VM.

 

Devices which are unassigned in stock unRAID do not have a spin-down timer. Hence once a unassigned device is spun up, it requires a manual action to spin it down and currently the only way to do this is, is CLI. Of course you are free to post a feature request a describe how and why to improve the current implementation.

 

  • Upvote 1
Link to comment
3 minutes ago, bonienl said:

If I understand your posts correctly, it seems to me that the unassigned device spins up due to activity of the VM.

 

Devices which are unassigned in stock unRAID do not have a spin-down timer. Hence once a unassigned device is spun up, it requires a manual action to spin it down and currently the only way to do this is, is CLI. Of course you are free to post a feature request a describe how and why to improve the current implementation.

 

 

a) With FreeNAS running on a VM within UnRaid and trying to spin down the passed-through disks , failure. However, FreeNAS alone (outside of a VM) perfectly spins down devices when configured to do so, all on 100% identical hardware.

b) With all VMs turned off or not even any configured VMs present, I observed the following (the following all applies to unassigned/unmounted devices):

b1) The disks spin up upon boot and never spin down again without any further intervention

b2) Instructing the disks to spin down via hdparm with various idle timeouts does NOT spind down any disks

b3) Without the Unassigned Devices Plugin, clicking on an individual disk to spin them down, spins down the disk but as soon as I tab onto the "VM" tab or other tabs in Unraid all spun-down disks are again spun up and stay spun up.

b4) With the Unassigned Devices Plugin, only when I mount a disk will the disk after some time spin down. However, this is not a feasible solution because the file system is zfs (FreeNAS) and the disks with this file system cannot be mounted. 

 

This is where I stand at the moment, what I described is not just one bug but at least 3-4 different bugs that all relate to spinning down disks. 

 

Link to comment

@Matt173 

(b1) is as described above by @bonienl 

(b2) It sounds like you're using hdparm -S## to set a spin-down timer. Have you tried hdparm -y to spin down immediately instead?

(b3) I don't see that behaviour. Clicking the VMs tab doesn't spin up unassigned disks.

(b4) Yes, ZFS formatted disks can't be mounted using this plugin.

 

Take a look at @trurl's suggestion of passing through the disk controller to your VM. That's your best chance of achieving what you want, I think.

Link to comment
2 hours ago, bonienl said:

If I understand your posts correctly, it seems to me that the unassigned device spins up due to activity of the VM.

 

Devices which are unassigned in stock unRAID do not have a spin-down timer. Hence once a unassigned device is spun up, it requires a manual action to spin it down and currently the only way to do this is, is CLI. Of course you are free to post a feature request a describe how and why to improve the current implementation.

 

@limetech, @bonienl

 

Would it be possible to include all Unassigned Disks in the spin down timer management?  I'm talking about the generic unRAID without the UD plugin.

 

I could then remove the timer setting in UD and let unRAID manage the spin down.  Seems cleaner and would better prepare UD for inclusion into unRAID.

Link to comment
20 hours ago, John_M said:

@Matt173 

(b1) is as described above by @bonienl 

(b2) It sounds like you're using hdparm -S## to set a spin-down timer. Have you tried hdparm -y to spin down immediately instead?

(b3) I don't see that behaviour. Clicking the VMs tab doesn't spin up unassigned disks.

(b4) Yes, ZFS formatted disks can't be mounted using this plugin.

 

Take a look at @trurl's suggestion of passing through the disk controller to your VM. That's your best chance of achieving what you want, I think.

 

re (b1), I understand and that was not what I was referring to as "bug", what is a bug is that there is currently no way to spin the unassigned, unmounted disks down anymore. 

re (b2), I tried both and neither a timer nor the -y parameter spins down the disks. 

re (b3), it is a behavior that I observe and can reproduce, I admit there is a possibility this might be the case because I pass those unassigned/unmounted disks through to a VM. But even when that VM is stopped and not running but still tabbing on "VM" in UnRaid spins up those decides. 

re(b4), that I understand and it makes sense, 

 

however, none of your comments above address the real problem which is that unassigned and unmounted disks are spun up and then UnRaid stubbornly refuses to let go of its hold on those disks, neither third party apps can spin those disks down anymore, nor any command in the terminal/shell. If UnRaid indeed did not impact any of the unassigned/unmounted disks then surely a third party application or a terminal command should allow the disks to be spun down. I can safely exclude hardware issues because in a clean ubuntu install I can easily spin the disks down and a bare metal FreeNas install without UnRaid involvement does spin down the disks. 

 

The logical conclusion must be that UnRaid does somehow prevent any other application nor the OS to spin down those unassigned and unmounted disks and that is imho definitely the wrong way to go about things and most likely a bug or oversight. At this point I will not proceed with a paid license and most likely will seek alternative solutions other than UnRaid to solve my particular use case. 

 

I am more than willing to help pinpoint and debug this issue but the above observations are solid, reproducible, and verifiable. 

 

Edited by Matt173
Link to comment
47 minutes ago, Matt173 said:

I am more than willing to help pinpoint and debug this issue but the above observations are solid, reproducible, and verifiable. 

 

Can you force a device into standby mode, using hdparm -y /dev/sdX and read its status using hdparm -C /dev/sdX, do you see its status change?

 

It is not normal that devices spin up by accessing the VM page.

Link to comment
1 hour ago, rh535 said:

When I plug my external USB drive into a USB 3.0 port on my Dell PowerEdge T20 server it isn't recognized. When I plug the device into a USB 2.0 port it is recognized immediately. My external drive is USB 3.0.

 

Any ideas on how to fix this?

Is USB 3.0 enabled in your bios?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...