Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

9P Sharing files between host and guest

Featured Replies

Had a little tinker about with this as it seemed intriguing.

 

made a debian wheezy vm (have to select basic server utilities in tasksel)

 

 

modded user nobody to uid 99 in the vm and ran what apps i had as user nobody and group users, chown'ed the apps install folder and config output folders to nobody:users, and chmod 775

 

added dfltuid=99 and dfltgid =100 to the mount option in /etc/fstab and it worked like a charm with all my files written with the right ownership to suit unraid.

 

 

this was really helpful...

 

https://www.kernel.org/doc/Documentation/filesystems/9p.txt

  • 1 year later...
  • Replies 60
  • Views 49.7k
  • Created
  • Last Reply

I just created a Ubunut VM and I'm trying to share files between the VM and unRAID

 

    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/mnt/user/apps/'/>
      <target dir='apps'/>
      <alias name='fs0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </filesystem>

 

From the command line after reading this thread, I'm using 9p, and I'm mounting from the command line as such...

sudo mount -t 9p -o trans=virtio,version=9p2000.L,rw,dfltuid=99,dfltgid=100 apps /mnt

 

The command completes sucessfully, but, the directory is empty.  I have to be doing something wrong, but I can't see what.

 

9p is not recommended, I'd use cifs. I think the speed is better with cifs.

  • 2 years later...
On 4/27/2016 at 1:15 AM, jonathanm said:

9p is not recommended, I'd use cifs. I think the speed is better with cifs.

Is there a short howto somewhere that shows how to best mount host (unraid) folders in an ubuntu VM. You all show .xml, but where is that xml and what is considered source or target in host (unraid/slackware) guest (vm/ubuntu) setup?

1 minute ago, fluisterben said:

Is there a short howto somewhere that shows how to best mount host (unraid) folders in an ubuntu VM. You all show .xml, but where is that xml and what is considered source or target in host (unraid/slackware) guest (vm/ubuntu) setup?

Since you quoted me from 3 years ago, but your quote doesn't relate to your question, I'm not sure exactly what you are asking.

 

You can connect to unraid exactly the same way whether it's a VM or a bare metal PC. Nothing to do with xml. I haven't recently tried 9p (which does use xml) but my thoughts on the subject still stand. Easier and faster to just use samba (cifs).

3 hours ago, jonathanm said:

Since you quoted me from 3 years ago, but your quote doesn't relate to your question, I'm not sure exactly what you are asking.

 

You can connect to unraid exactly the same way whether it's a VM or a bare metal PC. Nothing to do with xml. I haven't recently tried 9p (which does use xml) but my thoughts on the subject still stand. Easier and faster to just use samba (cifs).

Why CIFS ? NFS is way more efficient within a trusted system like this, is it not? Or is a file locking feature still missing for NFS ?

1 hour ago, fluisterben said:

Why CIFS ? NFS is way more efficient within a trusted system like this, is it not? Or is a file locking feature still missing for NFS ?

Samba is easier for me to manage across multiple platforms. NFS is probably better for a pure linux environment, but I have to support SMB for some windows clients, so it's more convenient to only keep up with one scheme.

  • 10 months later...

OK, pulling this thread back up, because I have issues again;

 

I run a debian VM with (among others) nextcloud and nginx on it.

It has this part in its xml;

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

Now, the /nxt is working, from within the VM, but the permissions under it seem to be problematic. Even though I can set them just fine from within the VM, under /nxt, nextcloud still complains about "Home storage for user x not being writable" and it has issues within nextcloud sharing stuff. I've tried to find out why, but logs seem to be unclear as to why. Any ideas?

10 minutes ago, fluisterben said:

OK, pulling this thread back up, because I have issues again;

 

I run a debian VM with (among others) nextcloud and nginx on it.

It has this part in its xml;


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

Now, the /nxt is working, from within the VM, but the permissions under it seem to be problematic. Even though I can set them just fine from within the VM, under /nxt, nextcloud still complains about "Home storage for user x not being writable" and it has issues within nextcloud sharing stuff. I've tried to find out why, but logs seem to be unclear as to why. Any ideas?

Probably the permissions on the host side then.

21 minutes ago, saarg said:

Probably the permissions on the host side then.

They are just a 'Share', so, in my case /mnt/user/nxt, which does not show any settings for permissions relating to access from a VM. It shows the Export to Yes, 'Secure' for SMB, which this isn't, so: Should I change permissions from shell then? I have really no idea about the inner workings of that passthrough share by unraid, it's not documented anywhere.

9 hours ago, fluisterben said:

They are just a 'Share', so, in my case /mnt/user/nxt, which does not show any settings for permissions relating to access from a VM. It shows the Export to Yes, 'Secure' for SMB, which this isn't, so: Should I change permissions from shell then? I have really no idea about the inner workings of that passthrough share by unraid, it's not documented anywhere.

If the share setting is secure, that might be the issue.

You have different layers of permissions, from the host to the VM, then the user running nextcloud. You have to make sure both the VM and the user running Nextcloud have write permissions.

 

Can you write being root in the VM?

Can you write being the user running nextcloud in the VM?

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.