[unRAID 6 beta14+] Unassigned Devices [former Auto Mount USB]


Recommended Posts

Any one else have their cache drive show up as an "Unassigned Drive"?  :o

 

Other points of interest regarding this, every reboot of unraid my assigned cache drive isn't automatically selected since changing from spinner to ssd.

 

I had the same symptoms after changing cache drive from one SSD to another. Seems like unRAID doesn't want to forget about the first cache device. I had to stop array, un-assign cache device, start array, stop array, assign new cache, and start array again.

 

I don't think I had this plugin installed, but I'm not absolutely sure.

 

The plugin uses unRAID configuration to discard array and cache disks so, if unRAID isn't saving the cache disk configuration correctly, the plugin will show it.

Link to comment

I had the same symptoms after changing cache drive from one SSD to another. Seems like unRAID doesn't want to forget about the first cache device. I had to stop array, un-assign cache device, start array, stop array, assign new cache, and start array again.

 

Thanks for the suggestions. Freddie's advice (quoted above) fixed it.

Link to comment

Great plugin! I use it to mount usb drives and to preclear disks before they go in to "production"

 

Would be nice to be able to see the SMART data and SMART tests from this plugin also. Click the devicename, like the array disks.

 

Keep up the great work!

 

 

Link to comment

Great plugin, but devices attached to an Areca controller sure show up funny with random numbers for disk ID.  Of course this is Areca's fault.  It sure would be nice if the unassigned devices could identify them like the unRaid array screen, or the preclear script.

 

Look at this: (disks 1 and 3 are attached to an Areca, 2 and 4 are on the motherboard)

 

6OfkEgZ.png

 

The PreClear script is able to figure it out as is the unRaid array screen.  In this example the Arc1280v2 disk is an Areca Raid 0 of 2 x 2tb disks that unRaid sees as one 4tb disk that I will use as parity.

3FoKXTd.png

 

@bubbaq & @bjp999 did an awesome job getting these Areca controllers to work smoothly with unRaid here:

 

http://lime-technology.com/forum/index.php?topic=38487.0

 

Any hope for unassigned devices on Areca??

Link to comment

I am having real issues with unassigned devices in v6.1rc5.  When I plug in a backup USB thumb drive to copy my flash device I get the following errors:

 

Aug 22 09:36:26 MediaServer FlashBackup: Started
Aug 22 09:36:29 MediaServer kernel: xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 1
Aug 22 09:36:29 MediaServer kernel: xhci_hcd 0000:00:14.0: Looking for event-dma 00000000fffc8000 trb-start 00000000fffc5fe0 trb-end 00000000fffc6000 seg-start 00000000fffc5000 seg-end 00000000fffc5ff0
Aug 22 09:36:32 MediaServer emhttp: /usr/local/emhttp/webGui/scripts/tail_log syslog 2>&1
Aug 22 09:37:00 MediaServer kernel: usb 1-4: reset high-speed USB device number 3 using xhci_hcd
Aug 22 09:37:15 MediaServer kernel: usb 1-4: device descriptor read/64, error -110
Aug 22 09:37:24 MediaServer emhttp: /usr/local/emhttp/webGui/scripts/tail_log syslog 2>&1
Aug 22 09:37:30 MediaServer kernel: usb 1-4: device descriptor read/64, error -110

 

and my flash device goes offline.  My cache drive shows up as one of the unassigned devices and I have to repair my flash in another computer after shutting down.  Not good.

Link to comment

I am having real issues with unassigned devices in v6.1rc5.  When I plug in a backup USB thumb drive to copy my flash device I get the following errors:

 

Aug 22 09:36:26 MediaServer FlashBackup: Started
Aug 22 09:36:29 MediaServer kernel: xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 1
Aug 22 09:36:29 MediaServer kernel: xhci_hcd 0000:00:14.0: Looking for event-dma 00000000fffc8000 trb-start 00000000fffc5fe0 trb-end 00000000fffc6000 seg-start 00000000fffc5000 seg-end 00000000fffc5ff0
Aug 22 09:36:32 MediaServer emhttp: /usr/local/emhttp/webGui/scripts/tail_log syslog 2>&1
Aug 22 09:37:00 MediaServer kernel: usb 1-4: reset high-speed USB device number 3 using xhci_hcd
Aug 22 09:37:15 MediaServer kernel: usb 1-4: device descriptor read/64, error -110
Aug 22 09:37:24 MediaServer emhttp: /usr/local/emhttp/webGui/scripts/tail_log syslog 2>&1
Aug 22 09:37:30 MediaServer kernel: usb 1-4: device descriptor read/64, error -110

 

and my flash device goes offline.  My cache drive shows up as one of the unassigned devices and I have to repair my flash in another computer after shutting down.  Not good.

 

There was an update to this plugin shortly after rc3 came out. Do you have the most recent one?

Link to comment

I am having real issues with unassigned devices in v6.1rc5.  When I plug in a backup USB thumb drive to copy my flash device I get the following errors:

 

Aug 22 09:36:26 MediaServer FlashBackup: Started
Aug 22 09:36:29 MediaServer kernel: xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 1
Aug 22 09:36:29 MediaServer kernel: xhci_hcd 0000:00:14.0: Looking for event-dma 00000000fffc8000 trb-start 00000000fffc5fe0 trb-end 00000000fffc6000 seg-start 00000000fffc5000 seg-end 00000000fffc5ff0
Aug 22 09:36:32 MediaServer emhttp: /usr/local/emhttp/webGui/scripts/tail_log syslog 2>&1
Aug 22 09:37:00 MediaServer kernel: usb 1-4: reset high-speed USB device number 3 using xhci_hcd
Aug 22 09:37:15 MediaServer kernel: usb 1-4: device descriptor read/64, error -110
Aug 22 09:37:24 MediaServer emhttp: /usr/local/emhttp/webGui/scripts/tail_log syslog 2>&1
Aug 22 09:37:30 MediaServer kernel: usb 1-4: device descriptor read/64, error -110

 

and my flash device goes offline.  My cache drive shows up as one of the unassigned devices and I have to repair my flash in another computer after shutting down.  Not good.

 

as i read somewhere on the net "error -110" usually means too much power for this USB - USB2 drive plugged in USB3 slot or similar..

Link to comment

I am having real issues with unassigned devices in v6.1rc5.  When I plug in a backup USB thumb drive to copy my flash device I get the following errors:

 

Aug 22 09:36:26 MediaServer FlashBackup: Started
Aug 22 09:36:29 MediaServer kernel: xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 1
Aug 22 09:36:29 MediaServer kernel: xhci_hcd 0000:00:14.0: Looking for event-dma 00000000fffc8000 trb-start 00000000fffc5fe0 trb-end 00000000fffc6000 seg-start 00000000fffc5000 seg-end 00000000fffc5ff0
Aug 22 09:36:32 MediaServer emhttp: /usr/local/emhttp/webGui/scripts/tail_log syslog 2>&1
Aug 22 09:37:00 MediaServer kernel: usb 1-4: reset high-speed USB device number 3 using xhci_hcd
Aug 22 09:37:15 MediaServer kernel: usb 1-4: device descriptor read/64, error -110
Aug 22 09:37:24 MediaServer emhttp: /usr/local/emhttp/webGui/scripts/tail_log syslog 2>&1
Aug 22 09:37:30 MediaServer kernel: usb 1-4: device descriptor read/64, error -110

 

and my flash device goes offline.  My cache drive shows up as one of the unassigned devices and I have to repair my flash in another computer after shutting down.  Not good.

 

There was an update to this plugin shortly after rc3 came out. Do you have the most recent one?

 

Yep.  2015.08.12.  Haven't touched the script and this works perfect in 6.0.1.

Link to comment

I am having real issues with unassigned devices in v6.1rc5.  When I plug in a backup USB thumb drive to copy my flash device I get the following errors:

 

Aug 22 09:36:26 MediaServer FlashBackup: Started
Aug 22 09:36:29 MediaServer kernel: xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 1
Aug 22 09:36:29 MediaServer kernel: xhci_hcd 0000:00:14.0: Looking for event-dma 00000000fffc8000 trb-start 00000000fffc5fe0 trb-end 00000000fffc6000 seg-start 00000000fffc5000 seg-end 00000000fffc5ff0
Aug 22 09:36:32 MediaServer emhttp: /usr/local/emhttp/webGui/scripts/tail_log syslog 2>&1
Aug 22 09:37:00 MediaServer kernel: usb 1-4: reset high-speed USB device number 3 using xhci_hcd
Aug 22 09:37:15 MediaServer kernel: usb 1-4: device descriptor read/64, error -110
Aug 22 09:37:24 MediaServer emhttp: /usr/local/emhttp/webGui/scripts/tail_log syslog 2>&1
Aug 22 09:37:30 MediaServer kernel: usb 1-4: device descriptor read/64, error -110

 

and my flash device goes offline.  My cache drive shows up as one of the unassigned devices and I have to repair my flash in another computer after shutting down.  Not good.

 

as i read somewhere on the net "error -110" usually means too much power for this USB - USB2 drive plugged in USB3 slot or similar..

 

It's a 4GB thumb drive.  I don't think it is drawing too much power.  Worked perfect in v6.0.1 and I made no script changes and I use exactly the same USB port as before.

 

There have been a lot of behind the scenes changes in v6.1 for security reasons and I suspect that this plugin is still not quite ready for prime time on 6.1.  I went back to 6.0.1 and I'll wait for the dust to settle before I move up to 6.1.

 

EDIT: gfjardim, I have a test server with the same hardware that I can do some testing on if it would help.

Link to comment

I am having real issues with unassigned devices in v6.1rc5.  When I plug in a backup USB thumb drive to copy my flash device I get the following errors:

 

Aug 22 09:36:26 MediaServer FlashBackup: Started
Aug 22 09:36:29 MediaServer kernel: xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 1
Aug 22 09:36:29 MediaServer kernel: xhci_hcd 0000:00:14.0: Looking for event-dma 00000000fffc8000 trb-start 00000000fffc5fe0 trb-end 00000000fffc6000 seg-start 00000000fffc5000 seg-end 00000000fffc5ff0
Aug 22 09:36:32 MediaServer emhttp: /usr/local/emhttp/webGui/scripts/tail_log syslog 2>&1
Aug 22 09:37:00 MediaServer kernel: usb 1-4: reset high-speed USB device number 3 using xhci_hcd
Aug 22 09:37:15 MediaServer kernel: usb 1-4: device descriptor read/64, error -110
Aug 22 09:37:24 MediaServer emhttp: /usr/local/emhttp/webGui/scripts/tail_log syslog 2>&1
Aug 22 09:37:30 MediaServer kernel: usb 1-4: device descriptor read/64, error -110

 

and my flash device goes offline.  My cache drive shows up as one of the unassigned devices and I have to repair my flash in another computer after shutting down.  Not good.

 

as i read somewhere on the net "error -110" usually means too much power for this USB - USB2 drive plugged in USB3 slot or similar..

 

It's a 4GB thumb drive.  I don't think it is drawing too much power.  Worked perfect in v6.0.1 and I made no script changes and I use exactly the same USB port as before.

 

There have been a lot of behind the scenes changes in v6.1 for security reasons and I suspect that this plugin is still not quite ready for prime time on 6.1.  I went back to 6.0.1 and I'll wait for the dust to settle before I move up to 6.1.

 

EDIT: gfjardim, I have a test server with the same hardware that I can do some testing on if it would help.

 

Well here we go with some weirdness.  I tested on my test server and it works fine.  I'm going to try some more things on my main server and see if I can track it down.  The MBs are the same in both my servers, so I don't get it.  Geez, I hate these kinds of issues.

Link to comment

Well here we go with some weirdness.  I tested on my test server and it works fine.  I'm going to try some more things on my main server and see if I can track it down.  The MBs are the same in both my servers, so I don't get it.  Geez, I hate these kinds of issues.

 

have you connected more USB devices or this single one?

looks something similar to esxi USB dropouts - when i add second USB device to unRAID, no more dropouts to me..

Link to comment

I figured out what is going on.  The devices don't mount correctly because of the reference to unassigned_mount.

 

When I mount a device by clicking the "Mount" button, I get the following error on the console:

/usr/local/emhttp/usr/local/sbin/unassigned_mount: No such file or directory.

 

This was changed with the new command methods from http and php.

 

EDIT: I also recommend a check that a device has been mounted correctly and not let the script run if the mount is unsuccessful.

Link to comment

Well here we go with some weirdness.  I tested on my test server and it works fine.  I'm going to try some more things on my main server and see if I can track it down.  The MBs are the same in both my servers, so I don't get it.  Geez, I hate these kinds of issues.

 

have you connected more USB devices or this single one?

looks something similar to esxi USB dropouts - when i add second USB device to unRAID, no more dropouts to me..

 

It's a simple answer.  The command structure for http and php commands has changed and has affected this plugin for v6.1rc5.

 

The device did not mount and the script was executed anyway causing a bunch of issues.  The plugin should check for a successful mount and only execute the script if the mount is successful.

Link to comment

The device did not mount and the script was executed anyway causing a bunch of issues.  The plugin should check for a successful mount and only execute the script if the mount is successful.

 

Despite all the troubles, some constructive observation came out of this :) I hope gfjardim has a chance to look at this.

 

 

Link to comment

When I try to save changes to the script file I get the following error and the changes are not saved.

 

Aug 22 13:14:50 Tower php: Include file not allowed: . Settings not saved!

 

V6.1rc5.

 

This is definitely a result of the security enforcements. It is not allowed anymore to use an arbitrary location, but scripts or includes now need to be placed under /usr/local/emhttp/plugins/<plugin-name>/...

 

Link to comment

I would also recommend a change to the default script:

 

#!/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' )
    if [ -d $MOUNTPOINT ]
    then
        // do your stuff here
        echo "Added"
    else
        logger $MOUNTPOINT is not mounted -tunassigned_devices
    fi
  ;;
  'REMOVE' )
    // do your stuff here
    echo "Removed"
  ;;
esac

 

If the $MOUNTPOINT does not exist, then it doesn't make sense to run the script.

Link to comment

Am I able to use this plugin to both :

1. Store an ISO to load in KVM

2. Map a path to an outside of the array disk, that will be a share used inside of the vm?

 

I'm also interested in mapping a path from a VM to an outside-of-the-array disk, but I don't see the options shown in this post. Is there a new method for this?

 

In my VM (Win10), I can "Map a network drive" but I question if that is the best method.

 

What are best practices?

 

Thanks, Richard

 

I use Crashplan in an ubuntu VM, so had to find out how to view my unraid shares from within the VM. This was maybe a month or more ago and it took me a little while to get things going smoothly. I would actually have to go back and re-read everything on how to do it again since I forgot. It is not one of those things you do everyday, but it is 9P sharing or something like that. After reading this thread, I figured it out and hope it helps you also.

 

http://lime-technology.com/forum/index.php?topic=34686.msg322473#msg322473

 

 

Link to comment

gfjardim,

 

Unassigned devices installs some rules for udev and updates udev with the new rules, but when unassigned devices is removed, I don't see where the rules are reapplied after the unassigned devices rule is removed from /etc/udev/rules.d/.  The rules refer to the scripts that have been removed by the plugin removal and might cause some issues.

Link to comment

I am getting the following when stopping the array:

 

Aug 25 14:00:16 Tower emhttp: Warning: rmdir(/mnt/disk/appdisk): Directory not empty in /usr/local/emhttp/plugins/unassigned.devices/include/lib.php on line 222

 

 

/mnt/disk/appdisk is where all my docker config files are locate on 1 of the 2 SSD drives......

 

 

my 2 SSD are auto mounted under /mnt/disk/appdisk and /mnt/disk/appdisk2 for all docker stuff

 

Myk

 

Link to comment

Getting the following error when trying to mount a disk outside the array from the GUI.

 

Aug 26 15:09:50 petunia php: Invalid #command: /usr/local/sbin/unassigned_mount /dev/sdc

 

The command on the command line seems to work however.

 

Not seeing anything in /var/log/unassigned.devices.log

Link to comment

Getting the following error when trying to mount a disk outside the array from the GUI.

 

Aug 26 15:09:50 petunia php: Invalid #command: /usr/local/sbin/unassigned_mount /dev/sdc

 

The command on the command line seems to work however.

 

Not seeing anything in /var/log/unassigned.devices.log

Looks like this plugin has not been updated for 6.1
Link to comment

Getting the following error when trying to mount a disk outside the array from the GUI.

 

Aug 26 15:09:50 petunia php: Invalid #command: /usr/local/sbin/unassigned_mount /dev/sdc

 

The command on the command line seems to work however.

 

Not seeing anything in /var/log/unassigned.devices.log

Looks like this plugin has not been updated for 6.1

 

Yes it's broken in 6.1.  The command line scripts (unassigned_mount and unassigned_umount) work, but the webgui is broken because of the security changes LT has implemented in 6.1.  I've been working with the plugin and have it working for me.  When gfjardim shows back up, I will do a source pull from his repository and offer the modifications I have made to help him get an updated plugin out faster.  It was a bit tedious, but not difficult to make the changes.

Link to comment

 

NAS, the mount point is only a suggestion. In fact, the order is: user mount point, label or id.

 

One can always change the mount point if they wishes.

I currently use UDEV via my ownsetup to mount disks via a USB3 stage rack.

 

What I do differently I think is that the mount point and share is based on the cradle slot and not the disk id e.g. /mnt/usbslot1 and /mnt/usbslot2

 

For me this is very useful because I dont care so much for disk id based mount point and shares as all I want to know if i put a disk in slot 1 it mounts as slot 1.

 

The tricky part is finding the udev string match to make sure this happens.

 

This approach isnt for everyone but some may find it helpful. Would it be of any interest as a future enhancement to this addon?

 

Sorry I missed your reply. Very very intrersted in this. Once last question before I attempt to migrate away from my roll-your-own-solution; can you define which script run before umount?

Link to comment
  • Squid locked this topic
Guest
This topic is now closed to further replies.