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.

VirtioFS Support Page

Featured Replies

On 7/28/2024 at 10:50 AM, kadajawi said:

The day I wrote that it's stable it stopped being stable again. Can't find files and folders that are too long though. Oh well. It seems to be a different problem though, as rebooting will solve the issue, rather than shutting down and starting up again.

I've been running 7 since it was the 6.13 closed beta and have had only minor issues. Not even a crash. I suggest trying Unraid 7 and see if it helps. If not roll back.

  • Replies 441
  • Views 136.8k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • mackid1993
    mackid1993

    VirtioFS and Memory backing seems much more stable in 6.12-rc2. I have almost a day of uptime and I'm backing up to backblaze in my Windows VM with no issue.   I found this (https://github.c

  • How To: Setup VirtioFS Under Windows and Mount Multiple Unraid shares as individual drive letters. VirtioFS under Windows is now stable as of Unraid 6.12.5 (QEMU 7.2) and Virtio Drivers 0.1.248-1

  • mackid1993
    mackid1993

    I was able to run Virtiofsd with the --inode-file-handles=mandatory switch. I created a script:   #!/bin/sh exec /usr/libexec/virtiofsd --inode-file-handles=mandatory -o sandbox=chroot "$@"

Posted Images

Does anyone have updated instructions on making this work with Backblaze? I'm finding that it refuses to back up anything from virtiofs shares. Looking at logs, it looks like it tags the drive as empty on first install (and indeed, the share/z: suddenly won't load). If I reboot or restart the virtiofs service it loads again fine, but seems to still have issues and never upload the file.

 

Edit: When backblaze installs, it scans for files. It seems this scan causes the virtiofs service to fail. The service is still running, but the drive stops working. If I restart the service in Windows, it crashes before coming back up in a working state. Is version 248 known to have issues? Where are logs in Windows?

Edited by rampantandroid

On 8/2/2024 at 3:29 PM, rampantandroid said:

Does anyone have updated instructions on making this work with Backblaze? I'm finding that it refuses to back up anything from virtiofs shares. Looking at logs, it looks like it tags the drive as empty on first install (and indeed, the share/z: suddenly won't load). If I reboot or restart the virtiofs service it loads again fine, but seems to still have issues and never upload the file.

 

Edit: When backblaze installs, it scans for files. It seems this scan causes the virtiofs service to fail. The service is still running, but the drive stops working. If I restart the service in Windows, it crashes before coming back up in a working state. Is version 248 known to have issues? Where are logs in Windows?

I have mine set up with individual drive letters for each share, and Backblaze has been stable for several months now. I have 10 TB backed up

  

5 hours ago, mackid1993 said:

I have mine set up with individual drive letters for each share, and Backblaze has been stable for several months now. I have 10 TB backed up

 

Do you know what versions of virtiofs and winfsp you're using? For me, it consistently fails to handle a share with ~2TB on it. During install of Backblaze the virtual drive dies, and then if I let the VM run when backblaze tries to scan again, it'll fail again. I've fed the VM anywhere from 8GB of RAM to 16GB.

 

I can try adding a new share with a few files on it and see if THAT works.

Edited by rampantandroid

8 hours ago, rampantandroid said:

  

 

Do you know what versions of virtiofs and winfsp you're using? For me, it consistently fails to handle a share with ~2TB on it. During install of Backblaze the virtual drive dies, and then if I let the VM run when backblaze tries to scan again, it'll fail again. I've fed the VM anywhere from 8GB of RAM to 16GB.

 

I can try adding a new share with a few files on it and see if THAT works.

.248 Virtio drivers. WinFSP 2.0.23075.

Maybe go into device manager and make sure the Virtiofs device is not using an older driver sitting in the driver store. I've seen that before.

image.thumb.png.bcaff16fef2330d5a08852e607e0b5ed.png

Edited by mackid1993

On 8/5/2024 at 2:29 AM, rampantandroid said:

  

 

Do you know what versions of virtiofs and winfsp you're using? For me, it consistently fails to handle a share with ~2TB on it. During install of Backblaze the virtual drive dies, and then if I let the VM run when backblaze tries to scan again, it'll fail again. I've fed the VM anywhere from 8GB of RAM to 16GB.

 

I can try adding a new share with a few files on it and see if THAT works.

Have you been able to resolve this? Are you on 7?

 

I'm having the same issue but I am on 6.12.10.

 

Thanks!

On 8/12/2024 at 12:14 PM, intoran said:

Have you been able to resolve this? Are you on 7?

 

I'm having the same issue but I am on 6.12.10.

 

Thanks!

I have not. VirtioFS is completely useless for me. Attempting to read files it'll always fail for me on Windows 10 and Windows 11. I haven't tried Linux VMs. I followed the instructions posted in this thread to install WinFSP and the ISO with support drivers.


Whether I'm mass copying files off the virtual drive or Backblaze is trying to enumerate files to back up, the virtiofs drive blows up after a couple of minutes and I have to restart the winfsp and the virtiofs services or just reboot.

 

I'm on 6.12.11 and most up to date winfsp and driver ISO used. I verified the correct drivers are loaded. I turned on logging for virtiofs and got no immediately obvious failure. I've just kinda given up on it as the functionality seems to be broken.

 

The only thing I haven't tried is if the issues are related to my using ZFS instead of a traditional Unraid array backed by XFS.

Edited by rampantandroid

I've additionally upgraded to the 262 version of virtio tools from the Fedora site - this still has issues. I don't know if this is just some issue with libvirt that is in unraid. 8.7 is from 2022.

 

Edit: I additionally turned on hugepages. I doubted they would help and indeed they made no difference.

Edited by rampantandroid

  • Author
  • Community Expert
5 hours ago, rampantandroid said:

I've additionally upgraded to the 262 version of virtio tools from the Fedora site - this still has issues. I don't know if this is just some issue with libvirt that is in unraid. 8.7 is from 2022.

 

Edit: I additionally turned on hugepages. I doubted they would help and indeed they made no difference.

If you are using 6.12 series the version of virtiofsd is old and not the not rust version 

7 hours ago, SimonF said:

If you are using 6.12 series the version of virtiofsd is old and not the not rust version 

Yeah, I know that qemu and libvirt are both 2022 versions and we’ll get new ones on Unraid 7. For now I’m going the wasteful route of feeding my VM a 5TB virtual disk and copying data to it. I’ve got the space in my array to do it for now and hopefully virtiofs works correctly soon. 

On 8/14/2024 at 4:10 PM, rampantandroid said:

Yeah, I know that qemu and libvirt are both 2022 versions and we’ll get new ones on Unraid 7. For now I’m going the wasteful route of feeding my VM a 5TB virtual disk and copying data to it. I’ve got the space in my array to do it for now and hopefully virtiofs works correctly soon. 

It's possible you have some file names/paths that are over 255 characters long. Windows doesn't support this and it will cause VirtioFS to crash. Something like this may help: https://github.com/deadlydog/PathLengthChecker

 

ViritoFS is totally stable, I've been using it for months and months with zero crashes and have 10 TB backed up to Backblaze. It's something else causing your issues.

Edited by mackid1993

  • 2 weeks later...
On 8/3/2024 at 3:29 AM, rampantandroid said:

Does anyone have updated instructions on making this work with Backblaze? I'm finding that it refuses to back up anything from virtiofs shares. Looking at logs, it looks like it tags the drive as empty on first install (and indeed, the share/z: suddenly won't load). If I reboot or restart the virtiofs service it loads again fine, but seems to still have issues and never upload the file.

 

Edit: When backblaze installs, it scans for files. It seems this scan causes the virtiofs service to fail. The service is still running, but the drive stops working. If I restart the service in Windows, it crashes before coming back up in a working state. Is version 248 known to have issues? Where are logs in Windows?

I have also experienced this. I mounted /mnt/user/ to Z drive in VM then when Backblaze scans, it just hangs, and then after a while the Z drive is not accessible anymore. I will try the path checker tool.

On 8/5/2024 at 9:04 AM, mackid1993 said:

I have mine set up with individual drive letters for each share, and Backblaze has been stable for several months now. I have 10 TB backed up

 

I tried to map individual drives for each share and Backblaze successfully scans the drives. I'm not successful when I map the whole  /mnt/user/ to 1 drive. But before that, I removed the files and paths that were 255 characters long and if I can't remove it, for some reason, I just don't sync it in Backblaze. I don't know if it helps but currently, Backblaze is backing up my files and I'm happy with my setup. 👍

15 hours ago, HHUBS said:

 

I tried to map individual drives for each share and Backblaze successfully scans the drives. I'm not successful when I map the whole  /mnt/user/ to 1 drive. But before that, I removed the files and paths that were 255 characters long and if I can't remove it, for some reason, I just don't sync it in Backblaze. I don't know if it helps but currently, Backblaze is backing up my files and I'm happy with my setup. 👍

Well those paths aren't supported by Windows but are fine in Linux so that could explain the crash.

  • 3 weeks later...

I am having an issue I hope ya'll can help with.  I used the scripts provided by @mackid1993 to get a folder from my unraid box mounted and stable on a windows VM.  It worked great for almost 2 months!  Thanks for providing it, great work!  I had backed up 59 of 60.5tb of data to backblaze.

 

Unfortunately, the drive stopped working on 9/11/24.  Now when the script runs to mount the drive, I see three events in my windows event viewer.
 

Information: "launcher-x64: create virtiofs\viofsZ = 0"
Error: "virtiofs: the service VirtIO-FS has failed to start (Status=c0000185)."
Information: "launcher-x64: terminated virtiofs\viofsZ"

 

I have reinstalled WinFSP and the virtio-win-0.1.248 drivers (my VirtIO FS driver version is 100.94.104.24800)

 

Here is the virtiofs section of my vm config -
 

    <filesystem type='mount' accessmode='passthrough'>
      <driver type='virtiofs' queue='1024'/>
      <binary path='/usr/libexec/backup.sh' xattr='on'>
        <cache mode='always'/>
        <sandbox mode='chroot'/>
      </binary>
      <source dir='/mnt/user/backup'/>
      <target dir='backup'/>
      <alias name='fs0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </filesystem>

 

Here is the script at /usr/libexec/backup.sh
 

#!/bin/bash

# process -o option but ignore it because unraid generates the command for us
VALID_ARGS=$(getopt -o o -l fd: -- "$@")i
if [[ $? -ne 0 ]]; then
  exit 1;
fi

eval set -- "$VALID_ARGS"
while [ : ]; do
  case "$1" in
    --fd )
      FD="$2"
      shift 2
      ;;
    -o )
      shift 1
      ;;
    -- )
      shift;
      break
      ;;
    * )
      shift;
      ;;
  esac
done

# https://gitlab.com/virtio-fs/virtiofsd
/usr/libexec/virtiofsd \
        --fd="$FD" \
        --shared-dir="/mnt/user/backup" \
        --xattr \
        --cache="never" \
        --sandbox="chroot" \
        --inode-file-handles="mandatory" \
        --announce-submounts \
        --syslog

 

and here is the mount script I'm using on my windows vm

@echo off
:: Check for admin privileges
net session >nul 2>&1
if %errorlevel% == 0 (
    echo Running with admin privileges
) else (
    echo Running without admin privileges
    echo Attempting to elevate process...
    PowerShell -Command "Start-Process -Verb RunAs -FilePath '%comspec%' -ArgumentList '/c %~f0'"
    exit /b
)
:: Rest of your batch file starts here
REM Modify the Drive Letters such as viofsJ J: as well as the tag (tag1) to match the tags (case senstive) set in Unraid.

"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsZ backup Z:

 

TIA for any assistance / guidance you can provide :)

3 hours ago, SnarfsMojo said:

I am having an issue I hope ya'll can help with.  I used the scripts provided by @mackid1993 to get a folder from my unraid box mounted and stable on a windows VM.  It worked great for almost 2 months!  Thanks for providing it, great work!  I had backed up 59 of 60.5tb of data to backblaze.

 

Unfortunately, the drive stopped working on 9/11/24.  Now when the script runs to mount the drive, I see three events in my windows event viewer.
 

Information: "launcher-x64: create virtiofs\viofsZ = 0"
Error: "virtiofs: the service VirtIO-FS has failed to start (Status=c0000185)."
Information: "launcher-x64: terminated virtiofs\viofsZ"

 

I have reinstalled WinFSP and the virtio-win-0.1.248 drivers (my VirtIO FS driver version is 100.94.104.24800)

 

Here is the virtiofs section of my vm config -
 

    <filesystem type='mount' accessmode='passthrough'>
      <driver type='virtiofs' queue='1024'/>
      <binary path='/usr/libexec/backup.sh' xattr='on'>
        <cache mode='always'/>
        <sandbox mode='chroot'/>
      </binary>
      <source dir='/mnt/user/backup'/>
      <target dir='backup'/>
      <alias name='fs0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </filesystem>

 

Here is the script at /usr/libexec/backup.sh
 

#!/bin/bash

# process -o option but ignore it because unraid generates the command for us
VALID_ARGS=$(getopt -o o -l fd: -- "$@")i
if [[ $? -ne 0 ]]; then
  exit 1;
fi

eval set -- "$VALID_ARGS"
while [ : ]; do
  case "$1" in
    --fd )
      FD="$2"
      shift 2
      ;;
    -o )
      shift 1
      ;;
    -- )
      shift;
      break
      ;;
    * )
      shift;
      ;;
  esac
done

# https://gitlab.com/virtio-fs/virtiofsd
/usr/libexec/virtiofsd \
        --fd="$FD" \
        --shared-dir="/mnt/user/backup" \
        --xattr \
        --cache="never" \
        --sandbox="chroot" \
        --inode-file-handles="mandatory" \
        --announce-submounts \
        --syslog

 

and here is the mount script I'm using on my windows vm

@echo off
:: Check for admin privileges
net session >nul 2>&1
if %errorlevel% == 0 (
    echo Running with admin privileges
) else (
    echo Running without admin privileges
    echo Attempting to elevate process...
    PowerShell -Command "Start-Process -Verb RunAs -FilePath '%comspec%' -ArgumentList '/c %~f0'"
    exit /b
)
:: Rest of your batch file starts here
REM Modify the Drive Letters such as viofsJ J: as well as the tag (tag1) to match the tags (case senstive) set in Unraid.

"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsZ backup Z:

 

TIA for any assistance / guidance you can provide :)

What prints out to the console when you run the mount script?

On 9/20/2024 at 5:23 PM, mackid1993 said:

What prints out to the console when you run the mount script?

Running with admin privileges
OK

 

14 hours ago, SnarfsMojo said:
Running with admin privileges
OK

 

That sounds like it mounted. When you are using this script the service is not supposed to start so those events make sense.

Information: "launcher-x64: terminated virtiofs\viofsZ" looks like something is killing the process. This looks like something within the VM to me. Maybe try the newer virtio drivers.

9 hours ago, mackid1993 said:

That sounds like it mounted. When you are using this script the service is not supposed to start so those events make sense.

Information: "launcher-x64: terminated virtiofs\viofsZ" looks like something is killing the process. This looks like something within the VM to me. Maybe try the newer virtio drivers.

updated the drivers to the latest version, same results.

 

Also, it should probably be mentioned that I can't manually start the VirtIO FS service either.  When I try to it throws the error "Windows could not start the Virt-IO FS Service service on Local Computer.  Error 1117: The request could not be performed because of an I/O device error."

Maybe test in another VM to see if it's Windows or Unraid. Also perhaps maybe something got messed up in your XML. I've seen Virtofs shares refuse to mount because something in the xml got messed up. You can try recreating the VM template.

  • 2 weeks later...

FYI anyone having issues getting their VM's to start in 7.0.0.-beta3 see here: 

 

TL;DR run: 

sed -i 's/$options\[\] = "--fd=".$argoptions\['"'"'fd'"'"'\];/if (isset($argoptions\['"'"'fd'"'"'\])) {\n    $options[] = "--fd=".$argoptions\['"'"'fd'"'"'\];\n}/' /usr/local/emhttp/plugins/dynamix.vm.manager/scripts/virtiofsd.php 

 and insert into /boot/config/go to make persistent. (ie, nano /boot/config/go and paste this line in) just remove it prior to the next release.

I have an issue with read-only folders in shared. I can manually crete/modify/delete files and (sub-)folders, but "read-only" flag breaks some soft. Is it possible to avoid flagging folders this way?

Win11 in VM, Unraid 6.12.3, xfs filesystem

installed WinFSP and other things using videoguide

8 hours ago, kek_tigra said:

I have an issue with read-only folders in shared. I can manually crete/modify/delete files and (sub-)folders, but "read-only" flag breaks some soft. Is it possible to avoid flagging folders this way?

Win11 in VM, Unraid 6.12.3, xfs filesystem

installed WinFSP and other things using videoguide

I have never seen this. Maybe check the file permissions on the server.

9 hours ago, mackid1993 said:

Maybe check the file permissions on the server.

I've tried setting share's security to public and manually chmod/chown folders. No success

Now I noticed, all folders in my VM, including ones I've just created in Desktop, have partial "read-only" flag. Same behavior can be seen in SpaceinvaderOne's video on 08:43. And as long as software I need works perfectly with VM's internal drive, readonly flags are not the issue. Looks like it just doesn't work this way

 

Thank you for your attention 🙂

Edited by kek_tigra
Additions

Any chance there is a setup guide for an idiot to make this work?

I've read so much and i have no idea how to make this 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.

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.