Create iSCSI Targets on an ASUSTOR NAS

2 tone AI created image of a bunch of hard drives and their internals.

While checking out an ASUSTOR NAS (the Lockerstor 6 Gen2), I tested various configurations of storage and storage types. As part of that, I set up iSCSI targets for a Proxmox cluster, to enable the use of High Availability.

This article details how to create iSCSI targets (with CHAP authentication) and LUNs on an ASUSTOR NAS that is running ADM (this process was tested on version 4.2.7.RRD1).

If you're already happy with how to create the iSCSI Target and LUN, you can head straight to the next post: Proxmox: iSCSI LUN as Shared Storage

Storage Manager

After logging into ADM, go to Storage Manager then iSCSI.

Screenshot showing the Storage Manager window in the ASUSTOR ADM interface

Create iSCSI Target

Click Create -> leave An iSCSI target with one LUN selected -> Click Next.

Screenshot showing a prompt for either creating 'An iSCSI target with one LUN' or 'An iSCSI target'.

Enter a Target name (useful for identifying the target in future if you have more than one). This becomes part of the unique IQN (iSCSI Qualified Name).

A screenshot showing the prompt for creating a new iSCSI target. Target name field has the user-entered text: 'demo'. CRC /Checksum 'header' and 'digest' boxes are left unchecked.

There are also options for integrity checking (CRC / Checksum). Enabling this is likely to drop your network throughput rate to/from a client but with the benefit of reducing the chance of transmission errors. There is some interesting reading on this subject, but I'm going to take the easy way out and say it's outside the scope of this article, but I invite you to read this ipspace post!

Authentication

Next up: Authentication. You should obviously use this. For this example, we're going to use CHAP (Challenge-Handshake Authentication Protocol). To authenticate, we enter the credentials on the initiator (client) configurations when connecting to the LUN(s). Mutual CHAP is where both sides enter credentials for the opposite side.

Screenshot showing the CHAP authentication options. The pane defaults to 'No authentication required', but 'Use CHAP authentication' has been selected, and the username 'testtesttest' has been entered. An obscured password and confirmation have been entered. The checkbox for 'Enable mutual CHAP authentication' remains unchecked.
⚠️
Create something unique for this, as you'll need to enter it in a config file on the hypervisor side, and while no one else should be accessing your system, the default file permissions are 644 (rw,r,r) so other system users could read these credentials.

Create iSCSI LUN

On the next page, we'll create a new LUN and choose a name for it. This will show up on the hypervisor, so giving it a descriptive name is probably a good idea.

If you have multiple storage volumes, select where the LUN should be created.

This provisioning with let you create the full size of your volume without having to allocate the disk space until it is required by the guest operating system. It's usually a good idea to say Yes to this, unless you want to be very sure of the available space for each guest, or you're particularly worried about disk fragmentation (warning: big internet arguments on the pros and cons of this, performance benefits etc. I'm not getting involved. Have a link.)

Snapshot support is worth enabling, as you might decide to use it, but don't have to.
Finally, LUN size - if you're using thin provisioning, you can set a realistic/generous capacity. Then click Next.

Screenshot showing the LUN creation window. 'Create a new iSCSI LUN' radio option is selected (the other option being 'Mount an ISO image as a new iSCSI LUN'). The LUN name is set as 'lun1'. The location drop down field has been changed to 'Volume 3'. Thin Provisioning and Snapshot support have 'Yes' selected. The LUN size has been set to 1000GB. The view shows that the available capacity remaining on this volume is 7.25 TB.

You'll be prompted with a final confirmation screen–check you're happy with everything and choose Finish.

Summary

The steps above detail how to create an iSCSI Target (using CHAP authentication) and LUN on an ASUSTOR NAS running ADM. While it's geared towards the ASUSTOR NAS operating system, the theory is transferrable to most other NAS manufacturers (such as Synology and QNAP) and storage systems.

Next up, we'll connect to this LUN from our initiator (or initiators) if we're creating a highly-available cluster: Proxmox: iSCSI LUN as Shared Storage

This is a fairly low-level entry to iSCSI, but if you think there's anything I've overlooked, please leave a comment or let me know at @techbits@fosstodon.org.



Great! Next, complete checkout for full access to techbits.io
Welcome back! You've successfully signed in
You've successfully subscribed to techbits.io
Success! Your account is fully activated, you now have access to all content
Success! Your billing info has been updated
Your billing was not updated