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


Recommended Posts

I just used the Unassigned Devices plugin to connect to an SMB share on a raspberry pi.  If I use the server name ("RASPBERRYPI", either typed in manually or selected from the network search) I can't mount the share.  If I use the IP address (192.168.1.4), I can mount the share.  What is the reason for this?

Link to comment

I have a problem with this plugin:

I can't get SMART values of my SSD - i use it for appdata-backups.

When i push the "SMART short self-test" button it immediately went back to "stop" and nothing happens...

Can someone confirm this?

Also its not clear if the SSD is online or sleeping - is there a way to sleep/wakup the drive over a button like the other drives in the array?

Edited by Zonediver
Link to comment

I have noticed that whenever I use UD, the system in general tends to get unstable and I have to reboot it shortly after. Been this way since I first started using unraid.

 

Starting to get annoyed as I can't figure out the issue so was going to see if anyone else has noticed general issues when/after using UD?

 

Today for example, I was doing a backup and I unmounted the drive at one point to test the scripting function when mounted, just wanted to do a simple echo to start. But when I tried to remount the drive it fails.

 

The error today is this but it has varied a lot and is generally along the lines of can't mount or unmount for reasons.

Sep  2 10:53:00 NAS unassigned.devices: Adding disk '/dev/mapper/Personal_Data_Backup'...
Sep  2 10:53:00 NAS emhttpd: shcmd (729): /usr/sbin/cryptsetup luksOpen /dev/sdq1 Personal_Data_Backup
Sep  2 10:53:00 NAS emhttpd: emhttpd: HTTP/1.1 500 Internal Server Error#015
Sep  2 10:53:00 NAS unassigned.devices: luksOpen error: 500 Internal Server Error 
Sep  2 10:53:04 NAS unassigned.devices: Partition 'Personal_Data_Backup' could not be mounted.
Sep  2 10:53:04 NAS unassigned.devices: Issue spin down timer for device '/dev/sdq'.
Sep  2 10:53:04 NAS unassigned.devices: Running device script: 'Personal_Data_Backup.sh' with action 'ERROR_MOUNT'.
Sep  2 10:53:57 NAS emhttpd: cmd: /usr/local/emhttp/plugins/dynamix/scripts/disk_log sdq

This would seem to say that the encryption password or something is wrong but it uses the same password as the array and was working fine before I unmounted. Unmounting in particular seems to have issues.

 

The only option I have found to fix issues is to reboot the whole server, generally if I am lucky I can mount a drive and unmount it once before needing to reboot. Yesterday I had to reboot 4 times just to get 3 UD drives to mount and work properly and it would not unmount on 2 of those occasions causing a forced shutdown.

 

Nothing particularly special about my setup, USB 3.0 dock but have also tried a sata dock my case has built in. BTRFS formatted drives but had even worse issues with NTFS formatted drives. Encryption is enabled but uses the same password as the array.

 

I don't expect anything be done since I know I am not giving any actionable logs but just figured I would see if anyone else has noticed similar issues. Really makes backups more involved then they need to be.

Link to comment

I tried stopping array and mounting the drive after adding the password to the UD settings but the luks error went away but it would still not mount and the partition is missing from the drop down menu for the drive

Sep  2 11:15:15 NAS unassigned.devices: Adding disk '/dev/sdq1'...
Sep  2 11:15:15 NAS unassigned.devices: No filesystem detected on '/dev/sdq1'.
Sep  2 11:15:15 NAS unassigned.devices: Partition '' could not be mounted.
Sep  2 11:15:15 NAS unassigned.devices: Issue spin down timer for device '/dev/sdq'.

Going to reboot now and see if it starts working again. this normally works, at least if you do it enough lol.

 

Is there a way to "clear all traces" of UD and/or "restart" UD without stopping the array/rebooting?

 

Many times I think the issue is because something was dangling during the unmount process as the real issues seem to present themselves when I have mounted and unmounted a drive and try to mount it again.

 

Edit: sure enough, reboot and it mounts up just fine first try.

Edited by TexasUnraid
Link to comment

I tried putting the echo in the script to test it out but nothing shows up in the log file? Tested a few other commands and without explicitly telling it to echo into the log file nothing ends up in the log.

 

I would really need to see the output if I made snapshots automatic, is this intended behavior or am I doing something wrong?

 

I assumed it would work more or less like user scripts?

Edited by TexasUnraid
Link to comment

Sorry to keep posting but figured I would toss what information I had here while I was thinking about it. After unmounting, disconnecting and reconnecting the drive (properly mounted and unmounted prior to this) I now get this error when trying to mount it again:

Sep  2 12:04:21 NAS unassigned.devices: Adding disk '/dev/mapper/Personal_Data_Backup'...
Sep  2 12:04:24 NAS unassigned.devices: Mount drive command: /sbin/mount -o rw,noatime,nodiratime '/dev/mapper/Personal_Data_Backup' '/mnt/disks/Personal_Data_Backup'
Sep  2 12:04:24 NAS kernel: /dev/mapper/Personal_Data_Backup: Can't open blockdev
Sep  2 12:04:24 NAS unassigned.devices: Mount of '/dev/mapper/Personal_Data_Backup' failed. Error message: mount: /mnt/disks/Personal_Data_Backup: special device /dev/mapper/Personal_Data_Backup does not exist. 
Sep  2 12:04:24 NAS unassigned.devices: Partition 'Personal_Data_Backup' could not be mounted.
Sep  2 12:04:24 NAS unassigned.devices: Issue spin down timer for device '/dev/sdq'

Once again the only fix is to reboot yet again. This happens during backups when I need to connect a few different drives during the process although I have seen many different errors, which is why I didn't report it before, was hoping to find a pattern. So far noting solid I can figure out.

Edited by TexasUnraid
Link to comment
Just now, trackstarjc2003 said:

I think I messed up by putting a " ' " in the point point name of one of my unassigned devices. Now the drive wont mount an im unable to change the mount point. 

 

Formatting the drive has no affect, it somehow remembers the previous mount point. Anyone have any idea on how I can fix this issue?

 

 

 

Capture.png

If you disconnect the drive from the system and then move the slider from "simple" to "complete" on the UD section it should show you a list of saved drives.

 

Click the X on the right side and it will delete the saved settings and should let you rename it.

  • Thanks 1
Link to comment
7 minutes ago, TexasUnraid said:

If you disconnect the drive from the system and then move the slider from "simple" to "complete" on the UD section it should show you a list of saved drives.

 

Click the X on the right side and it will delete the saved settings and should let you rename it.

Well hot damn. Thanks man!

Edited by trackstarjc2003
typo
Link to comment

Hello everyone,

 

I am quite new to unraid and the Unassigned Devices plugin. I was play around and tried to add my old Synology NAS, living at my mom's house, thru synology-dyndns using smb and nfs. 

After a few tries it did not work and I wanted to delete the remote shares. I tried to delete the smb and nfs share with the red X, confirmed it but the shares are still there even they are not working anywhere. Tried it again but no success.

 

Can you help to delete the not working, not really needed shares?

 

Thanks 

Link to comment

How do I manually mount an unassigned drive in a user script?   I have a backup script.  just a bunch of simple rsync commands to an external 12TB drive.  

 

I was thinking I don't want that always mounted.  On my old linux box I had a simple check if disk mounted, if not mount and check file system.   

 

I tried to add this simple command to user scripts (mount /dev/disk/by-id/xxxxxxxx.xxxxxxxxxx.xxxxxxxxxx_part1) but that messed things up.  

 

I rebooted server and watched log as it was mounted.    See this command. 

Sep 7 20:03:53 Tower unassigned.devices: Mount drive command: /sbin/mount -t xfs -o rw,noatime,nodiratime '/dev/sdl1' '/mnt/disks/12_TB'

 

Now............. How do I add that to my script, knowing that sdl1 might be sdb1 or whatever?  Convert that to /dev/disk/by-id/(idname_part1) 

 

Then at the end. How would I unmount?   I looked at log when I hit unmout on unassiged devices and saw this

Issue spin down timer for device '/dev/sdl'.
Sep 7 20:07:38 Tower unassigned.devices: Removing SMB share '12_TB'
Sep 7 20:07:38 Tower unassigned.devices: Unmounting disk 'WD easystore_25FB'...
Sep 7 20:07:38 Tower unassigned.devices: Unmounting '/dev/sdl1'...
Sep 7 20:07:38 Tower unassigned.devices: Unmount cmd: /sbin/umount '/dev/sdl1' 2>&1
Sep 7 20:07:38 Tower kernel: XFS (sdl1): Unmounting Filesystem
Sep 7 20:07:38 Tower unassigned.devices: Successfully unmounted '/dev/sdl1'
Sep 7 20:07:38 Tower unassigned.devices: Disk with serial 'easystore_25FB_394A474556354254', mountpoint '12_TB' removed successfully.

 

Not sure how to send all those commands.  Figured a simple Unmount cmd: /sbin/umount '/dev/sdl1' 2>&1 (copied and pasted that from above log)

 

Please advise.  

Thanks!

Link to comment
42 minutes ago, bphillips330 said:

How do I manually mount an unassigned drive in a user script?   I have a backup script.  just a bunch of simple rsync commands to an external 12TB drive.  

 

I was thinking I don't want that always mounted.  On my old linux box I had a simple check if disk mounted, if not mount and check file system.   

 

I tried to add this simple command to user scripts (mount /dev/disk/by-id/xxxxxxxx.xxxxxxxxxx.xxxxxxxxxx_part1) but that messed things up.  

 

I rebooted server and watched log as it was mounted.    See this command. 

Sep 7 20:03:53 Tower unassigned.devices: Mount drive command: /sbin/mount -t xfs -o rw,noatime,nodiratime '/dev/sdl1' '/mnt/disks/12_TB'

 

Now............. How do I add that to my script, knowing that sdl1 might be sdb1 or whatever?  Convert that to /dev/disk/by-id/(idname_part1) 

 

Then at the end. How would I unmount?   I looked at log when I hit unmout on unassiged devices and saw this

Issue spin down timer for device '/dev/sdl'.
Sep 7 20:07:38 Tower unassigned.devices: Removing SMB share '12_TB'
Sep 7 20:07:38 Tower unassigned.devices: Unmounting disk 'WD easystore_25FB'...
Sep 7 20:07:38 Tower unassigned.devices: Unmounting '/dev/sdl1'...
Sep 7 20:07:38 Tower unassigned.devices: Unmount cmd: /sbin/umount '/dev/sdl1' 2>&1
Sep 7 20:07:38 Tower kernel: XFS (sdl1): Unmounting Filesystem
Sep 7 20:07:38 Tower unassigned.devices: Successfully unmounted '/dev/sdl1'
Sep 7 20:07:38 Tower unassigned.devices: Disk with serial 'easystore_25FB_394A474556354254', mountpoint '12_TB' removed successfully.

 

Not sure how to send all those commands.  Figured a simple Unmount cmd: /sbin/umount '/dev/sdl1' 2>&1 (copied and pasted that from above log)

 

Please advise.  

Thanks!

Browse to the UD page and click on the help icon in the upper right.  Then read the help for how to mount and unmount the desired disk by sdX designation.  The problem with this approach is that the sdX designation can change on the next boot making your script potentially mount the wrong disk.

Link to comment
On 9/3/2020 at 5:49 PM, StuDaBaiker said:

Full uninstall and reinstall fixed it

 

On 9/3/2020 at 3:59 PM, StuDaBaiker said:

I just updated to the latest version and I am getting an error about an invalid argument passed to foreach loop

Capture.thumb.PNG.9a72a3c61d7e3921186c9bb9d3fd1d05.PNG

 

 

This error is back now. Worked fine after reinstalling but noticed today the same error is back.

Any ideas?

Edited by StuDaBaiker
Added both posts
Link to comment
9 hours ago, dlandon said:

Browse to the UD page and click on the help icon in the upper right.  Then read the help for how to mount and unmount the desired disk by sdX designation.  The problem with this approach is that the sdX designation can change on the next boot making your script potentially mount the wrong disk.

Yeah, that is why i was thinking the /by-id/blahblahblah_part1 would avoid the sdX issue.   thanks.  I will check out that page. 

 

What UD page?  Github?  On here?  I can't find what you are talking about

Edited by bphillips330
Link to comment
11 minutes ago, bphillips330 said:

Yeah, that is why i was thinking the /by-id/blahblahblah_part1 would avoid the sdX issue.   thanks.  I will check out that page. 

 

What UD page?  Github?  On here?  I can't find what you are talking about

The UD page of Unraid.

 

Why not keep the disk mounted?

Link to comment
3 minutes ago, bphillips330 said:

being overly cautious.  I could be way off base.  But, was thinking if crypto ever hit system, having the backup drive attached could get encrypted.  So I thought if it is not mounted, not risk of data loss? 

That's a bit over the top.  Best answer is to harden your system and network to keep crypto out.

Link to comment
2 hours ago, bphillips330 said:

Yeah, that is why i was thinking the /by-id/blahblahblah_part1 would avoid the sdX issue.   thanks.  I will check out that page. 

I use this snippet in a user script to mount a USB drive by ID:

THIS_DISK=`ls -l /dev/disk/by-id/ | grep 'usb-WD_My_Passport_25E2_5758313144393636' | head -1 | tail -c4`
/usr/local/sbin/rc.unassigned mount "/dev/$THIS_DISK"
if [[ $? -ne 0 ]]; then 
  echo "Exiting due to ERROR."
  exit 1
fi
echo "SUCCESS"

And unmount:

 /usr/local/sbin/rc.unassigned umount "/dev/$THIS_DISK"

 

Edited by CS01-HS
Link to comment

I have a the ZeroTeir docker creating a VPN between two unraid servers of mine across a city, which allows me to mount the shares of the other server from each using unnasigned disks. (Server 1 has the shares of Server 2 mounted, Server 2 has the shares of Server 1 mounted).

These are going to be permanent mounts for large sets of data on each. Which Protcol is best for this situation? Currently have SMB configured, but I am thinking about using NFS due to the two file systems being Linux which may have less overhead?

 

Interested in your thoughts 🙂

Link to comment

Hello :)

 

I have had an unusual display on my server for several days and rebooting does not solve the problem. What should I do ? Thank you.

 

Fatal error: Uncaught Error: Call to undefined function _() in /usr/local/emhttp/plugins/dynamix/include/Helpers.php:35 Stack trace: #0 /usr/local/emhttp/plugins/unassigned.devices/UnassignedDevices.php(85): my_scale(870.35904, NULL) #1 /usr/local/emhttp/plugins/unassigned.devices/UnassignedDevices.php(177): render_used_and_free_disk(Array, true) #2 /usr/local/emhttp/plugins/unassigned.devices/UnassignedDevices.php(262): render_partition(Array, Array, true) #3 {main} thrown in /usr/local/emhttp/plugins/dynamix/include/Helpers.php on line 35

DEVICEIDENTIFICATION

Capture.PNG

Link to comment
8 hours ago, Kiano70 said:

Hello :)

 

I have had an unusual display on my server for several days and rebooting does not solve the problem. What should I do ? Thank you.

 

Fatal error: Uncaught Error: Call to undefined function _() in /usr/local/emhttp/plugins/dynamix/include/Helpers.php:35 Stack trace: #0 /usr/local/emhttp/plugins/unassigned.devices/UnassignedDevices.php(85): my_scale(870.35904, NULL) #1 /usr/local/emhttp/plugins/unassigned.devices/UnassignedDevices.php(177): render_used_and_free_disk(Array, true) #2 /usr/local/emhttp/plugins/unassigned.devices/UnassignedDevices.php(262): render_partition(Array, Array, true) #3 {main} thrown in /usr/local/emhttp/plugins/dynamix/include/Helpers.php on line 35

DEVICEIDENTIFICATION

Capture.PNG

Post diagnostics.

Link to comment

Hi,

Does anyone know if there's a display bug in that causes unassigned devices that are mounted, to show its used and free amounts as wrong?  

For example, i have a 32Gb USB Drive attached and mounted to dump logs too, used shows 0 B, and free 4.23 MB. 

Doing a disk lookup in CLI shows the stats correctly however.  

 

Its not drive specific either, happens with any drive I've attached in the same way.

 

Any ideas?

 

Thanks!

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.