Creating and Connecting to an iSCSI Share in TrueNAS and Windows 11
As part of the trying to build out my virtualized gaming PC, I wanted to expand the VM past what was directly attached to it. To try to see what would get me the best performance, I set up both a standard Samba share, and then an iSCSI share.
Part 1: Creating an iSCSI Share in TrueNAS
Step 1: Log in to TrueNAS
- Open your web browser and navigate to the TrueNAS web interface.
- Log in with your credentials.
Step 2: Create a ZFS Volume
- Go to Storage > Pools.
- Click on the three dots next to your pool and select Add Zvol.
- Name your Zvol, set the desired size, and click Save.
Step 3: Configure iSCSI
- Navigate to Sharing > Block (iSCSI).
- Click on Portals and then Add. Here, you can specify the IP address to bind the iSCSI service. Click Save.
Step 4: Create an iSCSI Initiator
- Go to Initiators and click Add.
- You can specify the allowed initiators (client machines) by their IQNs or use wildcards. Click Save.
Step 5: Create an Authorized Access
- Navigate to Authorized Access and click Add.
- Enter your desired username and password for iSCSI access. Click Save.
Step 6: Create an iSCSI Target
- Go to Targets and click Add.
- Name your target and link it to the portal and initiator groups you created. Click Save.
Step 7: Create an Extent
- Navigate to Extents and click Add.
- Name your extent and select Device as the extent type.
- Choose the Zvol you created earlier and click Save.
Step 8: Associate Target and Extent
- Go to Associated Targets and click Add.
- Select the target and the extent you created. Click Save.
Part 2: Connecting to the iSCSI Share from Windows 11
Step 1: Open iSCSI Initiator
- Press
Win + S
, type “iSCSI Initiator,” and open it. - If prompted to start the service, click Yes.
Step 2: Connect to the iSCSI Target
- Under the Targets tab, enter the IP address of your TrueNAS server and click Quick Connect.
- The iSCSI target should appear in the Discovered Targets list. Click Connect.
Step 3: Log On to the Target
- Select the target and click Log on.
- If you configured authentication, click Advanced and enter your credentials.
- Click OK to log on to the target.
Step 4: Initialize and Format the iSCSI Disk
- Open Disk Management (Press
Win + X
and select Disk Management). - You should see a new uninitialized disk. Right-click on it and select Initialize Disk.
- Choose either MBR or GPT and click OK.
- Right-click on the unallocated space and select New Simple Volume.
- Follow the wizard to format the disk and assign it a drive letter.
Once the process is complete, you will have a new iSCSI drive accessible from your Windows 11 machine, providing you with the additional storage capacity offered by your TrueNAS server.
Setting up an iSCSI share can seem complex, but following these steps ensures a smooth and successful configuration. Enjoy your expanded storage capabilities!