November 21, 20241 yr Hi ! I've posted this on the subreddit a few days ago, with no avail. Since it's quite an urgent situation for me, I really would like to give a shot here either. I didn't do it earlier because I was not sure at 100% if it was the right place for that. But I'm ginna give a shot ! For the context : I've a server which I wanted to make even more important on my network setup. So I've decided to throw a GPU, setup a VM correctly with GPU Passthrough and make it my main PC while others computers would RDP to it. But i'm hitting a huge huge wall : Shares and network drives. For context, a long ago I created a share specifially to make it a Network Drive and use it the same as a HDD you'd put in duo with a SSD on a basic PC in order to store your data and have everything working well. But the real issue is that, I end up with this share (and the whole array tbh) to be forced to be a Network Drive. And it's a huge problem. Everything is slow. Using Dolphin (a GC emulator), I'm hitting HUGE lags and slows down. It seems logic based on the fact that the game AND the emulator are both on a network drive. I want to see what could be the solution, I'm really frustrated by the idea of the drives being on the same hardware and not being able to do anything viable. Since I wanted to use Unraid to make the viable big PC, I really would like to know what my solutions could be outside of ADDING another drive outside of that array. Why ? Because well, if I do so, my whole array would be quite... Useless as you can imagine. I really would like to see that as a last resort thing, even if i'd even think about moving back to another OS in order to enjoy all these drives and having a more stable setup. What are my solutions here ? Is there a way to make that array as a drive without relying on the network ? Thanks a lot !
November 21, 20241 yr ? so you want to vfio bind and pass a G-card to make a windwos gaming VM as a termial clinet, and run unraid shares along with it? yes this is doable. This is a common challenge when using Unraid as a daily-driver system with GPU passthrough and network shares. While Unraid excels as a NAS and virtualization platform, using it as a gaming PC or VM host for tasks like emulation often reveals the limitations of its network-based share handling. Here are some potential solutions to improve your setup: Key Issues Performance Bottleneck: Using shares or network drives for applications like emulation (e.g., Dolphin) can introduce significant latency since both the emulator and game files are being accessed over the network protocol, even though they're physically on the same machine. Drive Access: Unraid's parity-protected array isn't ideal for workloads requiring constant, low-latency access like gaming or emulation. Potential Solutions Here are several ways to resolve the issue without abandoning your Unraid setup or adding a separate drive outside the array: 1. Use an "Unassigned Device" for Fast Local Access What it is: The Unassigned Devices plugin in Unraid allows you to use drives outside of the array for direct access. How it helps: By dedicating a drive to the VM (outside the array), you can bypass the network layer entirely, offering faster performance. The plugin is very easy to install from the Unraid Community Applications marketplace. Steps: Install the Unassigned Devices plugin. Mount a drive (SSD recommended) using Unassigned Devices. Pass this drive directly to the VM as a local disk for storing emulation files or game data. 2. Create a Virtual Disk on the Array What it is: Instead of accessing shares as a network drive, you can create a virtual disk (vDisk) on the array and assign it to the VM. How it helps: The VM sees the vDisk as a local drive, significantly improving performance compared to accessing files over SMB/NFS shares. Steps: Go to your VM settings and create a new vDisk on the array. Assign the vDisk to the VM, formatting it as a local storage device within the OS. Move your emulation files to this vDisk for direct access. 3. Tune SMB/NFS Performance If you're set on using the network drive approach, optimize your SMB/NFS settings: Disable "Cache Floor" in Unraid settings to ensure cache writes are optimized. Enable Direct IO: Go to the share settings in Unraid and set "Tunable (direct IO)" to "Yes." Use an SSD Cache Pool: If your array is slower HDDs, configure an SSD as a cache drive for the share. Optimize SMB/NFS Configuration: Ensure jumbo frames are enabled on your network (MTU 9000). Use the latest SMB protocol version supported by your system. 4. Pass Through the Entire Array (Not Network Shares) What it is: Use PCIe passthrough to pass the storage controller (or individual drives) directly to the VM, bypassing the Unraid array layer. How it helps: The VM sees the drives as local disks, and performance is no longer hindered by Unraid's parity system or network overhead. Steps: Go to your VM settings in Unraid. Assign the array drives (or their controller) directly to the VM. Ensure you're comfortable with your array being inaccessible outside the VM while it's running. 5. Utilize a Dual-Boot Setup If the VM solution feels too restrictive, you could consider running a dual-boot setup: Boot into a dedicated OS (e.g., Windows/Linux) for high-performance tasks. Keep Unraid as the primary OS for NAS functionality when not gaming. Recommendation If you want the simplest and most effective solution: Use Unassigned Devices for emulation files and critical applications. Enable Direct IO for shares that remain on the array to improve network performance. This approach balances ease of use, Unraid’s NAS capabilities, and VM performance without requiring additional hardware also review: as i have detailed the process have many linked video to follow to assist
November 21, 20241 yr Author Hi ! First of all, thanks for the time for your answer. Let me try to review each of the solution and the questions / issues I've found. If it can help, avoiding the network share would be my first priority. #1 : As said on my first post, I'd like to avoid to use / add another drive. For the simple reason if I do that, I'll put the most important stuff outside of my array, making pretty much everything... Not protected and unraid quite useless. #2 : The virtual disk is really a cool cool solution. But the issue is that these files couldn't be accessed from others PC outside right ? Like if i use another PC and I don't want to rdp for whatever reason, these files would be not... Accessible right ? So it's quite an issue for that. But it's still a decent solution. #3 : Well as said, since I'd like to avoid Network drive as much as possible, I'm not sure if this is the best approach. But still something to apply meanwhile in order to help for that. I'm gonna take this in case #4 : Seems a really solid solution. Same as #2, but I feel like losing the possibility to watch my media etc feels like in the end something closer to a basic windows with a VM layer on the top. But I'd protect my data in case. So I like this possibility. It's ok if I can access everything once the VM is turned off. #5 : Dual-Boot would still create the same issue no ? The array stuff on a Windows OS for example would be difficult right ? Also I went for the VM way (I forgot to say it) because I wanted to keep one on W10 'forever' for specific softwares AND having a recent OS one like a Linux for the every day use. Proxmox : i feel like it's being a little too much tech for me. Not sure. Anyway, i'll take the time to look at your links. Thanks a lot ! ❤️
November 22, 20241 yr Recommendation Based on your priorities: Cache Pool for VM Storage: Store VM disks on a fast SSD cache. Combine this with network shares for media or infrequently used data. Pass-Through for Dedicated Use: Use passthrough for GPU, disks, or USB devices as needed to enhance VM performance while keeping critical files in the protected array. Hybrid Virtualization: For day-to-day tasks, consider a Linux VM with GPU passthrough. Use the Windows VM for legacy software or specific needs. Avoid Network Latency: Minimize network share reliance unless necessary. Local storage and optimized passthrough setups will provide better performance. Unraid setups, particularly regarding GPU passthrough, network drives, and VM configurations. Here’s a structured response to your points and concerns: Avoiding a Network Share Primary Concern: Network shares introduce latency, limit direct file access, and don't offer the same seamless experience as local storage. Possible Solution: One way to maintain direct file access without adding drives outside the array could involve leveraging cache drives or Unraid’s built-in disk share capabilities. If your array has a cache pool, you can configure it to act as high-speed storage for the VM without compromising data redundancy. Solution #1: Avoiding an Additional Drive Your reasoning is sound—placing critical data outside the array risks losing Unraid’s redundancy benefits. However, if you need high-speed VM-specific storage, consider using: Cache Pool: Configure SSD(s) as part of your cache pool for VM storage. Unraid allows moving files between the cache and the protected array automatically. Array-Backed Virtual Disks: Store the VM image or disk on the array itself, which ensures it's still protected. Solution #2: Virtual Disk Benefit: Virtual disks keep your VM storage self-contained, making management easier. Drawback: Accessing files stored within the virtual disk from other machines becomes a challenge unless you set up a network share from the VM. Workaround: Use tools like VirtIO drivers or passthrough a physical disk/partition. If file sharing between the host and VM is critical, consider configuring a shared folder using Unraid’s built-in sharing tools or advanced mount configurations. Solution #3: Network Drive While you prefer avoiding this, it can be a useful temporary option. Set up SMB shares and mount them in the VM for file access. To minimize performance issues: Use a high-speed internal network connection (e.g., 10GbE or direct connection if possible). Consider hosting critical files locally on the VM for frequently accessed data. Solution #4: Access While VM Is Turned Off Implementation: Using virtual disks or passthrough solutions can limit file access if the VM is powered down. However: Store media and critical files in array shares accessible from any system on your network, including the host OS. Consider creating a hybrid approach: lightweight network shares for media alongside VM-local data for compute-heavy tasks. Solution #5: Dual-Boot You’re correct—dual-boot setups complicate array access. Windows would require special tools like UnraidArrayReader (or similar) to access the array. Given your intent to maintain separate environments for Windows and Linux, a dual-boot setup seems less ideal. Proxmox While powerful, Proxmox might be overkill for your use case if you're less familiar with its intricacies. Unraid’s ecosystem is better tailored for mixed storage/VM/media setups. If you decide to explore Proxmox: Evaluate whether its ZFS support or containerized virtualization aligns with your goals.
November 23, 20241 yr Author Hi ! Sorry for the delay with my answer, my life has been quite a rush haha. First of all, thanks a lot for your answer ! Really helpful. However, I'm gonna have to disturb a little more in order to be sure of what i should go for since i'd like to settle with that solution for a long long term and solve all my issues in the future. First of all, to give more details of what i'd like / what i've : My VMs are stored in a SSD already outside of the array. It's just the local disk so if the SSD would end up to die, I don't really care of not having any backup plans. Atm i only have one W10 VM but i've plans to add more on it in the future in case. After some thoughts, I'd need to stay on the Windows eco-system for longer as my main OS. So it'd be oriented to that. And a 3rd VM for a Linux since I still like to use it. Now back to the issue with my Array and avoiding the network share : Solution #1 might be interesting if I understand it right : I could add a nvme outside of the array and being able to send the data on it to my array ? Like a sync and that way making it available for my other PCs easily in case I want to use these tools / stuff OUTSIDE of my VM ? Solution #2 : I'm gonna work on that later on today with a little vdisk to give a try. I'm not really interested to do a network share inside of my VM. But at the same time i'm not interested to have everything blocked behind a vdrive if I want / need to access my files another way... So yeah it seems to be a simple and effective solution, I don't find that really comfortable for me in the long term run... And I'm not sure how to setup correctly with drivers ? Like i'm quite a noob for that sorry x_x ! This feels like an ideal solution, only if the files on that vdrive is easily available from the outside. Solution #3 : I did some tweaks, putting the criticals files on my ssd etc, that solves all the issues, but I still have the HUGE problem of it not being on my array, so not viable at all. And since my array drives are on the same hardware as my VM and that everything is directly connected to my network, I don't feel any real gain sadly. Solution #4 : If I understand it well, I could have my array with all my files, but select which share would be accessible or not when the VM is on ? Because if so, it's just perfect because pretty much, I'd just need my movies / series to be available on my TV. The rest is fine if it's not accessible if the VM is on SINCE i'd use it. How could I make that possible in an easy way ? Everything i've found about the Array passthrough was just symbolic links and this is something i've ran away from, And i don't want to deal with that anymore. Thanks ! Edit : For last point, I do have this setup from scratch : Could it be related ? (Drive is the share I want to be accessed from my VM and as network drive outside of it) Edited November 23, 20241 yr by Vladcik
November 23, 20241 yr If i'm understanding you correctly: Key Points and Requirements Current Setup: VM stored on an SSD outside of the array. Plans to run multiple VMs (primarily Windows-based, with one Linux). Prefers accessing files from outside the VM without relying on network shares within the VM. Wants a reliable and long-term solution, ensuring critical files are stored safely in the array. User Goals: Access to files outside the VM (direct access, not via network shares). Optimize file organization and minimize redundancy. Maintain usability and accessibility for media (e.g., movies/series available on TV). Detailed Overview of the Proposed Solutions Solution #1: NVMe Drive Outside the Array Concept: Use an NVMe drive as a "cache" or "sync disk" outside the array for VM-specific data, while syncing the data to the array for redundancy. Advantages: Keeps VM-related data separate from the array for speed and flexibility. Files can still sync to the array periodically (e.g., using scripts or tools like rsync or CA Backup/Restore). Allows access to synced files from other devices. Steps: Add the NVMe drive outside the array as an Unassigned Device (UD). Use the Community Applications (CA) plugin to schedule regular backups of the NVMe data to the array. Optionally, set up automated sync via a cron job rsync -avh --delete /mnt/disks/nvme_drive/ /mnt/user/array_share/ Configure the array share to allow network access for other devices. When to Use: If you value the speed of NVMe storage for your VMs but still want redundancy for critical data. Solution #2: VDisk for File Management Concept: Create a virtual disk (VDisk) mounted in the VM for file storage. Files within this VDisk can be shared with the host Unraid system. Advantages: Isolates VM storage, improving organization. Can allow external access to files if properly configured. Challenges: Requires configuration of file sharing between the VM and Unraid (e.g., VirtIO drivers for Windows). Steps: Create a VDisk in Unraid: Navigate to Settings > VM Manager. Create a virtual disk and attach it to your VM. Install VirtIO drivers in the Windows VM for optimal performance. Set up a share for the VDisk on Unraid to allow external access (e.g., via SMB). When to Use: If you prefer keeping VM files encapsulated within a virtual disk but still want external access. Solution #3: Store Critical Files on SSD (Outside Array) Concept: Keep critical files on the SSD outside the array for performance but synchronize them manually or via automation to the array for backup. Advantages: Maximizes SSD speed for critical files. Reduces complexity for VM operations. Challenges: Manual or scheduled syncing is necessary to ensure data redundancy. When to Use: If simplicity is prioritized and critical files don’t require constant access from outside the VM. Solution #4: Controlled Access to Array Shares Concept: Use SMB settings to selectively allow access to certain shares (e.g., media files for TV) while restricting access to others. Advantages: Simple and effective for managing share permissions. Allows direct access to movies/series while keeping other files private. Implementation: Create shares in Shares > Add Share. Set specific shares to Public (e.g., media files) and others to Secure or Private. Use Unraid’s built-in share control to limit access based on the VM state. Example: Automate share availability based on VM state: # Disable share when VM starts mv /boot/config/smb-extra.conf /boot/config/smb-extra-disabled.conf /etc/rc.d/rc.samba restart Re-enable share after VM stops. When to Use: If you need granular control over file access based on specific use cases. Final Recommendations Based on the user’s goals: Best Long-Term Setup: NVMe outside array (Solution #1): Use a fast NVMe for VM and active files, syncing them periodically to the array for redundancy and external access. Combine with Controlled Access (Solution #4) for media files and network sharing needs. Additional Suggestions: Backup Strategy: Use CA Backup/Restore to schedule backups of the NVMe drive and VMs to the array or cloud storage. VM Storage Optimization: Assign specific drives for VMs with dedicated SSDs for speed and better separation. Media Sharing: Use Plex or similar tools to serve media directly from the array to TVs/devices, avoiding manual file handling. Learning Resources: Review Unraid documentation and community guides for SMB sharing, VM setups, and automation scripts. https://docs.unraid.net/unraid-os/overview/what-is-unraid/
November 23, 20241 yr Author 1 hour ago, bmartino1 said: Solution #1: NVMe Drive Outside the Array Concept: Use an NVMe drive as a "cache" or "sync disk" outside the array for VM-specific data, while syncing the data to the array for redundancy. Advantages: Keeps VM-related data separate from the array Thanks again for the feedback. However, I wanted to check about the other setup I've just done today : using VirtioFS, I was able to make my share a real drive on my VM. I want to be SURE it works like a physical drive and was used as a passthrough. It mounts my drive well, so I guess it does what I wanted from scratch right ? Thanks
November 23, 20241 yr I never really used the virtfs that more a question for simon in the VM - KVM side of the forum. If the patting is working, then it's fine. Otherwise you will need to use nfs/smb and connect to the unraid machine via the network Stuff from doc / youtube over the years... Use Case of Virtio-FS in Unraid Virtio-FS is particularly beneficial when: A VM frequently accesses large files stored on the host. Low-latency file access is critical (e.g., for databases or media editing). Avoiding network stack overhead (compared to SMB/NFS) is a priority. Virtio-FS is a high-performance file-sharing mechanism for virtual machines (VMs) using QEMU/KVM. In the context of Unraid, it's useful for providing low-latency, shared file access between a host system (Unraid) and a guest VM. Here’s how it works and how to troubleshoot or optimize its usage: What is Virtio-FS? Virtio-FS allows a VM to share a directory from the host system with near-native performance. Unlike traditional network-based file sharing (e.g., SMB or NFS), Virtio-FS directly communicates between the VM and the host via shared memory, avoiding network stack overhead. How Virtio-FS Works in QEMU/KVM on Unraid Unraid Share Mode: Virtio-FS: In your setup, the Unraid share (/mnt/user/Drive) is being exposed to the VM using Virtio-FS. The VM accesses the share as a mounted drive with a tag (e.g., Drive). Host-to-Guest File Access: The host (Unraid) provides a shared directory (e.g., /mnt/user/Drive). The guest (VM) mounts this shared directory using the Virtio-FS driver and can read/write files. Performance Benefits: Virtio-FS avoids network stack overhead (e.g., no SMB/NFS layer). It's ideal for scenarios where the guest VM needs fast and frequent access to files stored on the host. How to Use Virtio-FS in Unraid Configuration Steps: Ensure Virtio-FS Support: Your Unraid system must include Virtio-FS support in the QEMU package. Most modern Unraid versions include this. Set Up a Share for Virtio-FS: Create a share in Unraid (e.g., /mnt/user/Drive). Assign the share to the VM using Virtio-FS mode, as shown in your screenshot: Unraid Source Path: /mnt/user/Drive Unraid Mount Tag: Drive Install Virtio-FS Drivers in the VM: For Linux Guests: Ensure the virtiofsd service is installed and running. Add the shared directory in /etc/fstab to mount automatically Drive /mnt/virtiofs_drive virtiofs defaults 0 0 For Windows Guests: Windows does not natively support Virtio-FS. Use the Virtio drivers from the Fedora Project (or use SMB if Virtio-FS isn't an option). Mount the Share in the Guest: In Linux sudo mount -t virtiofs Drive /mnt/virtiofs_drive In Windows: If using SMB instead, map it as a network drive. Troubleshooting Virtio-FS on Unraid 1. Files Not Accessible from Outside the VM Virtio-FS shares are typically directly mounted into the VM, and other external systems (e.g., other PCs or devices) won't see these files unless they are shared separately via SMB/NFS from the Unraid host. Solution:If you want files to be accessible to both the VM and external devices: Configure SMB sharing for /mnt/user/Drive in Unraid, and access the files from outside the VM using the network. 2. Performance Issues Symptoms: Slow file transfers or VM hangs when accessing the Virtio-FS share. Fixes: Ensure the VM has sufficient resources (CPU and RAM). Use the latest Virtio-FS drivers in the guest OS. Monitor I/O performance using tools like iotop to ensure no contention on the Unraid host. 3. Mount Fails Inside the VM Symptoms: Errors like "No such device" when attempting to mount the share. Fixes: Ensure the Virtio-FS daemon (virtiofsd) is running on the Unraid host. Verify the tag name matches between the Unraid VM configuration (Drive) and the guest VM’s mount command. Alternative for Mixed Access If you require the share to be accessible both from the VM and other systems: Keep the share configured as Virtio-FS for the VM. Additionally enable SMB sharing for the same Unraid share in the GUI: Go to Shares > Drive. Enable Export (SMB) and set appropriate access permissions. This allows the VM to access the share via Virtio-FS and other systems via SMB.
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.