9p mount appears empty


Recommended Posts

I am mounting a location in unRAID as follows:

 

In VM xml:

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

 

within this location (/mnt/user/Files/Temp) I have a files called test.txt and test2.txt for testing purposes:

 

test.txt was made by unRaid root user via commandline (root:root)

test2.txt was made over SMB share (nobidy:users)

 

If I boot VM (lubuntu 15.04 in this case) I run the following commands:

 

user@Lubuntu-VM:~$ sudo mount -t 9p -o trans=virtio /temp ./temp -oversion=9p2000.L,posixacl,cache=loose
user@Lubuntu-VM:~$ ls -la
total 116
drwxr-xr-x 22 user user  4096 Jan  9 16:24 .
drwxr-xr-x  3 root root  4096 Oct 19 15:47 ..
-rw-------  1 user user  2415 Jan  9 15:41 .bash_history
-rw-r--r--  1 user user   220 Oct 19 15:47 .bash_logout
-rw-r--r--  1 user user  3760 Oct 19 15:47 .bashrc
drwxrwxr-x  9 user user  4096 Jan  9 16:30 .cache
drwx------ 16 user user  4096 Oct 19 16:19 .config
drwx------  3 user user  4096 Oct 19 15:55 .dbus
drwxr-xr-x  2 user user  4096 Oct 19 15:55 Desktop
drwxr-xr-x  2 user user  4096 Oct 19 15:55 Documents
drwxr-xr-x  2 user user  4096 Oct 19 15:55 Downloads
drwx------  5 user user  4096 Jan  9 15:03 .dropbox
drwxr-xr-x  3 user user  4096 Oct 19 16:19 .dropbox-dist
drwxrwxr-x  3 user user  4096 Oct 19 16:15 dropbox-restore
drwx------  3 user user  4096 Jan  9 16:20 .gconf
drwxrwxr-x  3 user user  4096 Oct 19 15:55 .local
drwx------  4 user user  4096 Oct 19 16:14 .mozilla
drwxrwxr-x  2 user user  4096 Jan  9 15:25 music
drwxr-xr-x  2 user user  4096 Oct 19 15:55 Music
drwxr-xr-x  2 user user  4096 Oct 19 15:55 Pictures
-rw-r--r--  1 user user   675 Oct 19 15:47 .profile
drwxr-xr-x  2 user user  4096 Oct 19 15:55 Public
-rw-r--r--  1 user user     0 Oct 19 16:07 .sudo_as_admin_successful
drwxrwxrwx  1   99 users    6 Jan  9 16:25 temp
drwxr-xr-x  2 user user  4096 Oct 19 15:55 Templates
drwx------  4 user user  4096 Jan  9 16:23 .thumbnails
drwxr-xr-x  2 user user  4096 Oct 19 15:55 Videos
-rw-------  1 user user    55 Jan  9 16:20 .Xauthority
-rw-r--r--  1 user user    14 Oct 22  2012 .xscreensaver
-rw-------  1 user user   242 Jan  9 16:20 .xsession-errors
-rw-------  1 user user   242 Jan  9 15:38 .xsession-errors.old
user@Lubuntu-VM:~$ cd temp/
user@Lubuntu-VM:~/temp$ ls
user@Lubuntu-VM:~/temp$ mkdir test
user@Lubuntu-VM:~/temp$ ls
user@Lubuntu-VM:~/temp$

 

As you can see the mount command does not give any errors, the location appears mounted but after moving into the directory it's empty and when I create a directory within the mount it instantly disappears.

 

 

If I then log into my unRAID host machine I CAN see the created directory from above:

 

root@Tower:~# cd /mnt/user/Files/Temp
root@Tower:/mnt/user/Files/Temp# ls -la
total 4
drwxrwxrwx 1 nobody users    6 Jan  9 16:38 ./
drwxrwxrwx 1 nobody users 4096 Jan  9 16:21 ../
drwxrwxr-x 1 user    1000    6 Jan  9 16:31 test/
-rw-rw-rw- 1 root   root     0 Jan  9 16:25 test.txt
-rw-rw-rw- 1 nobody users    0 Jan  9 16:27 test2.txt

 

I feel like this is some sort of permissions issue, are there some extra options I should be adding to my initial mount command so that I can view files and folders within the VM on the mount.

 

 

Any help much appreciated!

 

Link to comment

No difference with fix!:

 

user@Lubuntu-VM:~$ sudo umount temp/
[sudo] password for user:
user@Lubuntu-VM:~$ sudo mount -t 9p -o trans=virtio /temp ./temp -o version=9p2000.L,posixacl,cache=loose
user@Lubuntu-VM:~$ cd temp/
user@Lubuntu-VM:~/temp$ ls
user@Lubuntu-VM:~/temp$ ls
user@Lubuntu-VM:~/temp$

 

location still contains files: see attachment.

 

 

Any other suggestions, I am willing to try anything!! (please no suggestions of just use SMB to mount instead of 9p, there is a reason I need 9p to work!)

 

Capture.PNG.3da244b8b96dc0b48fd4e87293780a49.PNG

Link to comment

I have also tried the following in my VM setup:

 

changing from /temp to temp as Virtio tag

 

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

 

and then

sudo mount -t 9p -o trans=virtio temp temp -o version=9p2000.L,posixacl,cache=loose

 

same results as before!!

Link to comment

I have also tried the following in my VM setup:

 

changing from /temp to temp as Virtio tag

 

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

 

and then

sudo mount -t 9p -o trans=virtio temp temp -o version=9p2000.L,posixacl,cache=loose

 

same results as before!!

 

You have to specify the options before the source and target directories. The sugestion below is based on target dir='temp'.

 

sudo mount -t 9p -o trans=virtio,version=9p2000.L,posixacl,cache=loose temp /temp

 

I would avoid using the same name for target dir in the XML and the directory inside the VM you mount it to.

Link to comment

I changed some of the settings to stop any ambiguity!!

 

I now have the Virtio Tag as unraidtemp:

 

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

 

the target folder is the folder "temp" in the users home directory.

 

 

I run:

sudo mount -t 9p -o trans=virtio,version=9p2000.L,posixacl,cache=loose unraidtemp /home/user/temp

 

 

As always, same results; /home/user/temp appears empty and if I create a file it instantly disappears but I can view it from unRAID!!

Link to comment

I changed some of the settings to stop any ambiguity!!

 

I now have the Virtio Tag as unraidtemp:

 

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

 

the target folder is the folder "temp" in the users home directory.

 

 

I run:

sudo mount -t 9p -o trans=virtio,version=9p2000.L,posixacl,cache=loose unraidtemp /home/user/temp

 

 

As always, same results; /home/user/temp appears empty and if I create a file it instantly disappears but I can view it from unRAID!!

I just tried it here and it works as it should in a Ubuntu 14.04 VM. Might be something Lubuntu specific.

Link to comment

First I made the directory.

 

sudo mkdir /test

 

I then used the last command you used:

 

sudo mount -t 9p -o trans=virtio,version=9p2000.L,posixacl,cache=loose isos /test

 

And the files shows up using

ls -la /test

 

This is in the XML file. Just added it by editing the template.

    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/mnt/cache/ISOs/'/>
      <target dir='isos'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </filesystem>

 

I used Ubuntu 15.04, not 14.04.

Link to comment

Is it possible that this is related to the architecture of the Host/Guest:

 

I originally tried all the above in a Vortexbox 2.3 VM (32bit), and when I was having no luck I quickly set up a lubuntu 15.04 VM for testing prior to setting up this topic (lubuntu was also 32bit as I happened to have the iso on my desktop for another reason).

 

I even updated lubuntu last night to 15.10 with the newest 4.0 kernel and still no joy.

 

Today when looking for further answers I learned that Vortexbox 2.4 was released and it is 64bit for the first time, I installed it in a VM and instantly the above worked, it had no problem mounting and viewing through the 9p filesystem!!

 

Since figuring this out I have been looking for ANY mention of a need for the Host and Guest to share the same architecture for 9p to work and I can find nothing!!

 

@saarg: what your ubuntu VM 32 or 64 bit?!

Link to comment

I have what appears to be the same issue.  http://lime-technology.com/forum/index.php?topic=45401.0 New Debian 8.2 install 32 bit install. 

 

uname-a

root@hdhomerun:~# uname -a
Linux hdhomerun 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt20-1+deb8u2 (2016-01-02) i686 GNU/Linux

Like you when I place files in the mount point, they disappear from the VM.  All interactive commands however seem to work, I can VI files, chmod them, just can't list them.

Link to comment
  • 1 month later...
I learned that Vortexbox 2.4 was released and it is 64bit for the first time, I installed it in a VM and instantly the above worked, it had no problem mounting and viewing through the 9p filesystem!!

 

I tried to install Vortexbox 2.4 but got stuck at boot with : "a start job is running on dev-disk", could you explain how you managed to install it ?

 

thank you for your help

Link to comment

I learned that Vortexbox 2.4 was released and it is 64bit for the first time, I installed it in a VM and instantly the above worked, it had no problem mounting and viewing through the 9p filesystem!!

 

I tried to install Vortexbox 2.4 but got stuck at boot with : "a start job is running on dev-disk", could you explain how you managed to install it ?

 

thank you for your help

 

Vortexbox installers expect the HDD to be mounted at /dev/sda rather than /dev/hda.

 

In order to achieve this you need to edit the XML to use SATA emulation rather than virtio during the install (you can change it back for better performance after the install)

 

See my posts from here on in this thread:

 

http://lime-technology.com/forum/index.php?topic=39189.msg365063#msg365063

 

**Note**

you may need to change

<address type='drive' controller='0' bus='0' target='0' unit='0'/>

to

<address type='drive' controller='1' bus='0' target='0' unit='0'/>

 

dependant on what controller/bus your installation ISO has been mounted in the XML.

 

Hope this helps,

 

The Capt.

 

Link to comment

 

One more question :

On Vbox 2.3 9p filesystem  wouldn't mount on boot, so I  used the post_startup script to mount Unraid shares. I cannot get it to work with Vortexbox 2.4. I also tried to modify fstab, but no success either.

How do you mount your  shares?

tq

 

Sorry for the delay getting back to you, I didn't see your reply;

 

I have a 9p mount working in vortexbox 2.4, here is my setup:

 

Relevant part of my virtual machine .xml file:

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

 

Screenshot of GUI setup attached.

 

My fstab inside the vortexbox VM:

 

UUID=a0008081-aa57-4fad-bf0b-2f64f1070a8a /                       ext4    defaults        1 1
UUID=33251abe-7e37-4570-b7e5-0a53a3886361 /boot                   ext4    defaults        1 2
UUID=3b66a5aa-1768-41da-bed4-cdcd304746ca swap                    swap    defaults        0 0
unraidmusic /storage/unraidmusic      9p      trans=virtio,version=9p2000.L,_netdev,rw        0 0

 

Hope this helps.

Capture.PNG.09a59c326930221e210b31ede4f63021.PNG

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.