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.

Nixx

Members
  • Joined

  • Last visited

  1. On a simmilar topic, i had a weird idea and i wonder if someone did take the time to benchmark it. Instead of using the vfs_cache_pressure variable of the linux os to force it to keep directory structure in cache and that spam find on the mount point to keep it in memory, could we just use rclone union provider with --dir-cache-time 1000h --poll-interval 5h ? Like in the config : [testunion] type = union upstreams = hdd1: hdd6: [hdd1] type = alias remote = /mnt/data/drive/by-slot/hdd1 [hdd6] type = alias remote = /mnt/data/drive/by-slot/hdd6 And command like rclone mount testunion:/ /mnt/data/drive/union/ --dir-cache-time 1000h --poll-interval 5h --allow-other
  2. Ok, so maybe it's just me but i didn't found anything to do that so i try to build it myself. Basically, it will make the unraid server to suscribe to /unraid/attach-device-usb and you can send message like : {"domain": "Work", "vendorid": "320f", "pid": "5041", "dismount": true} Domain is the vm, vendorId/productId, the vid/pid of your usb device (you can use lsusb to list), dismount:true means it will detach to existing vm before try to attach it. To make it work, you need this plugin : and a mqtt server. Here my script : #!/bin/bash # Load MQTT credentials from the configuration file source /boot/config/mqttcredentials # Check that all necessary variables are defined if [[ -z "$MQTT_HOST" || -z "$MQTT_PORT" || -z "$MQTT_USER" || -z "$MQTT_PASSWORD" || -z "$MQTT_CLIENT_ID" ]]; then echo "Error: MQTT credentials are incomplete." exit 1 fi # Function to handle messages from the 'unraid/switchkeyboard' topic handle_switchkeyboard() { # Subscribe to the 'unraid/attach-device-usb' topic and print received messages with 'echo' mosquitto_sub -h $MQTT_HOST -p $MQTT_PORT -u $MQTT_USER -P $MQTT_PASSWORD -t "unraid/attach-device-usb" | while read -r message; do echo "Message received on 'unraid/attach-device-usb' : $message" # Parse the received JSON message domain=$(echo "$message" | jq -r '.domain') vendorid=$(echo "$message" | jq -r '.vendorid') pid=$(echo "$message" | jq -r '.pid') dismount=$(echo "$message" | jq -r '.dismount') # Check if the necessary information is present if [[ -z "$domain" || -z "$vendorid" || -z "$pid" ]]; then echo "Error: Missing information in MQTT message." continue fi # Create a temporary XML file for the device temp_file=$(mktemp /tmp/device_XXXX.xml) cat <<EOF > "$temp_file" <hostdev mode='subsystem' type='usb'> <source> <vendor id='0x$vendorid'/> <product id='0x$pid'/> </source> </hostdev> EOF echo "Temporary file created: $temp_file" # Check if dismount is set to true and process accordingly if [[ "$dismount" == "true" ]]; then # Regex to check if a device with the given vendorid and pid is already attached to a domain device_attached_to_domain="" for domain_name in $(virsh list --all --name); do if [[ -n "$domain_name" ]]; then # Use a regex to search for vendorid and pid in the XML configuration of the domain device_attached=$(virsh dumpxml "$domain_name" | tr -d '\0' | \ grep -Pzo "(?s)<hostdev.*<vendor id='0x$vendorid'.*<product id='0x$pid'") # If the device is found in the XML of this domain, mark it if [[ -n "$device_attached" ]]; then device_attached_to_domain="$domain_name" break fi fi done # If the device is attached to a different domain, detach it if [[ -n "$device_attached_to_domain" && "$device_attached_to_domain" != "$domain" ]]; then echo "Device is already attached to $device_attached_to_domain. Detaching it from there." virsh detach-device "$device_attached_to_domain" "$temp_file" # Wait for 2 seconds before attaching the device to the target domain sleep 2 fi else echo "Dismount is set to false or not provided. Skipping dismount operation." fi # Check if the device is currently attached to the target domain device_in_use=$(virsh dumpxml "$domain" | tr -d '\0' | \ grep -Pzo "(?s)<hostdev.*<vendor id='0x$vendorid'.*<product id='0x$pid'") if [[ -n "$device_in_use" ]]; then echo "Error: Device is already in use by domain '$domain'." else # Attach the device to the destination domain echo "Attaching device to virtual machine: $domain" virsh attach-device "$domain" "$temp_file" fi # Remove the temporary file rm -f "$temp_file" done } # Launch the function to handle the switchkeyboard topic handle_switchkeyboard As a side note my windows vm i use a autohotscript like that, so i have key binding on my keyboard to switch beetween computers. I use dismount:false on the initial code, so it will only attach if it's not currently attached on an running vm. (and i put it into startup with autologin activated) commande := """C:\Program Files\mosquitto\mosquitto_pub.exe"" -h 192.168.1.25 -p 1883 -u xxxx -P xxxx -t ""unraid/attach-device-usb"" -m ""{\""domain\"": \""Work\"", \""vendorid\"": \""320f\"", \""pid\"": \""5041\"", \""dismount\"": false}""" Run, % commande, , Hide commande := """C:\Program Files\mosquitto\mosquitto_pub.exe"" -h 192.168.1.25 -p 1883 -u xxxx -P xxxx -t ""unraid/attach-device-usb"" -m ""{\""domain\"": \""Work\"", \""vendorid\"": \""1532\"", \""pid\"": \""0067\"", \""dismount\"": false}""" Run, % commande, , Hide F21:: Run, "C:\Program Files\mosquitto\mosquitto_pub.exe" -h 192.168.1.25 -p 1883 -u xxxx -P xxxx -t "dpswitch/bouton" -m "ON", , Hide Return F13:: commande := """C:\Program Files\mosquitto\mosquitto_pub.exe"" -h 192.168.1.25 -p 1883 -u xxxx -P xxxx -t ""unraid/attach-device-usb"" -m ""{\""domain\"": \""Work\"", \""vendorid\"": \""320f\"", \""pid\"": \""5041\"", \""dismount\"": true}""" Run, % commande, , Hide commande := """C:\Program Files\mosquitto\mosquitto_pub.exe"" -h 192.168.1.25 -p 1883 -u xxxx -P xxxx -t ""unraid/attach-device-usb"" -m ""{\""domain\"": \""Work\"", \""vendorid\"": \""1532\"", \""pid\"": \""0067\"", \""dismount\"": true}""" Run, % commande, , Hide Return F14:: commande := """C:\Program Files\mosquitto\mosquitto_pub.exe"" -h 192.168.1.25 -p 1883 -u xxxx -P xxxx -t ""unraid/attach-device-usb"" -m ""{\""domain\"": \""Game\"", \""vendorid\"": \""320f\"", \""pid\"": \""5041\"", \""dismount\"": true}""" Run, % commande, , Hide commande := """C:\Program Files\mosquitto\mosquitto_pub.exe"" -h 192.168.1.25 -p 1883 -u xxxx -P xxxx -t ""unraid/attach-device-usb"" -m ""{\""domain\"": \""Game\"", \""vendorid\"": \""1532\"", \""pid\"": \""0067\"", \""dismount\"": true}""" Run, % commande, , Hide Return If someone have something simmilar i could use on linux vm, i would be interested.
  3. Hi. I'm wondering if with isolcpus and emulatorpin it's possible to force unraid to only use ecore. Leaving pcore strickly for VMs.
  4. I'm wondering if somehow the hotplug of usb device can be triggered from outside the web gui ? I have this use case in mind with a physical switch managed by home assistant that allow to change usb device assignation or executable within the vm that will allow to reclaim the usb device. (to do stuff like you have 3 vm, one monitor, one usb hub, and have 3 keyboard shortcuts to attach the usb hub to vm 1,2 or 3)
  5. Thanks for the quick reply. Yes, i agree, i'm not gonna overclock anything. I forgot to mention that i want to use a 5950X as CPU, so no igpu. I heard that quite a lot of board refuse to run headless and if you want to passthough your PCIE GPU, you need to have a second one, either a igpu (that i will not have) or a secondary gpu card.
  6. I want to make an unraid config with at least one VM dedicated to gaming (so with PCIE-passthrough) and i'm currently hesitating beetween 4 motherboards. (And yeah, i know Intel are better suited to this task, but i'm a AMD fanboy, so ...) I could need an advice. (And btw sorry, english is not my main language) The 4 boards i'm considering are : Asrock X570 Taichi Asrock X570 Taichi Razer Edition Asrock X570S PG Riptide Asrock X570S PG Velocita Asrock X570 Taichi https://www.asrock.com/mb/AMD/X570 Taichi/index.us.asp So probably one of the X570 board with the most review on unraid forum, seems to work fine. Still there is two things that annoy me with this board, first it's only a 1GB ethernet, not a 2.5G. Second is more annoying in my opinion, the chipset fan is in intake mode and located just near the first GPU slot, so he get all the heat from the GPU card. ( https://www.reddit.com/r/Amd/comments/ccyxmn/psa_x570_taichi_design_flaw_chipset_overheat/ I don't know, maybe that can be solve with some raiser PCIE4 compatible and use the GPU vertical on a desktop case that allow it ? Asrock X570 Taichi Razer Edition https://www.asrock.com/mb/AMD/X570 Taichi Razer Edition/index.us.html On this one, they fix their faulty design moving the fan lower, and you got a 2.5G Ethernet. But damn, the price hurt. Asrock X570S PG Riptide https://www.asrock.com/mb/AMD/X570S PG Riptide/index.us.asp Ok, so this one is cheap, you got 2.5G, no chipset fan it's full passive. No bluetooth or wifi but i don't really care and you got a ton of PCIE-1X slots. Power delivery is inferior to their high end boards and the second PCIE16X is only wired on 4X and the third on 2X. And if you plug a second M2 you remove some of the sata connector. On paper i like it i mean i'm not going crossfire so 4X and 2X are good enought for a 10GB network card and a low end gpu like a GT710, but there is no review amongst unraid users and from the 4, that's probably the mobo the most different than the Taichi, so i have absolutely no idea if i'm gonna have problems with it. Asrock X570 PG Velocita https://www.asrock.com/mb/AMD/X570 PG Velocita/index.us.asp#Specification Seems kinda similar to Taichi Razer, but only 2 PCIE16X and seems i guess i probably have to add a second GPU to make unraid works since my CPU don't have integrated gpu, that count.

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.