Seagate NAS OS 4 - How to set up and connect to an iSCSI target in Ubuntu LTS 14.04

Provides instructions for configuring and connecting to an iSCSI target using NAS OS 4.0 and a computer running Ubuntu 14.04 LTS.

iSCSI stands for "Internet Small Computer Systems Interface." iSCSI is an extension of the standard SCSI storage interface that allows SCSI commands to be sent over an IP based network. It enables computers to access iSCSI Targets over a network the same way they would access a drive that is directly connected to a computer.

 

The Open-iSCSI package will be installed in Ubuntu 14.04 LTS. Ubuntu will then act as an iSCSI Initiator that will connect to an iSCSI target on the Seagate NAS.

When connecting to an iSCSI target by IP address, it is suggested to set up the Seagate NAS with a static/manual IP address in advance.

Go to the Network section of the NAS Administrative page to setup a static IP address.

 

The ISCSI protocol is available on NAS OS 4.0 products, but with some restricted functionality:

 
  • A LUN can be only mapped to a single target.

  • LUN file mode only, created on volume.

  • LUN block mode not supported.


A LUN file is always attached to a target: When you create a target, a LUN file will consequently be created. LUN files cannot exist without a target.

 

Creating the iSCSI target

 

1. Log in to the NAS Welcome page as admin or a user with administrative privileges.

2. On the Home page click the Device Manager icon.

3. In the list of choices on the left click Volume located under Storage.

4. Click the Add iSCSI button under Associated iSCSI targets.

5. Select Create new and click Next.

6. Set the capacity and Advanced parameters (optional) and click Next.

The iSCSI target capacity is limited to 8TB total or to the available free space of the NAS.

In this example we will not select any of the advanced options and the size is on 25GB.

 

A note on iSCSI Advanced parameters (Not used in this specific example):
 

Header Digest - Increases data integrity. It ensures the validity of the header portion of the protocol data unit.

 

Data Digests - Increases data integrity. Validate the data segment of the protocol data unit.

 

Multiple Sessions - Is for multiple connections to a single iSCSI Target. To avoid data corruption or loss, make sure you are operating in a cluster environment.

 

CHAP (Challenge Handshake Authentication Protocol) - Allows one-way and Mutual CHAP to authenticate with the Microsoft iSCSI Initiator and the target.

 

Authorized IQN - IQN stands for iSCSI qualified name. The IQN Identifies a particular iSCSI element, regardless of its physical location. The IQN can be found in the iSCSI Initiator in the Windows OS that will be using the iSCSI target..

If an IQN from a Windows Server or Workstation is assigned as an Authorized IQN, only that system will be able to connect to the iSCSI Target.

 

8. Click Finish to confirm the selections.

 

When the iSCSI Target has been created, it will show as disconnected. An Edit drop-down menu is available to Delete the iSCSI Target, Edit Options, or Export.

 

iSCSI Initiator Install

 

To configure Ubuntu as an iSCSI initiator, install the Open-iSCSI Package.

 

1. Open a Terminal. At the prompt type and Enter:

 

sudo apt-get install open-iscsi

 

2. Once the open-iscsi package is installed, edit /etc/iscsi/iscsid.conf. In this example Nano editor was used. At the prompt type and Enter:

 

sudo nano /etc/iscsi/iscsid.conf

 

3. Under Startup settings, remove the pound sign from the following:

 

# node.startup = automatic

 

Insert a pound sign to comment out the following:

 

# node.startup = manual

 

 

Check available iSCSI targets by using the iscsiadm utility

 

4. At a terminal prompt type and Enter:

 

sudo iscsiadm -m discovery -t st -p (NAS IP Address here)     

 

-m: determines the mode that iscsiadm executes in.

 

-t: specifies the type of discovery.

 

-p: option indicates the target / NAS IP address.

 

The iSCSI target was discovered.

 

 

You should now be able to connect to the iSCSI target. Depending on your target setup you may have to enter user credentials. In this example no credentials will be needed.

 

5. At the Terminal prompt Type and Enter:

 

sudo iscsiadm -m node --login

 

Connection and login to the iSCSI target were successful.

 

 

6. Check to make sure that the new disk has been detected using dmesg:

 

dmesg | grep sd

 

In this output sdb is the new iSCSI disk. This is only one example. Outputs can vary.

 

 

7. At the terminal prompt type and Enter:

 

sudo fdisk /dev/sdb

 

    a. Type m for help and Enter. A list of commands will be displayed.

 

 

    b. Type n to add a new partition and Enter.

        
        Partition type:

    c. Type p to choose the Default which is Primary, then Enter.

 

    d. Type 1 for the Partition number and Enter.

 

    e. Enter to choose the Default First sector.

 

    f. Enter to choose the Default Last sector.

 

    g. Enter w to write the table to disk and exit.

 

 

Format the file system

 

8. At the Terminal prompt type and Enter:

 

sudo mkfs.ext4 /dev/sdb1

 

 

Create a mount point for the iSCSI drive. In this example we will create a directory called iscsi on the root.

 

9. At the Terminal prompt type and Enter:

 

cd /                             Hit Enter

sudo mkdir iscsi        Hit Enter

 

Mount the iSCSI drive

 

10. At the Terminal prompt type and Enter:

 

sudo mount /dev/sdb1 /iscsi

 

The iSCSI drive drive should now be mounted.

 

11. To see the iSCSI drive, at the Terminal prompt type and Enter:  

 

dh -h then     

 

(A 25GB iSCSI target was used for this example)

 

Change permissions for /iSCSI

 

12  At the Terminal prompt type and Enter:

 

sudo chmod 777 /iscsi    





 

Add an entry to /etc/fstab file using the nano text editor to mount the iSCSI drive at boot

 

13. At the Terminal prompt type and Enter:

 

sudo nano /etc/fstab    

 

Add the following line to  the fstab file then save and exit. (CTRL + X keys) Answer Yes.

 

/dev/sdb1       /iscsi        ext4    defaults,auto,_netdev 0 0

 

 

Accessing the iSCSi drive

 

14. Open the Files icon on the left side of the Ubuntu Desktop.

 

 

15. Select Computer under Devices and open the iSCSI folder.

 

 

The iSCSI drive is ready to use.

 

Note: The information and screenshots in this article are for the setup of a Seagate NAS OS 4.0 iSCSI target, and then for a working basic setup to connect to that iSCSI target in Ubuntu 14.04 LTS. For help and troubleshooting for Ubuntu please visit: http://www.ubuntu.com/support

  1. ⁺ For a limited time of March 25, 2024, 10:00AM Pacific Time ("PT") to April 1, 2024 9:59AM PT, all orders placed at the Seagate store at Seagate.com will receive free ground shipping to addresses located within the United States.