Jump to content
gfjardim

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

810 posts in this topic Last Reply

Recommended Posts

So what does Auto Mount on do?  I'm hoping it will mount the drive on bootup when set on and mount/unmount with the array start/stop events.

Share this post


Link to post

So what does Auto Mount on do?  I'm hoping it will mount the drive on bootup when set on and mount/unmount with the array start/stop events.

 

That's what it does. RobJ asked about an always mounted solution, and that is  accomplished with mounting the disk before ehttp (webgui) does and set the Auto Mount to off.

Share this post


Link to post

For example, that would make it easy to have an 'always on' app disk, using the system 'started' and 'stopped' events, instead of the array starts and stops.  And devices could find a way to precede or follow other devices or other processes.

 

 

Starting for today's update, array start/stop won't mount/unmount disks which "Auto mount" is disabled. If you want an always mounted disk, you can add something like this to the beginning of your /boot/config/go file:

 

unassigned_mount /dev/disk/by-id/ata-INTEL_SSDSC2CT120A3_DISKSERIAL00000000000

 

This the easiest way I could manage with the events currently available.

 

What about a always-on setting that is saved, and just a single command needed in the go file that would auto mount/share any multiple devices needed - less prone to a mistake in the go file for the mount to fail....?

 

Thanks

Myk

Share this post


Link to post

For example, that would make it easy to have an 'always on' app disk, using the system 'started' and 'stopped' events, instead of the array starts and stops.  And devices could find a way to precede or follow other devices or other processes.

 

 

Starting for today's update, array start/stop won't mount/unmount disks which "Auto mount" is disabled. If you want an always mounted disk, you can add something like this to the beginning of your /boot/config/go file:

 

unassigned_mount /dev/disk/by-id/ata-INTEL_SSDSC2CT120A3_DISKSERIAL00000000000

 

This the easiest way I could manage with the events currently available.

 

What about a always-on setting that is saved, and just a single command needed in the go file that would auto mount/share any multiple devices needed - less prone to a mistake in the go file for the mount to fail....?

 

Thanks

Myk

 

I won't support this kind of stuff. I will ask Tom if he can put two more events in emhttp, one in it's init and one on it's shutdown. If he agrees, then I will add a boot option to Auto Mount, ok?

Share this post


Link to post

That's it, that's what we have to trigger events.

 

from my own syslog, startup:

Apr 28 09:04:44 Servidor emhttp_event: array_started

Apr 28 09:04:48 Servidor emhttp_event: disks_mounted

Apr 28 09:04:59 Servidor emhttp_event: svcs_restarted

Apr 28 09:04:59 Servidor emhttp_event: started

 

Stopping the array:

Apr 28 09:02:28 Servidor emhttp_event: stopping_svcs

Apr 28 09:02:32 Servidor emhttp_event: unmounting_disks

Apr 28 09:02:36 Servidor emhttp_event: stopping_array

Apr 28 09:02:37 Servidor emhttp_event: stopped

 

This is the order emhttp triggers events. In bold, the triggers this plugin uses.

Thanks, you work fast!  I've been dabbling with an event driven, plugin friendly version of CacheDirs, and I had selected 'started' and 'stopping_svcs', so that CacheDirs is the last thing started and the first thing stopped, with the array.

 

I will ask Tom if he can put two more events in emhttp, one in it's init and one on it's shutdown. If he agrees, then I will add a boot option to Auto Mount, ok?

Seems like a better option for most users than editing the go file, and handles shutdown too.  If response is delayed from Tom, there is 'driver_loaded', but may need a flag file to avoid a possible second start, plus insertion into the shutdown sequencing somewhere.  Probably too simple an idea, but could it just start when the plugin starts, and stop when the plugin is told to stop?  Again, might need a flag somewhere if plugin is otherwise stopped and restarted (eg. when updated), and still may need a way to detect a true system shutdown, not just someone temporarily stopping the plugin.  Your 2 event requests would be better.

Share this post


Link to post

Ok, guys, talked to Tom and there are good and bad news.

 

He agreed to delay the launch of VM and Docker to a latter stage of init, including a new event to be triggered by emhttp. This will allow users to mount disks before these services in an safer way. Again, thanks Tom for this.

 

The bad news isn't so bad, specially when you hear Tom's reason. He didn't agreed to add init/shutdown events to emhttp, because "Doing this will break a key unRaid concept: that of 'started' and 'stopped'. The idea is that when 'stopped' it's ok to perform maintenance tasks on your storage devices because they are not mounted. "

 

I do agree with him, so I won't support this kind of usage.

 

PS: all conversation can be found here.

.

Share this post


Link to post

Every time I update the plugin I see this

 

mv: cannot stat '/usr/local/emhttp/plugins/dynamix/OpenDevices.page': No such file or directory

 

 

Nothing to worry about I presume?

Share this post


Link to post

Every time I update the plugin I see this

 

mv: cannot stat '/usr/local/emhttp/plugins/dynamix/OpenDevices.page': No such file or directory

 

 

Nothing to worry about I presume?

 

It's harmless.

Share this post


Link to post

Every time I update the plugin I see this

 

mv: cannot stat '/usr/local/emhttp/plugins/dynamix/OpenDevices.page': No such file or directory

 

 

Nothing to worry about I presume?

 

It's harmless.

 

Good to know, thx!

Share this post


Link to post

Every time I update the plugin I see this

 

mv: cannot stat '/usr/local/emhttp/plugins/dynamix/OpenDevices.page': No such file or directory

 

 

Nothing to worry about I presume?

 

It's harmless.

 

Perhaps put a check for file existence in front of the mv command and suppress the message ?

 

Share this post


Link to post

Every time I update the plugin I see this

 

mv: cannot stat '/usr/local/emhttp/plugins/dynamix/OpenDevices.page': No such file or directory

 

 

Nothing to worry about I presume?

 

It's harmless.

 

Perhaps put a check for file existence in front of the mv command and suppress the message ?

I did, it was a typo.

Share this post


Link to post

Excellent work. Going to be testing this out tonight for a "critical files" duplicate.

 

 

Cheers,

 

BTW, this is SO good, it should be merged into main.

Share this post


Link to post

Excellent work. Going to be testing this out tonight for a "critical files" duplicate.

 

 

Cheers,

 

BTW, this is SO good, it should be merged into main.

 

Agreed !!!

+1

 

Share this post


Link to post

This is great, I installed it to connect some USB drive.

Once it was loaded I discovered there was still a old disk drive connected in the tower.

It was just sitting there doing nothing. So I removed it.

 

Now the drive shows up as "missing" and a remove config link, but it does delete.

No error message, just does not delete. (see attachement)

 

No big deal, just letting you know.

 

missing_drive.png.5e27f2662e0698e2f49338b2ed79d191.png

Share this post


Link to post

 

Now the drive shows up as "missing" and a remove config link, but it does delete.

No error message, just does not delete. (see attachement)

 

No big deal, just letting you know.

 

Thanks for reporting. Fixed and will be shipped with the next version.

Share this post


Link to post

Hi,

How about an option to mount ESXi Unraid boot drive?

i'm running unRAID as ESXi VM with vmdk as boot drive. after installing plugin, it shows there are no unassigned drives, but i can mount this drive manually from telnet session. 

Share this post


Link to post

Hi,

How about an option to mount ESXi Unraid boot drive?

i'm running unRAID as ESXi VM with vmdk as boot drive. after installing plugin, it shows there are no unassigned drives, but i can mount this drive manually from telnet session.

 

Please send me the output o this command:

 

ls -la /dev/disk/by-id

Share this post


Link to post

Hi,

How about an option to mount ESXi Unraid boot drive?

i'm running unRAID as ESXi VM with vmdk as boot drive. after installing plugin, it shows there are no unassigned drives, but i can mount this drive manually from telnet session.

 

Please send me the output o this command:

 

ls -la /dev/disk/by-id

 

root@Pagrabs:~# ls -la /dev/disk/by-id

total 0

drwxr-xr-x 2 root root 560 May  3 18:50 ./

drwxr-xr-x 7 root root 140 May  3 18:50 ../

lrwxrwxrwx 1 root root  9 May  3 18:50 ata-ST4000DM000-1F2168_Z3006MMA -> ../../sdf

lrwxrwxrwx 1 root root  10 May  3 18:50 ata-ST4000DM000-1F2168_Z3006MMA-part1 -> ../../sdf1

lrwxrwxrwx 1 root root  9 May  3 18:50 ata-ST4000DM000-1F2168_Z3006N12 -> ../../sdg

lrwxrwxrwx 1 root root  10 May  3 18:50 ata-ST4000DM000-1F2168_Z3006N12-part1 -> ../../sdg1

lrwxrwxrwx 1 root root  9 May  3 18:50 ata-ST4000VM000-1F3168_Z30194G7 -> ../../sde

lrwxrwxrwx 1 root root  10 May  3 18:50 ata-ST4000VM000-1F3168_Z30194G7-part1 -> ../../sde1

lrwxrwxrwx 1 root root  9 May  3 18:50 scsi-36000c2957b9007f4f3187489fa3f1d20 -> ../../sda

lrwxrwxrwx 1 root root  10 May  3 18:50 scsi-36000c2957b9007f4f3187489fa3f1d20-part1 -> ../../sda1

lrwxrwxrwx 1 root root  9 May  3 18:50 scsi-36b083fe0dca948001c75f493edfeb613 -> ../../sdc

lrwxrwxrwx 1 root root  10 May  3 18:50 scsi-36b083fe0dca948001c75f493edfeb613-part1 -> ../../sdc1

lrwxrwxrwx 1 root root  9 May  3 18:50 scsi-36b083fe0dca948001c75f6ef11fe7c65 -> ../../sdd

lrwxrwxrwx 1 root root  10 May  3 18:50 scsi-36b083fe0dca948001c75f6ef11fe7c65-part1 -> ../../sdd1

lrwxrwxrwx 1 root root  9 May  3 18:50 usb-Lexar_USB_Flash_Drive_WC8LEMWXWL3RX5HMBB3X-0:0 -> ../../sdb

lrwxrwxrwx 1 root root  10 May  3 18:50 usb-Lexar_USB_Flash_Drive_WC8LEMWXWL3RX5HMBB3X-0:0-part1 -> ../../sdb1

lrwxrwxrwx 1 root root  9 May  3 18:50 wwn-0x5000c5004fbb61a8 -> ../../sdg

lrwxrwxrwx 1 root root  10 May  3 18:50 wwn-0x5000c5004fbb61a8-part1 -> ../../sdg1

lrwxrwxrwx 1 root root  9 May  3 18:50 wwn-0x5000c5004fbb7d43 -> ../../sdf

lrwxrwxrwx 1 root root  10 May  3 18:50 wwn-0x5000c5004fbb7d43-part1 -> ../../sdf1

lrwxrwxrwx 1 root root  9 May  3 18:50 wwn-0x5000c50065cef6ab -> ../../sde

lrwxrwxrwx 1 root root  10 May  3 18:50 wwn-0x5000c50065cef6ab-part1 -> ../../sde1

lrwxrwxrwx 1 root root  9 May  3 18:50 wwn-0x6000c2957b9007f4f3187489fa3f1d20 -> ../../sda

lrwxrwxrwx 1 root root  10 May  3 18:50 wwn-0x6000c2957b9007f4f3187489fa3f1d20-part1 -> ../../sda1

lrwxrwxrwx 1 root root  9 May  3 18:50 wwn-0x6b083fe0dca948001c75f493edfeb613 -> ../../sdc

lrwxrwxrwx 1 root root  10 May  3 18:50 wwn-0x6b083fe0dca948001c75f493edfeb613-part1 -> ../../sdc1

lrwxrwxrwx 1 root root  9 May  3 18:50 wwn-0x6b083fe0dca948001c75f6ef11fe7c65 -> ../../sdd

lrwxrwxrwx 1 root root  10 May  3 18:50 wwn-0x6b083fe0dca948001c75f6ef11fe7c65-part1 -> ../../sdd1

root@Pagrabs:~#

 

Share this post


Link to post

Made some changes, can you test them for me?

 

Just run this command on your CLI and see if the disk appears:

 

wget https://raw.githubusercontent.com/gfjardim/unRAID-plugins/master/source/unassigned.devices/usr/local/emhttp/plugins/unassigned.devices/include/lib.php -O /usr/local/emhttp/plugins/unassigned.devices/include/lib.php

Share this post


Link to post

Made some changes, can you test them for me?

 

Just run this command on your CLI and see if the disk appears:

 

wget https://raw.githubusercontent.com/gfjardim/unRAID-plugins/master/source/unassigned.devices/usr/local/emhttp/plugins/unassigned.devices/include/lib.php -O /usr/local/emhttp/plugins/unassigned.devices/include/lib.php

 

no probs, just executed this but looks like no change..

should i restart array too?

Share this post


Link to post

Made some changes, can you test them for me?

 

Just run this command on your CLI and see if the disk appears:

 

wget https://raw.githubusercontent.com/gfjardim/unRAID-plugins/master/source/unassigned.devices/usr/local/emhttp/plugins/unassigned.devices/include/lib.php -O /usr/local/emhttp/plugins/unassigned.devices/include/lib.php

no probs, just executed this but looks like no change..

should i restart array too?

 

No need. Will have to investigate this further.

Share this post


Link to post

OK, found the root of the problem. Please do what's described in this topic, then send me the result of this command again:

 

ls -la /dev/disk/by-id

Share this post


Link to post

OK, found the root of the problem. Please do what's described in this topic, then send me the result of this command again:

 

ls -la /dev/disk/by-id

 

Hi again, i have disk.EnableUUID option in place..

if this option is missing then i have no option to add my esxi RDM drives to unRAID.

i have two RDM's in this config: Raid0 volume as parity and Raid1 volume as cache drive..

 

any other things to test?

Share this post


Link to post

Think I may have found a bug.

 

Powered on server with 2 new unassigned drives, array set to auto-start.

Both drives showed up in the unassigned devices area initially, hit spin down for all disks, drives are no longer listed showing "No unassigned disks available".

 

As I was planning to with the new drives, ran preclear_disk.sh -l and both unassigned disks show up fine, both are currently pre-clearing as expected.

I tried to refresh, etc... however they still don't show up.

 

Share this post


Link to post

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.