September 27, 20232 yr 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 September 30, 20232 yr by Progeny42 Added Update
March 14, 20251 yr 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 March 14, 20251 yr by anonlio
April 10, 20251 yr 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.
June 24, 20251 yr 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).
July 10, 2025Jul 10 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 Thanks BTW, this issue is very annoying, I just had a big scare thinking I had lost my notes for today at work 😅
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.