Tag Archives: unRAID

Creating a RAM disk in unRAID (and macOS)

I’ve been playing around with unRAID for about a month now and find it very interesting. I just purchased 2 10 GBE ASUS/Aquantia NICs and wanted to test the network transfer speed.

Unfortunately, one quickly finds out the Array and/or SSD cache read speeds become the bottleneck and you don’t see the full 10 Gbps throughput. In order to mitigate this, I created a RAM disk on the unRAID server and then another RAM disk on my Hackintosh. Creating the macOS RAM disk is easy but it took some digging to find how to create a RAM disk on unRAID. Hopefully this will help anyone trying to create a RAM disk on unRAID moving forward.

Creating a RAM disk in unRAID

  1. Stop the Array.
  2. Go to Settings > SMB
  3. In Samba extra configuration, paste the following:
[ramdisk]
path = /mnt/ramdisk
comment =
browseable = yes
public = yes
writeable = yes
vfs objects =
  1. Click Apply, then Done.
  2. Restart Array.
  3. Mount your Flash drive/share
  4. Open the Go file (inside the Config folder) using a text editor.
  5. Paste the following:
mkdir -p /mnt/ramdisk
  1. Save the Go file.
  2. Reboot the unRAID server.

While the ramdisk will not show up under the Shares tab, it will show up as a share when you connect to your unRAID server. It will also show up in Krusader under /mnt/ramdisk. The size of the RAM disk defaults to half of the available RAM.

Creating a RAM disk in macOS (Catalina)

  1. Open the Terminal app and enter the following command:
diskutil partitionDisk $(hdiutil attach -nomount ram://8388608) 1 GPTFormat APFS 'RAMDisk' '100%'

This will create a 4GB APFS formatted RAMdisk. The RAM amount is specified in blocks. You calculate the RAM amount as follows:

2048 (blocks) * RAM disk size in MB (1GB = 1024MB)

4GB RAM disk = 2048 * 4 * 1024 = 8388608

1GB RAM disk = 2097152

Enjoy!