How to setup SLES 10 Multipath, Open-iSCSI connected to Openfiler iSCSI Target

Posted by Planet Malaysia on February 13, 2007

advertisement

1. About:

The following tutorial “How to setup SUSE Linux 10 using Multipathd connected to OpenFiler iSCSI (pronounced eye-skuzzy) protocol uses TCP/IP for its data transfer.

2. What is iSCSI?

An IP-based standard for linking data storage devices over a network and transferring data by carrying SCSI commands over IP networks.

3. Preparations:

  • Minimum 1G Ram, 160GB HDD
  • Microsoft Windows XP Professional with VMware Workstation installed
  • Installing SLES 10 on top of Vmware workstation
  • Installing Openfiler on top of VMware workstation

4. OpenFiler Setup:

  • Login to OpenFiler at https://192.168.1.1:446
  • Login with Username: openfiler & Default Password: password
  • Go to Volume Tab and click Physical Storage Mgmt
  • Physical Storage Mgmt

  • Click here for bigger image
  • Choose an empty HDD partition and create Linux physical Volume HDD partition
  • Create

  • Click here for bigger image
  • Go to General Tab
  • Enter the name: loc1
  • Enter Network/Host: 192.168.15.0
  • Netmask: 255.255.255.0
  • Type: Share
  • Click Update
  • Network Setup

  • Click here for bigger image
  • Go to Volumes Tab
  • Click on Volume Group Mgmt
  • Enter a new volume group name: v01
  • Choose physical volumes to add
  • Click add volume group
  • Create Volume Group

  • Click here for bigger image
  • Click on Create New Volume
  • Enter Volume Name (must be specified like a UNIX filename without its path): lv01
  • Volume Desc: lv01
  • Required Space(MB): 12496
  • Filesystem type: iSCSI
  • Click on Create
  • Create Logical Volume Group

  • Click here for bigger image
  • Click Edit
  • Key in incoming/outgoing username & password if require
  • Click Allow access to loc1(192.168.1.0)
  • Click update
  • Edit

  • Click here for bigger image
  • Go to Services Tab
  • Click on Enable iSCSI Target
  • Enable iSCSI Target

  • Click here for bigger image

5. SLES Linux Setup:

  • Make sure you have open-iscsi & yast2-iscsi-client rpm installed
  • Test to load the modules and daemon
  • Run the services
  • # /etc/init.d/open-iscsi start
    # /etc/init.d/open-iscsi status
    # chkconfig open-iscsi on
  • To check for the target (discovery) and add it to the initiator database, we need to know the target’s IP address and iSCSI port (default TCP port is 3260)
  • # iscsiadm -m discovery -t st -p 192.168.1.1
    [00f1fd] 192.168.1.1:3260,1 iqn.2006-01.com.openfiler:vol1.lv01
    [001d3c] 192.168.1.1:3260,1 iqn.2006-01.com.openfiler:vol1.lv02
  • To see that the target was actually saved to the initiator database, run command: #iscsiadm -m discovery
  • # iscsiadm -m discovery
    [41b4d3] 192.168.1.1:3260 via sendtargets
    [71b4d3] 192.168.1.1:3260 via sendtargets
  • The [71b4d3] part is the resource id used in other actions involving the discovery method. (Check man iscsiadm)
  • You can also check the initiator node database by issuing the command: iscsiadm -m node
  • # iscsiadm -m node
    [00f1fd] 192.168.1.1:3260,1 iqn.2006-01.com.openfiler:vol1.lv01
    [001d3c] 192.168.1.1:3260,1 iqn.2006-01.com.openfiler:vol1.lv02
  • the [001d3c] part is the resource id used in other actions involving the node method. (check man 8 iscsiadm) You also see the target’s iqn name
  • To see the node data stored in the database, the node parameters
  • # iscsiadm -m node -r 00f1fd
    node.name = iqn.2006-05.net.anything:store0
    node.transport_name = tcp
    node.tpgt = 1
    node.active_conn = 1
    node.startup = manual
    node.session.initial_cmdsn = 0
    node.session.auth.authmethod = None
    node.session.auth.username =
    node.session.auth.password =
    node.session.auth.username_in =
    node.session.auth.password_in =
    node.session.timeo.replacement_timeout = 120
    node.session.err_timeo.abort_timeout = 10
    node.session.err_timeo.reset_timeout = 30
    node.session.iscsi.InitialR2T = No
    node.session.iscsi.ImmediateData = Yes
    node.session.iscsi.FirstBurstLength = 262144
    node.session.iscsi.MaxBurstLength = 16776192
    node.session.iscsi.DefaultTime2Retain = 0
    node.session.iscsi.DefaultTime2Wait = 0
    node.session.iscsi.MaxConnections = 0
    node.session.iscsi.MaxOutstandingR2T = 1
    node.session.iscsi.ERL = 0
    node.conn[0].address = 192.168.1.1
    node.conn[0].startup = manual
    node.conn[0].tcp.window_size = 524288
    node.conn[0].tcp.type_of_service = 0
    node.conn[0].timeo.login_timeout = 15
    node.conn[0].timeo.auth_timeout = 45
    node.conn[0].timeo.active_timeout = 5
    node.conn[0].timeo.idle_timeout = 60
    node.conn[0].timeo.ping_timeout = 5
    node.conn[0].timeo.noop_out_interval = 0
    node.conn[0].timeo.noop_out_timeout = 0
    node.conn[0].iscsi.MaxRecvDataSegmentLength = 65536
    node.conn[0].iscsi.HeaderDigest = None
    node.conn[0].iscsi.DataDigest = None
    node.conn[0].iscsi.IFMarker = No
    node.conn[0].iscsi.OFMarker = No
  • To establish a session with our iSCSI target
  • # iscsiadm -m node -r 00f1fd -l
  • There will not be any output from this command if it’s successful. Issue the command ‘dmesg’ or ‘tail -f /var/log/message’, you should see new partition detected
  • # dmesg
    iSCSI Enterprise Target Software - version 0.4.13
    iotype_init(90) register fileio
    iotype_init(90) register nullio
    fileio_attach(233) -2
    audit(1170762197.004:3): audit_backlog_limit=256 old=64
    by auid=4294967295
    IA-32 Microcode Update Driver: v1.14
    IA-32 Microcode Update Driver v1.14 unregistered
    powernow: This module only works with AMD K7 CPUs
    iscsi: registered transport (tcp)
    iscsi: registered transport (tcp)
    scsi1 : iSCSI Initiator over TCP/IP, v1.0-595
    scsi2 : iSCSI Initiator over TCP/IP, v1.0-595
    scsi3 : iSCSI Initiator over TCP/IP, v1.0-595
    Vendor: Openfile  Model: Virtual disk
    Rev: 0
    Type:   Direct-Access
    ANSI SCSI revision: 04
    SCSI device sdb: 5111808 512-byte hdwr sectors (2617 MB)
    sdb: Write Protect is off
    sdb: Mode Sense: 77 00 00 08
    SCSI device sdb: drive cache: write through
    SCSI device sdb: 5111808 512-byte hdwr sectors (2617 MB)
    sdb: Write Protect is off
    sdb: Mode Sense: 77 00 00 08
    SCSI device sdb: drive cache: write through
    sdb: unknown partition table
    sd 3:0:0:0: Attached scsi disk sdb
    sd 3:0:0:0: Attached scsi generic sg1 type 0
    device-mapper: dm-round-robin version 1.0.0 loaded
    scsi4 : iSCSI Initiator over TCP/IP, v1.0-595
    # tail -f /var/log/messages
    Feb  7 18:33:46 linux-rwzy kernel: sdb: Write Protect is off
    Feb  7 18:33:46 linux-rwzy kernel: sdb: Mode Sense: 77 00 00 08
    Feb  7 18:33:46 linux-rwzy kernel: SCSI device sdb: drive cache: write through         Feb  7 18:33:46 linux-rwzy kernel: SCSI device sdb: 5111808 512-byte            hdwr sectors (2617 MB)         Feb  7 18:33:46 linux-rwzy kernel: sdb: Write Protect is off         Feb  7 18:33:46 linux-rwzy kernel: sdb: Mode Sense: 77 00 00 08         Feb  7 18:33:46 linux-rwzy kernel: SCSI device sdb: drive cache:            write through         Feb  7 18:33:46 linux-rwzy kernel:  sdb: unknown partition table         Feb  7 18:33:46 linux-rwzy kernel: sd 3:0:0:0: Attached scsi disk sdb         Feb  7 18:33:46 linux-rwzy kernel: sd 3:0:0:0: Attached scsi generic            sg1 type 0         Feb  7 18:33:46 linux-rwzy multipathd: sdb: add path (uevent)         Feb  7 18:33:47 linux-rwzy kernel: device-mapper: dm-round-robin            version 1.0.0 loaded         Feb  7 18:33:47 linux-rwzy multipathd: 14f70656e66696c00000000           0001000000e1c601000e000000: load table [0 5111808 multipath            0 0 1 1 round-robin 0 1 1 8:16 1000]         Feb  7 18:33:47 linux-rwzy multipathd: 14f70656e66696c00000000           0001000000e1c601000e000000: event checker started         Feb  7 18:33:47 linux-rwzy multipathd: dm-0: add map (uevent)         Feb  7 18:33:47 linux-rwzy multipathd: dm-0: devmap already registered         Feb  7 18:33:47 linux-rwzy iscsid: connection2:0 is operational now         Feb  7 18:33:50 linux-rwzy kernel: scsi4 : iSCSI Initiator over TCP/IP,            v1.0-595
  • Use command ‘fdisk -l’, ‘cat /proc/partitions’ or ‘hwinfo –scsi –short’ for validate
  • #fdisk -l
    Disk /dev/sda: 6442 MB, 6442450944 bytes
    255 heads, 63 sectors/track, 783 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Device Boot      Start         End      Blocks   Id  System
    /dev/sda1            1         130     1044193+  82  Linux swap / Solaris
    /dev/sda2   *       31         783     5245222+  83  Linux         
    
    Disk
    /dev/sdb: 2617 MB, 2617245696 bytes
    81 heads, 62 sectors/track, 1017 cylinders
    Units = cylinders of 5022 * 512 = 2571264 bytes          
    
    Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1            1        1017     2553656   83  Linux
    #hwinfo --scsi --short
    disk:
    /dev/sda             VMware Virtual S
    /dev/sdb             Openfile Virtual disk
  • If your target use authentication you must set the initiator to login with the correct authentication method, username and password
  • iSCSI uses CHAP authentications and has two authentications, in and out. To explain it simple from the initiator’s point of view, the out is from the initiator to the target. Then the in authentication is the target’s authentication to the initiator. The two username and password can be completely different.
  • Congratulations! You’re done!

Possibly Related Posts:


Comments

5 Responses to “How to setup SLES 10 Multipath, Open-iSCSI connected to Openfiler iSCSI Target”

  1. Alexei R on March 8th, 2007 9:32 am

    Document sviolate some of SuSe administration – use yast2 interface when reasonable. 99% of things which you describe here works thru yast2 without any need toi run individial commands. It is useful to know iscsiadmin command – for troubleshouting, but there is not any need to run it, having much simpler and faster interface.

  2. Planet Malaysia on March 8th, 2007 10:56 pm

    Alexei, I had a problem with Yast2 last time which can’t connected to iSCSI devices during startup. No automounted.

  3. saar on April 26th, 2008 2:58 am

    i dont see anything regarding multipathing – i.e. should your 192.168.1.1 host fail the mount fails too

  4. MaxT on November 11th, 2008 8:48 pm

    Yeah, where is multipath part of this guide? If 192.168.1.1 fails, filesystem is no longer available.

  5. craig lockhart on May 3rd, 2009 9:21 am

    I do not have all the tab that are required…. please can you help me…. i think it might be a licence problem. if so how do i get a licence copy for the web side of things….

Leave a Reply




Planet Malaysia

  • Follow us on Twitter


  • web www.planetmy.com