How to Set Up an iSCSI Target on a Synology NAS

  • Post author:WunderTech
  • Post published:October 31, 2022
  • Post last modified:November 13, 2022
  • Post category:Synology
  • Reading time:9 mins read
  • Post comments:0 Comments

In this tutorial, we will look at how to set up an iSCSI target on a Synology NAS.

Before we look at how to set up an iSCSI Target on a Synology NAS, it’s important to understand exactly what iSCSI is and how it works. When you configure iSCSI, it allows you to transport block-level data between an initiating server and a target server. In the case of this tutorial, the target server will be a Synology NAS. It’s important to remember that you’ll need to have another server on the other side as an initiator that uses the iSCSI storage.

A common device that can utilize iSCSI is a hypervisor like Proxmox or XCP-ng. Proxmox and XCP-ng allow you to add iSCSI storage which means you can create virtual machines on it and utilize the space. Please be aware that there are many devices you can connect with and the process will be slightly different for each.

How to Set Up an iSCSI Target on a Synology NAS

We will look at how to set up iSCSI on a Synology NAS below using DSM 7. The process for DSM 6 is slightly different.

1. Log in to DSM and open the SAN Manager.

opening the san manager icon in dsm.

2. Select iSCSI, then select Add to create a new target.

how to set up an iscsi target on a synology nas - selecting iscsi in synology dsm.

3. Give the iSCSI target a Name, then leave the IQN as default.

creating an iscsi target in dsm.

4. The next setting is optional, but CHAP allows you to configure authentication. If you want the initiator to authenticate with the target (Synology NAS in this tutorial), you only have to enter a username and password here. If you want both, the initiator and target to use authentication, you’ll need to enable mutual CHAP.

adding chap authentication to the iscsi target.

5. If you haven’t configured a LUN yet, you can do that at this step. Select Create a new LUN, then select Next.

creating a new LUN in synology dsm.

6. Give the LUN a name, then select a volume and enter a capacity in GB. When you’re done, select Next.

NOTE: I am only setting mine as 10GB since this is a virtual DSM instance and is only being used for testing. You will most likely have to configure this significantly higher.

creating the new synology-lun on the volume 1 storage location.

7. Review the settings, then select Done. The iSCSI target is now created!

confirming the iscsi settings are correct.

Connecting to an iSCSI Target on a Synology NAS

Now that the Synology NAS iSCSI target has been configured, you can connect to it using an initiator. Please be aware that connecting multiple clients to an individual iSCSI target can cause data corruption.

If you plan on connecting from multiple clients, ensure that you edit the iSCSI target, select Advanced, then enable Allow multiple sessions from one or more iSCSI initiators.

editing the advanced settings to allow multiple connections (if required).

Rather than displaying the process for different initiators here, I created a dedicated tutorial on how to connect to an iSCSI Target on Proxmox. It’s important to remember that the settings you configured above (as far as authentication goes) must be used when configuring the initiator to use this iSCSI target.

Configuring Permissions

While we won’t be going over how to connect as an initiator, it’s important to know exactly how to configure permissions. After an initiator attempts to connect, you must grant permissions on the Synology NAS so that the initiator can connect to the target specified above (you can create them in advance as well if you know the IQN).

1. Select Host in the SAN Manager, then select Add.

adding host permissions to the iscsi storage manager.

2. Select Start on the main screen.

selecting start on the host settings main screen.

3. Enter a Name and Operating System, then select the Initiator. If you didn’t attempt to connect yet, you will have to use the Add Initiator button. When you’re done, select Next.

adding ther host that attempted to connect to the iscsi storage location.

4. Specify the permissions for each LUN, then select Next.

defining the permissions for the LUN's.

5. Review the settings, then select Done. The permissions will now be created!

confirming the settings for the LUN and iscsi target.

Conclusion: How to Set Up an iSCSI Target on a Synology NAS

This tutorial looked at how to set up an iSCSI Target on a Synology NAS. The process for setting up iSCSI on a Synology NAS is extremely simple, but you must ensure you’re using the correct authentication in order to get this to properly work. The main benefit of iSCSI is speed, so using it for something like VMs can result in significantly greater performance than something like an NFS or SMB share. Please keep in mind however that iSCSI is entirely different than these file-sharing protocols.

Thanks for checking out the tutorial on how to set up an iSCSI Target on a Synology NAS. If you have any questions on how to set up an iSCSI Target on a Synology NAS, please leave them in the comments!

WunderTech

WunderTech is a website that provides tutorials and guides on various NAS, server, networking, and infrastructure-related topics. WunderTech is maintained by Frank Joseph, an IT professional with 14+ years of experience in corporate IT and application management. He focuses on sharing his experience with others on his WunderTech website and YouTube page. Frank holds a Bachelor of Science in Computer Information Systems and a master of Business Administration (MBA).

Leave a Reply