Use iSCSI

Connect to an iSCSI LUN (Windows)

This is an information message

Important

Please make sure that...

  • ...ODX is disabled on the client (on Windows). We do not support ODX.
  • ...iSCSI Multipathing is always activated to both provided IPs and, for Linux clients, 'failback immediate' is set in the multipath configuration."

Step 1 - Enable MPIO

  1. Open Server Manager and click on Manage -> Add Roles and Features
  2. Click Next 4 times
  3. Enable Multipath I/O and restart your machine
  4. Go to Control Panel -> MPIO
  5. Go to the Discover Multi-paths Tab
  6. Select Add support for iSCSI Devices and click Add

Step 2 - Add Target Portal

  1. Open the iSCSI Initiator
  2. Go to Target Portals -> Discover Portal...
  3. Add one of the IP addresses of your iSCSI LUN. The port is always 3260.

    You can find the IP addresses information in the ESC on your iSCSI LUN -> Target IPs

  4. Click on Advanced
  5. Set the flag Enable CHAP log on and set the Name and Target secret.

    You can find this information on your iSCSI Initiator in the ESC as Target Username and Target Password

  6. Click on OK twice.

Your iSCSI Target Portal should be successfully added to the list.

On the Targets tab you should now already see a discovered target.

Step 3 - Connect to the target

  1. Click on the target in the Targets tab under Discovered targets and click Connect.
  2. Set Enable Multi-path and click on Advanced
  3. Select the first IP in Target portal IP
  4. Set the same CHAP logon details (password and user name) as in step "Add Target Portal"
  5. Click on OK twice
  6. Select the now connected target and click on Properties...
  7. Click Add Session
  8. Do steps 2 - 5 but with the second IP

Your iSCSI Target should be connected with two sessions, one for each IP, and you should see the disk in Disk Management.

Step 4 - Mount a disk

  1. Go to Windows -> Disk Management
  2. Look for a new Disk that is marked as "Offline"
  3. Right-click again on the disk and click "Online"
  4. Right-click on the disk and click Initialize Disk

Your disk should now be mounted and available for usage.

This is an information message

iscsicli

This documentation explains the steps using the iSCSI Initiator tool for Windows. You can achieve the same results by using the iscsicli command line interface, e.g. in PowerShell.

Simply type iscsicli help in your terminal for further information.

Connect to an iSCSI LUN (Linux)

Step 1 - Install Tools

  1. Install iSCSI via yum:

    sudo yum install -y iscsi-initiator-utils
    
  2. Install the Multipath Device Mapper via yum:

    sudo yum install device-mapper-multipath -y
    

Step 2 - Add Configuration

  1. Change the initiator IQN to the Initiator Name from your Initiator created in ESC.

    vi /etc/iscsi/initiatorname.iscsi
    

    ...or, as a best practice, copy the existing value from the file and create a new Initiator for it.

  2. Restart the services like so:

    iscsiadm -m node -U all
    service iscsid restart
    service iscsi restart
    
  3. Un-comment and update the below marked config elements in iscsid.conf:

    vi /etc/iscsi/iscsid.conf
    
    # *************
    # CHAP Settings
    # *************
    
    # To enable CHAP authentication set node.session.auth.authmethod
    # to CHAP. The default is None.
    node.session.auth.authmethod = CHAP # <-- Uncomment this
    
    # To configure which CHAP algorithms to enable set
    # node.session.auth.chap_algs to a comma seperated list.
    # The algorithms should be listen with most prefered first.
    # Valid values are MD5, SHA1, SHA256, and SHA3-256.
    # The default is MD5.
    #node.session.auth.chap_algs = SHA3-256,SHA256,SHA1,MD5
    
    # To set a CHAP username and password for initiator
    # authentication by the target(s), uncomment the following lines:
    node.session.auth.username = HKRP2G8v # <-- Add "Target username" as shown on LUN in ESC
    node.session.auth.password = eGuZU8HQT54xFILR # <-- Add "Target password" as shown on LUN in ESC
    
    # To set a CHAP username and password for target(s)
    # authentication by the initiator, uncomment the following lines:
    node.session.auth.username_in = aIWAmnUC # <-- Add "Initiator username" as shown on LUN in ESC
    node.session.auth.password_in = px56Pjq2maKzfCeU # <-- Add "Initiator password" as shown on LUN in ESC
    
    # To enable CHAP authentication for a discovery session to the target
    # set discovery.sendtargets.auth.authmethod to CHAP. The default is None.
    discovery.sendtargets.auth.authmethod = CHAP # <-- Uncomment this
    
    # To set a discovery session CHAP username and password for the initiator
    # authentication by the target(s), uncomment the following lines:
    discovery.sendtargets.auth.username = HKRP2G8v # <-- Add "Target username" as shown on LUN in ESC
    discovery.sendtargets.auth.password = eGuZU8HQT54xFILR # <-- Add "Target password" as shown on LUN in ESC
    
    # To set a discovery session CHAP username and password for target(s)
    # authentication by the initiator, uncomment the following lines:
    discovery.sendtargets.auth.username_in = aIWAmnUC # <-- Add "Initiator username" as shown on LUN in ESC
    discovery.sendtargets.auth.password_in = px56Pjq2maKzfCeU # <-- Add "Initiator password" as shown on LUN in ESC
    

Step 3 - Discover the iSCSI Targets

Discover the iSCSI Targets like so:

iscsiadm -m discovery -t sendtargets -p 192.168.37.164:3260 # Use the first IP of your LUN

Step 4 - Connect to the Target

Log-in to the iSCSI Target:

iscsiadm -m node --login

Step 5 - Enable / Setup Multipath

  1. Set failback immediate to the Mulitpath Config by adding failback immediate in the defaults:

    cat /etc/multipath.conf
    
    # device-mapper-multipath configuration file
    
    # For a complete list of the default configuration values, run either:
    # # multipath -t
    # or
    # # multipathd show config
    
    # For a list of configuration options with descriptions, see the
    # multipath.conf man page.
    
    defaults {
    user_friendly_names yes
    find_multipaths yes
    enable_foreign "^$"
    failback immediate # <-- Add this line
    }
    
    blacklist_exceptions {
    property "(SCSI_IDENT_|ID_WWN)"
    }
    
    blacklist {
    }
    












     










  2. Enable & Start Multipath:

    # Enable
    mpathconf --enable --with_multipathd y
    # Show & Verify
    multipath -t
    # Start Service
    systemctl start multipathd.service
    

Step 6 - Mount LUN

  1. Create Partition

    # Verify if it exists in the available block devices
    lsblk
    multipath -ll
    # Create a new Partition
    mkfs.ext4 /dev/dm-11 # Replace dm-11
    
  2. Mount Disk

    # Mount Disk
    mount /dev/dm-11 /mnt # Replace dm-11
    # Verify if disk exists
    df -h
    

Restore Backup

For a restore of a backup an incident ticket must be opened. The following information is mandatory:

  • LUN Name
  • Date of the backup
  • Initiator Name
Last Updated: