Jump to content
Fredrick

Mount Unraid Share inside a Linux VM

7 posts in this topic Last Reply

Recommended Posts

Hi,

 

I'd think this should be fairly easy, but my google-skills seem to have failed me tonight. I've got a debian VM running, and simply want to mount or access /mnt/user/Downloads/youtube-dl inside this VM. How can I do this?

 

I'm not sure how "Unraid mount tag" works inside the settings for the VM, but I cant find the share after setting it up there. Tried various mount-tags such as "/mnt/youtube"

 

1574384110_ScreenShot2018-07-03at20_55_50.png.c35978e0a9b7132042265dfc4ce8f899.png 

Share this post


Link to post

If I'm understanding https://wiki.qemu.org/Documentation/9psetup correctly the "unRAID Mount tag" field just makes the tag (in your case "youtube") available to be mounted with a normal `mount` command such as:

`sudo mount -t 9p -o trans=virtio youtube /mnt/youtube`

 

Assuming `/mnt/youtube` existed the above command would mount your `youtube` host share location (in your case `/mnt/user/Downloads/youtube-dl/`) at `/mnt/youtube' in your VM.

 

So "unRAID share" doesn't actually auto-mount anything - still need to set that up with fstab as usual.

 

Edited by JonMikelV
Fixed "vrtio" typo

Share this post


Link to post
13 hours ago, Fredrick said:

any idea what I could do to get past this error?

Errmm...probably fixing the typo I put in my post will do the trick (oops!)

 

Try "virtio" instead of "vrtio".

  • Like 1
  • Thanks 1

Share this post


Link to post

Just wanted to say thanks for the above info, new to unriad/virtio and was keen to test this out, the following worked fine for me 

 

sudo mount -t 9p -o trans=virtio "Unraid Mount tag" /mnt/example

  • Like 2
  • Thanks 1

Share this post


Link to post
On 8/4/2019 at 2:01 PM, mangopakcet said:

Just wanted to say thanks for the above info, new to unriad/virtio and was keen to test this out, the following worked fine for me 

 

sudo mount -t 9p -o trans=virtio "Unraid Mount tag" /mnt/example

Thanks for that. It works for me aswell.

 

Does anyone know the correct string in /etc/fstab ?

 

greg

Share this post


Link to post
Posted (edited)

Here's what ultimately worked for me.

~~~ VM Config:
Unraid Share: /mnt/user
Unraid Mount tag: user

~~~ Addition to /etc/fstab:
#2020-04-14 Sample auto-mount via "Unraid Mount tag"
user        /mnt/user     9p    trans=virtio,version=9p2000.L,_netdev,rw    0    0

I've read that 9p is actually pretty bad for performance but I've never been bothered enough to figure out an alternative. 🙂

Note that I got a pretty big speed boost by adding msize=262144:

user       /mnt/user    9p   msize=262144,trans=virtio,version=9p2000.L,_netdev,rw    0    0

Of course I only tested with a simple dd command, so YMMV:

dd if=/dev/zero of=/mnt/user/testfile bs=1G count=1 oflag=direct; rm ~/mnt/user/testfile

 

Edited by JonMikelV
add msize & performance test info

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.