Jump to content
We're Hiring! Full Stack Developer ×

Share an unassigned disk as soon as it's plugged in (USB)?


Mattaton

Recommended Posts

Okay, so first, I can't pass-thru a USB controller to my VM because something is messed up (libvirt errors, but the VM runs fine) and I'm not getting much help with it, so I'm trying other methods to get what I need.

 

Basically, I need a backup to run on a VM to an external drive. The drive plugs in via USB. I need the VM to somehow be able to "see" this drive or a share on the drive when it's plugged in. It's actually two drives that will be rotated every other day, so it can't just stay plugged in.

 

Is there any way to get a share to happen as soon as a disk is plugged in? I have automount and share turned on, but the share doesn't appear until I restart the array.

 

I'm thinking, if I can get a share to happen when it's plugged in, then the VM can backup to that share each night.

 

The person who will be in charge of swapping the disks each night has nothing to do with unRAID, so they can't fiddle with settings each time. They need to just be able to unplug one drive and plug in the other.

 

I'm all ears for other methods you can suggest!

 

Thanks!

Link to comment
2 minutes ago, Squid said:

Mount the drive via Unassigned Devices.  It'll automatically mount it when it sees it (and share it if the settings allow).  Then it'll be available over the network so the VM can see it

Gotcha. That's exactly what I was trying to do, but it didn't seem it was sharing when I plugged it in, but I guess it just took a second to show up. Seems to be working now.

Thanks!

Link to comment
1 hour ago, Mattaton said:

Gotcha. That's exactly what I was trying to do, but it didn't seem it was sharing when I plugged it in, but I guess it just took a second to show up. Seems to be working now.

Thanks!

UD sets up share configuration files and Unraid manages the enabling of the share in Samba.  Because of the way Unraid works, it can take up to a minute or so for the share to actually show up after UD mounts the disk.

 

What you are trying to do works fine.  Just be a little patient and the share will show up.

  • Like 1
Link to comment
3 minutes ago, dlandon said:

UD sets up share configuration files and Unraid manages the enabling of the share in Samba.  Because of the way Unraid works, it can take up to a minute or so for the share to actually show up after UD mounts the disk.

 

What you are trying to do works fine.  Just be a little patient and the share will show up.

Yep yep. I think this will work fine as an alternative to passing-thru. A little slower going over the network to access a drive that's plugged in, but at least it works! 🙂
The drive will be plugged in around 5pm each day and the backup won't run until midnight. Plenty of time for the share to show up. 🙂 

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.

×
×
  • Create New...