Multi LUN with single IP - pstorage-iscsi

Discussion in 'Post-Deployment: Configuration and Setup' started by Machiasiaweb, Sep 15, 2015.

  1. Machiasiaweb

    Machiasiaweb Mega Poster

    Messages:
    182
    Hello,

    I would like to check the correct steps where I am working on pstorage-iscsi with multi LUN on single IP.

    First I have created LUN 1 with target name 'iqn.2014.06.com.parallels:store1' which is running fine

    Then I have created LUN 2 with target name ' iqn.2014.06.com.parallels:store2'

    # pstorage-iscsi lun-add -t iqn.2014.06.com.parallels:store2 --lun 2 -s 15G

    # pstorage-iscsi list --all
    IQN STATUS LUNs HOST PORTAL(s)
    iqn.2014.06.com.parallels:store1 running 1 0ff06a1f313249c0 192.168.29.206
    iqn.2014.06.com.parallels:store2 stopped 0 0ff06a1f313249c0 192.168.29.206

    However I got following error when I start LUN 2

    # pstorage-iscsi start -t iqn.2014.06.com.parallels:store2
    Address 192.168.29.206/32 already exist on bridge pstorage-iscsi
    RTNETLINK answers: File exists
    Failed to add address 192.168.29.206/32 to bridge pstorage-iscsi
    Unable start target iqn.2014.06.com.parallels:store2

    What should I do correct config? Please advise or it could not support?

    Thanks!
     
  2. Pavel

    Pavel A.I. Auto-Responder Staff Member

    Messages:
    478
  3. Machiasiaweb

    Machiasiaweb Mega Poster

    Messages:
    182
    Hello,

    Thanks for your suggestion. But could you please how to "... just add 2nd LUN to the first target?...."

    Thanks!
     
  4. Pavel

    Pavel A.I. Auto-Responder Staff Member

    Messages:
    478
    Hi,

    When you add lun you specify ID of the lun you add with "--lun".
    E.g. here is your command I copied from above:
    # pstorage-iscsi lun-add -t iqn.2014.06.com.parallels:store2 --lun 2 -s 15G
    Just use the same target for "-t", and different ID for "--lun".
    The ID is not global across the host and all targets, ID is target-specific.
     
  5. Machiasiaweb

    Machiasiaweb Mega Poster

    Messages:
    182
    Hello,

    Thanks for your remind.

    I have create new LUN 2 now.

    # pstorage-iscsi list -t iqn.2014.06.com.parallels:store1
    Target iqn.2014.06.com.parallels:store1:
    Portals: 192.168.29.206
    Status: running
    Registered: yes
    Host: 0ff06a1f313249c0
    Initiator: iqn.1994-05.com.redhat:e05bed728fae (vznod1.testing.net)
    LUN: 1, Size: 16384M, Used: 6912M, Online: Yes <--- 16G
    LUN: 2, Size: 15360M, Used: 1M, Online: Yes <--- 15G

    However, At initiator. It looks still discover LUN 1. As it showing the new disk size is 16GB

    --------------------
    # iscsiadm --mode discovery --type sendtargets --portal 192.168.29.206
    192.168.29.206:3260,1 iqn.2014.06.com.parallels:store1

    # iscsiadm --mode node --targetname iqn.2014.06.com.parallels:store1,1 --portal 192.168.29.206:3260 --login target

    # fdisk -l /dev/sdb1

    Disk /dev/sdb1: 17.2 GB, 17179852800 bytes
    64 heads, 32 sectors/track, 16383 cylinders
    Units = cylinders of 2048 * 512 = 1048576 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    -----------------------

    My target is discover and mount LUN 2. Could you please further advise?

    Thanks!
     
  6. Pavel

    Pavel A.I. Auto-Responder Staff Member

    Messages:
    478
    When you connect target with several LUN's it will export all of the disks at the same time. You should look for sdc in your case as sdb will remain untouched.
     
    Machiasiaweb likes this.

Share This Page