Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Sharing block devices via iSCSI is a common way to make network-attached storage available. An iSCSI LUN is a logical unit of storage. In SoftNAS®, the basic storage LUN is a volume that is accessed as a block device. The block device volumes have a mount point in the Linux /dev/zvol filesystem because they are disk block devices.

For example, a storage pool naspool1 with volume name lun01 would be named /dev/zvol/naspool1/lun01 as its mount point. These device references are links to Linux block devices used to access the volume's raw data blocks via iSCSI.

iSCSI targets are used by iSCSI initiators to establish a network connection. The target serves up the LUNs, which are collections of disk blocks accessed via the iSCSI protocol over the network. A target can offer one or more LUNs to the iSCSI clients, who initiate a connection with the iSCSI server.

For example, VMware vSphere or Windows connects to the iSCSI server and retrieves a list of available targets. Then, for each target, the list of its published LUNs are available for use.

Covered in this document:

Table of Contents

Creating a Volume and Sharing as iSCSI Target

To share a volume as an iSCSI target:

  •  Create a new volume and
choose the
  • select Block Device
option as shown below as by default. The new volume will be shared as an iSCSI LUN upon creation.
  • (iSCI LUN).
  •  Select Share as iSCSI LUN.
  •  Fill out other necessary information.
  •  The block device volume is automatically added to the default iSCSI target.

Note
The mountpoint for block device volumes is named LUN_lun1 (in the example below). Block device volume mount points always use the prefix LUN_ followed by the user-assigned volume name, to distinguish LUNs from regular filesystem volumes. Block devices are comprised of a sparsely-allocated file named lundata.dat. So for a pool name naspool and block device volume named lun1, the full mount point path is /naspool1/LUN_lun1/lundata.dat. These LUN names are automatically maintained by SoftNAS® and shown in the iSCSI Targets configuration panel, as well as the Volumes list.
For more information on creating a volume, refer to the Configuring Volumes section. 


Note
The default is Thick Provision, which reserves space for the LUN at time of creation. Alternatively, choose Thin Provision, which will create a "sparse" LUN that only consumes space as it is actually used. 
Image Removed


Note
titleMore Information

For more information on creating a volume, refer to the Configuring Volumes section. 


Image Added

Configuring and Sharing Storage using iSCSI

iSCSI LUN volumes can be shared by applying LUN Targets to the storage.

This can be done

directly

in one of two ways:

  •  Directly at time of Volume creation,
when selecting Block device
  • by switching to the LUN Targets tab after selecting Block Device (iSCSI LUN).
It can also be done after the fact, via


  • OR

  •  Via the iSCSI LUN Targets applet.

Applying The Target at Volume Creation Time

  •  From Volumes and LUNS, click on Create.
  •  Follow the standard instructions for creating a new Volume, and select Block Device (iSCSI LUN).
    The LUN Targets tab is displayed.
Image Removed
  •  Switch to the LUN Targets tab that is now displayed.
  •  Select the ellipsis

Image Added

  •  Select the appropriateLUN Target from the dropdownlist.

    OR
     
Image Removed
  •  Click the Image Added icon to create a new target.

Image Added

Applying The Target Using the Applet

  •  Log on to SoftNAS StorageCenter. In From the Left Navigation Pane, select the iSCSI LUN Targets option under the Storage section.
    The  The iSCSI LUN Targets panel will be displayed. From here, configure and share storage using iSCSI. 

Image Removed

 By default,

Image Added

  1. To create an empty iSCSI
target will be presented for you. However, if you need more than one,
  1. Target, click Create Target.
 


  1. Once the target is created, either double-click the empty target, or click Add LUN.
 

Image Removed

  1. The
iSCSI
  1. Add A LUN dialog box will be displayed.
  Either


  1. From the Volume Blockdevice drop-down, select the volume's block device
from the dropdown (which will show available volumes). 
  1. .

  2. Click Add LUN to link the block device to the iSCSI Target as a LUN.


Note
titleScreen Refresh

You may have to refresh the screen for the targets to present themselves.

Image Removed

Or check the box for Create a New Device, and enter the path, and the desired size to associate with the LUN.

  •  Click Add LUN to link the block device to the iSCSI Target as a LUN.
Note

You may have to refresh the screen for the targets to present themselves.


Image Removed

Image Added

Image Added

  •  The LUN is created and added to the target.

You
  •  You may have to refresh the screen for the targets to present themselves.

Note
titlePublish Block Devices
Publish any number of block device volumes via a single iSCSI target. However, you can use the Create Target button to add new targets as needed. 


Image RemovedImage Added

Target Settings and Options

Each iSCSI target can be configured to restrict access to one or more iSCSI client IP addresses. It can also be configured to require authentication using a user name and password. 

  1. To do so, on On the iSCSI LUN Targets panel, select the LUN target and then click

  2. Click the Modify Settings option in the tool bar.
    The  The Modify Target Settings dialog will be displayed. 

  3. By default, targets have unrestricted access from any IP address. To restrict which iSCSI initiators are allowed to connect to the target, enter one or more comma-separated IP addresses (or DNS names, if using DNS) in the Allowed Initiators text entry box. Use the CIDN notation to provide a range of network addresses; e.g., 172.16.150.0/24 restricts access to iSCSI initiators in the 172.16.150.* subnet only.

  4. In order to use login credentials while accessing the target, enter the user name in the User Name text entry box.

  5. Enter the password in the User Password text entry box.

  6. Click Once configurations are complete, click Save

Note
To skip login credentials to the access target, then simply leave the User Name and User Password fields blank.Once the required changes are made, click Save.
titleSkip Credentials

If you wish to skip entering login credentials, leave the User Name and User Password fields blank.


Note
titleRestart To Enforce
To enforce the changes, click
Restart
Refresh on the iSCSI LUN Targets panel. 


Image RemovedImage Added

Image RemovedImage Added

Accessing the Target and LUN

To access the iSCSI target and its LUNs, make use of an SCSI initiator from another system on the network.

For more information, refer to the SoftNAS Reference Guide or the operating system reference guide associated with an iSCSI initiator.