Hey everyone,
Preamble
A few days ago, I was messing around with my Unraid server and a desktop I had in my family’s living room. For those who don’t’ know, Unraid is a specialized operating system designed for building and managing Network Attached Storage (NAS) devices and servers. I like it a lot because it is very easy to set up an upgrade. My desktop in the living room is mainly for games for the kids on Steam but it does not have much space for games. Steam is actually really good at playing games via NAS(Network drive). However, me being curious, I wanted to set up an ISCSI drive. iSCSI (Internet Small Computer System Interface) is a protocol that allows the connection of storage devices over a TCP/IP network. An iSCSI drive, also known as an iSCSI target, is a storage resource made available to other devices (initiators) over an IP network. This enables storage devices to be accessed and used as if they were locally attached to the system, even though they may physically reside on a different network-connected device. Unraid has no native support for iSCSI. They do have community app below but I had issues getting it working… and I don’t like installing anything host system (Unraid system) , This meant I had two options, Docker or VM.
I picked a VM solution because one of the people I watched created a great guide on setting up ISCI target here (567) How to setup ISCSI targets on unRAID using Openfiler vm - YouTube. Also, VMs allowed me to use OpenFiler without having to try to get the image to run in a docker image. So, the main reason I’m writing the his guide is because I did a run into a few issues with set up that I thought I could share. So, lets set up OpenFiler so we can play some games! Also, I loved Spaceinvader One video, but he does a lot of extra stuff that I didn’t think was necessary and I just made the solution more complex
Setting up OpenFiler
Openfiler is an open-source network attached storage (NAS) and storage area network (SAN) software solution. It provides a platform for managing storage resources and offering file-based and block-based storage services over a network. You can download Openfiler from here.
https://www.openfiler.com/community/download/
Once you down the Openfiler, you should move the file to a location on the Unraid NAS that is accessible. I personally have ISO Share but it is up to you where you put it
Below is the configuration I used for the initial setup of the VM. I found I had to change the BIOS to SeaBios get the ISO to run. For the machine type, Usually I try to he Q35 latest. If that doesn’t work, I switch to i440fx. Generally, most people will pick what ever works but here is some output from ChatGPT on the differences.
ChatGPT: i440fx vs Q35
Q35 and i440fx refer to different virtual machine hardware architectures used in hypervisors, particularly in the context of virtualization technologies such as QEMU/KVM. These architectures define the virtual hardware components that are presented to virtual machines running on a hypervisor. Here's a brief overview of Q35 and i440fx:
i440fx:
Description: i440fx (also known as QEMU PC) is an older and more traditional virtual machine hardware model. It emulates the Intel 440FX chipset, which was common in older PC architectures.
Use Cases: i440fx is suitable for running virtual machines that don't require advanced features introduced in newer hardware models. It's often used for compatibility with older operating systems or applications.
Q35:
Description: Q35 is a more modern and versatile virtual machine hardware model. It emulates the Q35 chipset, which is a more recent and feature-rich chipset compared to i440fx. Q35 introduces various enhancements and supports newer technologies.
Use Cases: Q35 is preferred for running virtual machines that require advanced features, better performance, and compatibility with modern hardware. It's suitable for running newer operating systems and applications that may take advantage of the additional capabilities provided by the Q35 chipset.
When you create the VM, you will have to Stop the image, go into edit the XML. You will change the model type from
<model type='virtio-net'/>
to
<model type='e1000-82545em'/>
(Again, it was SpaceInvader One that figured this out, not me)
Accessing the VM from the browser
Once you set up the VM via installing the ISO, You will need to access the image from the browser. From the VNC, you should see an IP address, if not, you will need to reenter - ` <model type='e1000-82545em'/>` into the xml. For some reason, every time there is change, Unraid likes to set the interface back to virtio-net. Openfiler will give you an IP to address. For some reason, Openfiler uses and old TLS protocol. To pass this, you will need to allow older TLS version to run. Since I use Firefox only for testing websites, what I had to do is type “about:config” into the search bar. Search for security.tls.version.min and set the value to 1. What you are telling Firefox is you want to allow the website to connect even if the min version is 1.
The default username password is “openfiler “and “password”
You can only access the Openfiler with the https(e.g. https://192.x.x.x:446/, not 192.168.1.141:446)
Were are in … but… we haven’t set up any drives or iSCSI
Time to add drives.
So now we need to stop the VM and add the drives we want to setup ISCI . Under the primary Primary vDisk Location tab, you can click + button to add new drives
The big thing here is to set the type to qcow2 and Bus to be Sata. I have a lot of space and I plan to store most of the kids games they play on steam here so I will set the space to 1T
Update the config and then go back in and change xml interface to be ` <model type='e1000-82545em'/`and then start the VM
Setting up Openfiler
First you we will need to set up the network access configuration( This section will pretty much follow Spaceinvader One guide)
Go to System and set up the nextwork access configuration. It is basically your Openfer IP with a a zero on the last oclet
Click Update
Click configure on the same page under network interface configuration
Change it to static
Click continue.
Click confirm
Now Click on the Volumes tab > Block Devices( Block devices in the right tab)
Click on your drive(Mine is /dev/sdb) You will click on edit disk text
Change the Partition type to physical volume and then click create
Go to Volume Groups( on the right tab)
Create a name, select your volume, and added the volume group. I called mine unraid1 because I’m really creative with names 😊
Now click add volume( on the right side) . I like to keep things simple. I would create a volume named unraid1 and use all the space(Required Space). The most important thing is to set the volume type as block.
Click create
Go to Services(top tab) and enable and start ISCI target
Go back to Volumes and click ISCSI targets
I changed the target IQN to unraid1
Click on LUN Mapping and set the unraid1 R/W Mode to write thru and transfer mode to blockio. Then click Map
Click on Network ACL and change access to Allow
Setting up Windows
Search for iSCSI Initiator.
If this is your first time, you will need to start the service by clicking yes on the prompt. In theory, discovery target should show in the window below when you click refresh. However, this did not work for me
There can be two issues. First go into discovery, click discovery portal, click advance, then click local adapter, If you don’t see Microsoft iSCSI Initiator , then you have the 2 of the 2 problems (congratz)
To fix the first problem, you need go into services, search for ‘Microsoft iSCI Initiator’ and then stop and start the service. If that doesn’t work, restart the computer. For most people, doing some combination of starting and stopping the service and restarting the computer will resolve the issue. I have several computers doing this process has always fixed the issue.
When this issue is resolved, you should see Microsoft iSCI Initiator in the local adapter . Select that adapter and put in the IP of Openfiler .
You should now see the target
Add the target.
All you need to do now is to create and format the hard disk partition.
Add the disk
Then format the disk.
I use simple volume wizard to format the disk as shown the below. Windows, Openfiler, and Unraid is smart enough to not increase the vdisk2 when the quick format is done. Not sure if this true for the other format types but any one is welcome to test.
We are done here, now you install games or what ever you want on the drive . The windows system will view this as normal attached storage. I would still recommend you be carful because removing the drive can be similar to ripping out a hard drive. Thus, I use the ISCSI disk mainly for games and data and limited applications. Network address generally is slower than attached drive. Any way, enjoy your ISCSI drive!
6