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


Recommended Posts

42 minutes ago, CS01-HS said:

I only posted in case it indicated a general problem that affected more users. (If it's relevant,

That's what I am looking for.  I don't see anything in your log though.  Several  versions ago there was a bug that messed up some config file settings.  Feel free to edit the /flash/config/plugins/unassigned.devices/unassigned.devices.cfg file and see if there is something out of order.  It might just be quite obvious - a stray automount setting.  Make your edit, save the file, then click on the double arrow icon on the UD webpage to refresh the configuration in ram.

  • Thanks 1
Link to comment
32 minutes ago, dlandon said:

Feel free to edit the /flash/config/plugins/unassigned.devices/unassigned.devices.cfg file and see if there is something out of order.

 

Nothing obvious but maybe because I did the fix. I'll wait 'till it happens again and compare. Thanks.

Link to comment

Hey guys, I'm getting this error in my syslog daily. I have an external HDD mounted as unassigned device for some backups.

fstrim: /mnt/disks/My_Passport: FITRIM ioctl failed: Device or resource busy

as far as I understand this, its trying to trim it, but since its a HDD it can't? How do I tell it to stop?

Link to comment
On 3/14/2021 at 4:41 PM, dlandon said:

That's what I am looking for.  I don't see anything in your log though.  Several  versions ago there was a bug that messed up some config file settings.  Feel free to edit the /flash/config/plugins/unassigned.devices/unassigned.devices.cfg file and see if there is something out of order.  It might just be quite obvious - a stray automount setting.  Make your edit, save the file, then click on the double arrow icon on the UD webpage to refresh the configuration in ram.

 

Okay I figured out what's causing this. I have this block in my SMB Extras:

#unassigned_devices_start
#Unassigned devices share includes
   include = /tmp/unassigned.devices/smb-settings.conf
#unassigned_devices_end

 

And on boot the file it references is populated:

root@NAS:~# more /tmp/unassigned.devices/smb-settings.conf


include = /etc/samba/unassigned-shares/usb-hdd.conf

root@NAS:~# more /etc/samba/unassigned-shares/usb-hdd.conf
[usb-hdd]
path = /mnt/disks/usb-hdd
browseable = yes
force User = nobody
...

Which explains why it's shared.

 

If I share then un-share the partition in the WebGUI it blanks the file and all's well.

root@NAS:~# more /tmp/unassigned.devices/smb-settings.conf

******** /tmp/unassigned.devices/smb-settings.conf: Not a text file ********

root@NAS:~#

 

Link to comment

@CS01-HSNICE!

 

I was about to ask about having a share for a disk show up that doesn't exist (disk is unplugged), and was tossing weird error in the syslog

 

 

Mar 16 17:20:23 Cube kernel: Buffer I/O error on dev sdm, logical block 0, async page read
Mar 16 17:21:30 Cube kernel: Buffer I/O error on dev sdm, logical block 0, async page read
Mar 16 17:22:38 Cube kernel: Buffer I/O error on dev sdm, logical block 0, async page read
 

but based on your post I found the errant disk listed in the smb-settings.conf file, and removed it.  looks like the noise to the log has ceased.

I knew a reboot would fix it, but that brings its own perils :D

  • Like 1
Link to comment

I know unRAID handles UD spindown so I wasn't sure where to post this but I'm pre-clearing a disk and unRAID and/or UD seem confused about its status. Temperature will sometimes display and sometimes not (as if the disk were in standby) and unRAID keeps trying to spin it down. Strange.

 

No problems as far as I can tell, just a heads up.

 

1625642653_ScreenShot2021-03-17at3_21_33PM.thumb.png.318ccb9745c224a710d344a082895a2e.png

 

1673587356_ScreenShot2021-03-17at3_16_11PM.thumb.png.4e45fbb200bb56a85c90982c2ec93537.png

Link to comment
2 hours ago, CS01-HS said:

Temperature will sometimes display and sometimes not (as if the disk were in standby) and unRAID keeps trying to spin it down. Strange.

I'd say the issue is that Unraid does not recognize preclear disk activity as disk file read and write activity.

Link to comment
3 hours ago, dlandon said:

I'd say the issue is that Unraid does not recognize preclear disk activity as disk file read and write activity.

 

Ah, I bet that's because the fix for spindown in 6.9.1 was to monitor partition stats rather than disk stats and pre-clear writes/reads directly from the disks. I wonder if there's a risk running hdparm -y during the write phase - I guess I'll find out soon.

Link to comment
22 minutes ago, CS01-HS said:

I wonder if there's a risk running hdparm -y during the write phase - I guess I'll find out soon.

You don't want to do that.  The Unraid spin down control will not understand the standby status of the disk then.

 

To properly spin down a UD disk, use the UD cli command and Unraid will keep the disk status up to date.  Click the 'Help' icon to see the command,

 

I have found the contrary situation on my server.  I cannot spin down a disk without a file system.

 

I'm looking into this.

 

The temperature display might be a UD issue,  At a terminal type this command:

cat /usr/local/emhttp/state/devs.ini

This shows information on UD devices from Unraid's perspective.  See it the temperature is shown and let me know if it is, but not shown on the UD page.

  • Thanks 1
Link to comment

I see the issue here.  Unraid spun down the disk because there was no read or write activity.  You can confirm this by changing the display to reads and writes and not the read and write speeds.  The reads and writes do not increment.  Because Unraid thinks the disk is spun down, it is not showing the temperature.  The disk status showing spun up is a UD issue because UD assumes a preclearing disk is always spun up.  In this case a bad assumption.

 

I'm correcting UD to actually show the disk status based on what Unraid reports, and not the assumption that a preclearing disk is always spun up.  I'm working with LT on a fix to this situation.

Link to comment
40 minutes ago, dlandon said:

I see the issue here.  Unraid spun down the disk because there was no read or write activity. 

 

Maybe I'm misunderstanding or I wasn't clear but the relevant disk is Dev 2 (sdc) which shows ~150MB/s reads in the screenshot.

 

I'm not planning to run hdparm -y but I took the last line of that log:

spinning down /dev/sdc

to mean that unraid had.

Link to comment
11 hours ago, dlandon said:

Switch to number of reads and writes and you'll not see it change.

 

Yup, both zeros. Now I see what you meant.

 

I had to wait for the temperature to disappear again before I cat'd devs.ini but it did and they match up:

["dev2"]
name="dev2"
id="ST4000VN008-2DR166_ZGY68"
device="sdc"
sectors="7814037168"
sector_size="512"
rotational="1"
spundown="1"
temp="*"
numReads="0"
numWrites="0

 

Edited by CS01-HS
Link to comment
8 minutes ago, toasti said:

Thanks for this wonderful plugin!

I have one question: I use the rsync backup script from mgutt to copy all my data to my WD 12 TB external hdd.

Should the UD plugin send the external disk to sleep when not used?

Mine is running all the time.

 

Post diagnostics.

Link to comment

And when not on 6.9?

I am still on 6.8 and the disk is "green" and still runs.

 

I will probably update at the weekend to 6.9, but nevertheless I am interested how the behavior is on 6.8.

 

Another question: How can I update the user script for a device in the plugin?

It would be very cool to set the Rsync-Backup script here that the backup will be started automatically as soon as the hard disk is connected and mounted.

 

Edited by toasti
Link to comment
31 minutes ago, toasti said:

 

I will probably update at the weekend to 6.9, but nevertheless I am interested how the behavior is on 6.8.

UD sets a disk standby timer of 15 minutes.  Not all disks respect this command.

 

32 minutes ago, toasti said:

Another question: How can I update the user script for a device in the plugin?

It would be very cool to set the Rsync-Backup script here that the backup will be started automatically as soon as the hard disk is connected and mounted.

Read the first post.

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.