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


Recommended Posts

11 hours ago, dlandon said:

All I see is a lot of mounting and unmounting.  DId you have issues when you provided the diagnostics?

Yeah, I tried to remount a few times, but had to reboot the server to get them back up. Since then, the stand-up mount has gone "limp" and come back up by it's own. Now i see that the series-mount has gone "limp". I can still use the media on the shares, but I cannot brows the shares, and plex can't scan the share for new content. It's quite strange. I'll add a new diagnostics.

unraid02-diagnostics-20200527-1520.zip

Link to comment
10 minutes ago, TrondHjertager said:

Yeah, I tried to remount a few times, but had to reboot the server to get them back up. Since then, the stand-up mount has gone "limp" and come back up by it's own. Now i see that the series-mount has gone "limp". I can still use the media on the shares, but I cannot brows the shares, and plex can't scan the share for new content. It's quite strange. I'll add a new diagnostics.

unraid02-diagnostics-20200527-1520.zip 134.56 kB · 1 download

I see nothing in the log that indicates any issues mounting and unmounting or accessing the remote shares.

 

How is Plex accessing the share?  How are you trying to browse the share?

Link to comment
1 minute ago, TrondHjertager said:

I have tried that, but then I get an execution error and have to restart the entire server to get Plex back up again :(

What is the execution error?  What Plex docker are you using?  Your issue sounds like it is with Plex.

Link to comment
Just now, dlandon said:

What is the execution error?  What Plex docker are you using?  Your issue sounds like it is with Plex.

Looks like a generic error. I tried unmounting the shares, and then remounting them. Then I could start plex without rebooting the server. I am using the offcial Plex docker. Seems a bit strange that it is the docker thats the problem. I cannot brows the mounted shares with krusader when they go "limp". I have had the krusader docker turned off since these problems began just to see if that could somehow cause problems.

 

28_05.2020_12_24.40_REC.png.ea78520d8766e2c7f8cdf7dae06e2ae0.png

 

Link to comment
11 minutes ago, TrondHjertager said:

Looks like a generic error. I tried unmounting the shares, and then remounting them. Then I could start plex without rebooting the server. I am using the offcial Plex docker. Seems a bit strange that it is the docker thats the problem. I cannot brows the mounted shares with krusader when they go "limp". I have had the krusader docker turned off since these problems began just to see if that could somehow cause problems.

 

28_05.2020_12_24.40_REC.png.ea78520d8766e2c7f8cdf7dae06e2ae0.png

 

That error doesn't help a lot.

Link to comment
1 minute ago, TrondHjertager said:

I know. I just don't know where to find anything else. Will that error show in the diagnostics-thing? As I said, I'm really new to Linux/Unraid, I'm sorry :(

 

Others in this forum are better at solving docker issues than I am.

Link to comment

How to disable the "Force User = nobody" option for SMB shares?

I want to use the actual usernames on those shares (like with regular Unraid shares) and not the "nobody" user.  

In general more control over the SMB settings would be nice (e.g. changing the share name or permissions for individual drives and not all of them).  

 

Or am I just blind and not seeing those options?

Edited by Thx And Bye
Link to comment
7 hours ago, Thx And Bye said:

How to disable the "Force User = nobody" option for SMB shares?

This setting does not control user access.

7 hours ago, Thx And Bye said:

I want to use the actual usernames on those shares (like with regular Unraid shares) and not the "nobody" user.  

Access is controlled by the UD settings and is set by user for all UD shared devces.  This is how Unraid share access is controlled, except UD does not set access by share.

7 hours ago, Thx And Bye said:

In general more control over the SMB settings would be nice (e.g. changing the share name or permissions for individual drives and not all of them).  

You can change the share name by changing the mountpoint.  There is no plan to add user access control by share.

Link to comment
4 hours ago, dlandon said:

This setting does not control user access.

But it controls the Unix user used. I'd like not to use the "nobody" user but the username of the account that accesses the share.   

The regular Unraid shares also do it that way, so why use " nobody" for UD shares?

Edited by Thx And Bye
Link to comment
1 hour ago, dlandon said:

How are you using the remote share?

I only use the shares in the local network but there are four people using them. That is just for the UD shares, not the ones on the array.  

I just want more fine grained control over who can delete files in specific folders. 

If I execute this:  

#!/bin/bash
for file in /etc/samba/unassigned-shares/*.conf; do
    sed -i '/Force User = nobody/d' $file
done

(It also has some other logic to determine if the config was changed to then reload samba) I get exactly the fine grained control over the write permissions that I need. I can have a folder with 755 permissions that others can read but only I can write to.

Link to comment
11 hours ago, Thx And Bye said:

I only use the shares in the local network but there are four people using them. That is just for the UD shares, not the ones on the array.  

I just want more fine grained control over who can delete files in specific folders. 

If I execute this:  


#!/bin/bash
for file in /etc/samba/unassigned-shares/*.conf; do
    sed -i '/Force User = nobody/d' $file
done

(It also has some other logic to determine if the config was changed to then reload samba) I get exactly the fine grained control over the write permissions that I need. I can have a folder with 755 permissions that others can read but only I can write to.

You set per user access in the UD settings.  This is the same way that Unraid does user access.

Link to comment

I got an external USB hard drive (WD Elements). When I put it to sleep via 'hdparm -y /dev/sdb'  and click on the main tab (or refresh it), the 'Unassigned Devices' section refreshes (takes a few seconds) and wakes up the external drive again. I can reproduce this, pinning the wake up of the drive exactly to the time refreshing the main tab.

 

* The drive is formatted with ZFS

* "PASS THRU" is enabled

* Auto Mount USB Devices set to No

 

Why does the plugin wake up the drive? After troubleshooting the issued rescan command on refresh here (/sbin/udevadm trigger --action=change 2>&1) wakes up the drive. Can I exclude the drive from the plugin without removing the plugin? I don't want the plugin to interact with this respective drive.

 

Is it possible to disable rescan on page refresh? Can I remove the "Unassigned devices" section from the main tab only displaying it in the plugin section? Other solutions?

Edited by T0a
Link to comment
57 minutes ago, T0a said:

Why does the plugin wake up the drive?

If "Pass Thru" is set, the disk should not wake up.  I suspect your disk is waking up when UD checks the disk size.

58 minutes ago, T0a said:

After troubleshooting the issued rescan command on refresh here (/sbin/udevadm trigger --action=change 2>&1) wakes up the drive.

That is executed only if you click on the rescan disks icon.

1 hour ago, T0a said:

Can I exclude the drive from the plugin without removing the plugin?

Not really.  With "Pass Thru" set the disk should not wake up.

59 minutes ago, T0a said:

 

Is it possible to disable rescan on page refresh?

It is not executed.

Link to comment
21 minutes ago, dlandon said:

It is not executed.

I see, then I had the wrong suspect here, sry. Should have read the code in more depth to get a better grasp.

 

21 minutes ago, dlandon said:

If "Pass Thru" is set, the disk should not wake up.  I suspect your disk is waking up when UD checks the disk size.

Okay, any ideas what could be improved to prevent the wake up then? Do you think disabling of checking the size when PASS THRU is enabled would be a good solution? People might want to see the disk usage even if they pass-through the drive. Can you point me to the code part?

 

Would it be an option to make it optional to show the "Unassigned Devices" section in the main tab?

 

For the time being I removed the "Unassigned Devices" section from the main tab by editing the header of "UnassignedDevices.page". The change will be reverted when I update the plugin though.

 

Edited by T0a
Link to comment
5 hours ago, T0a said:

Okay, any ideas what could be improved to prevent the wake up then? Do you think disabling of checking the size when PASS THRU is enabled would be a good solution? People might want to see the disk usage even if they pass-through the drive.

I'm working on a solution, but I can't be sure the disk size query is the issue.  Most likely it is.  Pretty much nothing else is queried when a disk is marked as passed through.

 

When the disk is passed through it is managed by the docker or vm where the disk is passed through.  There really is no value in UD displaying the disk size.

5 hours ago, T0a said:

Would it be an option to make it optional to show the "Unassigned Devices" section in the main tab?

No.  This is totally contrary to the Unraid UI design.  It would also a solution to a single use case and I don't code UD for special cases.

5 hours ago, T0a said:

Should have read the code in more depth to get a better grasp.

The UD code is not an easy read.

Link to comment
5 hours ago, T0a said:

Okay, any ideas what could be improved to prevent the wake up then? Do you think disabling of checking the size when PASS THRU is enabled would be a good solution? People might want to see the disk usage even if they pass-through the drive.

I'm working on a solution, but I can't be sure the disk size query is the issue.  Most likely it is.  Pretty much nothing else is queried when a disk is marked as passed through.

 

When the disk is passed through it is managed by the docker or vm where the disk is passed through.  There really is no value in UD displaying the disk size.

5 hours ago, T0a said:

Would it be an option to make it optional to show the "Unassigned Devices" section in the main tab?

No.  This is totally contrary to the Unraid UI design.  It would also a solution to a single use case and I don't code UD for special cases.

5 hours ago, T0a said:

Should have read the code in more depth to get a better grasp.

The UD code is not an easy read.

Link to comment
5 hours ago, dlandon said:

I'm working on a solution, but I can't be sure the disk size query is the issue.  Most likely it is.  Pretty much nothing else is queried when a disk is marked as passed through.

 

Let me know if I could assist you with testing e.g. I can grap the changes from a Github branch and modify my Unraid installation when you don't want to push a release yet.

Link to comment
1 hour ago, T0a said:

 

Let me know if I could assist you with testing e.g. I can grap the changes from a Github branch and modify my Unraid installation when you don't want to push a release yet.

Execute the following command and see if the disk spins up:

/bin/lsblk -nb -o size /dev/sdX

 

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.