Mount Unraid Share in a Linux VM


luca2

10 posts in this topic Last Reply

Recommended Posts

ok, after some research I found some info and this is what I did to solve it...

edit vm xml and add in the GUI**:

 "unraid share"=/mnt/user0/movies/
 "unraid mount tag"=movies

then in the vm do this (or any folder you want):

    mkdir /home/ws1/movies 

then:

sudo -s nano /etc/fstab

and add at the end this line:

movies /home/ws1/movies 9p trans=virtio,version=9p2000.L,_netdev,rw 0 0

Reboot and that's it.

 

**the edit of the xml does this:

 

    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/mnt/user0/movies/'/>
      <target dir='movies'/>
      <alias name='fs0'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </filesystem>

I still have a question: if I want to add a second mapped unraid share ... can I just follow the same procedure and add this to the xml?

 

    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/mnt/user0/series/'/>
      <target dir='series'/>
      <alias name='fs0'/>
     
    </filesystem>

 

Link to post
2 minutes ago, trurl said:

Why are you using /mnt/user0/ instead of /mnt/user/ ?

Since it does not include system/appdata/domains shares I choosed user0. I don't want those system shares to be shared to the vm. I access them only with krusader's plugin.

Anything I may be missing?

Link to post
10 hours ago, trurl said:

user0 is the user shares excluding any files that may still be on cache. If any of those other user shares are cached then they may have new files there at times.

Hi, thx for pointing this out. It does not apply to me since I do not use cache for my shares. I only use cache for storing the vdisks.

Link to post
Just now, luca2 said:

Hi, thx for pointing this out. It does not apply to me since I do not use cache for my shares. I only use cache for storing the vdisks.

If shares are set to not use the cache then /mnt/user and /mnt/user0 will have exactly the same contents for such shares.

 

it is also worth pointing out that Limetech have already said that use of /mnt/user0 is deprecated and it may be removed in a future Unraid release.

Link to post
  • 1 month later...
On 11/25/2020 at 10:19 PM, luca2 said:

**the edit of the xml does this:

 


    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/mnt/user0/movies/'/>
      <target dir='movies'/>
      <alias name='fs0'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </filesystem>

I still have a question: if I want to add a second mapped unraid share ... can I just follow the same procedure and add this to the xml?

 


    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/mnt/user0/series/'/>
      <target dir='series'/>
      <alias name='fs0'/>
     
    </filesystem>

 

Hi all, I would also like to know how to add new mount tags after creation of a VM. Adding them in the Unraid WebGUI editor does not seem to work on my system.

Best,

OP

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.