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.

Unraid Share Files not Immediately Updated in VM when Modified Remotely

Featured Replies

Unraid version is 6.12.4.

 

I've created a new Ubuntu 20.04 VM, and I'm passing through one of the shares using the Unraid Share Mode Virtiofs Mode.

I've mounted it in the VM as follows in the /etc/fstab.

Repository /mnt/repository virtiofs defaults 0 0

 

If I make a change to a file on the Repository network share on my Windows desktop computer, and save the change, the updated file is not immediately available within the VM. For example, I could add a new line to the end of a file, and if I 'cat' or 'nano' the file in the VM, the change is not there. After randomly using 'cat', 'nano' or 'ls' on the /mnt/repository directory for a minute or so, the changes eventually appear, though I'm not convinced any of those commands are doing anything to help.

 

If I watch an example file using 'watch -n1 cat /mnt/repository/test_file.txt', and change the contents on my remote machine, I've still not seen the changes appear for over 2 minutes now.

 

Is this an artifcat of using virtiofs? In the past, I've used 9p, and not had the same Issue. I've not tried that yet to see if is any better.

 

----

Update

In the event anyone else also suffered this issue, I've reverted to using 9p pass through instead. In the VM settings on Unraid, I changed the Unraid Share Mode to 9p Mode, and updated the /etc/fstab by replacing "virtiofs" with "9p". This now resolves my issue.

Edited by Progeny42
Added Update

  • 1 year later...

Not sure how helpful it is..., but I'm noticing the same behavior with a similar use case, on Unraid 7.0.1

I have a "unassigned device" custom script that automatically creates a new folder on my Unraid array and move new pictures from my mounted camera to it when I plug my camera to the Unraid server.

I noticed that my VM which has access to the Unraid array through virtiofs does not see the latest added content before multiple minutes later or possibly more... still monitoring. Files/folder are definitely there.

Edited by anonlio

  • 4 weeks later...

I experience the same problem, also with Unraid 7.0.1. Did you find anything out, yet? Maybe the mount options? I only use rw.

  • 2 months later...

Same behavior on Unraid 7.1.2, files moved over SMB share not showing

  • 2 weeks later...

I managed to fix this by removing the "cache mode" line inside the virtiofsd args:

    <filesystem type='mount' accessmode='passthrough'>
      <driver type='virtiofs' queue='1024'/>
      <binary path='/usr/libexec/virtiofsd' xattr='on'>
        <sandbox mode='chroot'/>
      </binary>
      <source dir='/mnt/user/music/'/>
      <target dir='music'/>
      <alias name='fs2'/>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    </filesystem>

I believe this changes the cache mode from "always" to "auto" - it may compromise performance slightly.

Libvirt only lists two options "none" and "always" in the XML so by removing it I assume it's using the "auto" setting (default in the virtiofsd manual).

  • 3 weeks later...
On 6/24/2025 at 4:33 PM, TomE said:

I managed to fix this by removing the "cache mode" line inside the virtiofsd args:

    <filesystem type='mount' accessmode='passthrough'>
      <driver type='virtiofs' queue='1024'/>
      <binary path='/usr/libexec/virtiofsd' xattr='on'>
        <sandbox mode='chroot'/>
      </binary>
      <source dir='/mnt/user/music/'/>
      <target dir='music'/>
      <alias name='fs2'/>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    </filesystem>

I believe this changes the cache mode from "always" to "auto" - it may compromise performance slightly.

Libvirt only lists two options "none" and "always" in the XML so by removing it I assume it's using the "auto" setting (default in the virtiofsd manual).

I have applied your fix just now. Will report in a few days if It appears to be fixed. Or earlier if not ;D
Thanks BTW, this issue is very annoying, I just had a big scare thinking I had lost my notes for today at work 😅

  • 2 weeks later...

Yep, it seems OK for me too now with the "cache mode" parameter removed 👍

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...

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.