Skip to content


using iscsi storage in RHEL6

To be able to receive iscsi storage requires one rpm and a running service on the initiator (the host than needs the iscsi delivered storage – lun.

# yum -y install iscsi-initiator-utils
# systemctl start iscsid
# systemctl status iscsid

Before our storage administrator could created a lun (the storage target) for me I had to provide him with a few bits of information about the initiator host.

# cat /etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.1994-05.com.redhat:e381f530ba68

A minute later, he emailed me this two lines

fqn:iqn.2015-10.edu.chop:xentp.rhelwmd
storage host address: 10.23.92.210 

After login into initiator, the following command showed me that I “see” my “target” defined by its FQN as iqn.2015-10.edu.chop:xentp.rhelwmd

# iscsiadm -m discovery -t st -p 10.23.92.210
10.23.92.210:3260,1 iqn.2015-08.edu.chop:xentp.pvsmstt1a1
10.23.92.210:3260,1 iqn.2015-10.edu.chop:xentp.rhelwmd

To acquire what is mine :-), I have to --login to my target.

# iscsiadm --mode node --targetname iqn.2015-10.edu.chop:xentp.rhelwmd --login

To verify that we have gotten it and to find the new disk name we execute the following command.

# iscsiadm -m session -P 3
iSCSI Transport Class version 2.0-870
version 6.2.0.873-28
Target: iqn.2015-08.edu.chop:xentp.pvsmstt1a1 (non-flash)
        Current Portal: 10.23.92.210:3260,1
        Persistent Portal: 10.23.92.210:3260,1
                **********
                Interface:
                **********
                Iface Name: default
                Iface Transport: tcp
                Iface Initiatorname: iqn.1994-05.com.redhat:e381f530ba68
                Iface IPaddress: 10.18.50.198
                Iface HWaddress: <empty>
                Iface Netdev: <empty>
                SID: 1
                iSCSI Connection State: LOGGED IN
                iSCSI Session State: LOGGED_IN
                Internal iscsid Session State: NO CHANGE
                *********
                Timeouts:
                *********
                Recovery Timeout: 120
                Target Reset Timeout: 30
                LUN Reset Timeout: 30
                Abort Timeout: 15
                *****
                CHAP:
                *****
                username: <empty>
                password: ********
                username_in: <empty>
                password_in: ********
                ************************
                Negotiated iSCSI params:
                ************************
                HeaderDigest: None
                DataDigest: None
                MaxRecvDataSegmentLength: 262144
                MaxXmitDataSegmentLength: 65536
                FirstBurstLength: 65536
                MaxBurstLength: 65536
                ImmediateData: Yes
                InitialR2T: No
                MaxOutstandingR2T: 1
                ************************
                Attached SCSI devices:
                ************************
                Host Number: 33 State: running
                scsi33 Channel 00 Id 0 Lun: 1
                        Attached scsi disk sdd          State: running
Target: iqn.2015-10.edu.chop:xentp.rhelwmd (non-flash)
        Current Portal: 10.23.92.210:3260,1
        Persistent Portal: 10.23.92.210:3260,1
                **********
                Interface:
                **********
                Iface Name: default
                Iface Transport: tcp
                Iface Initiatorname: iqn.1994-05.com.redhat:e381f530ba68
                Iface IPaddress: 10.18.50.198
                Iface HWaddress: <empty>
                Iface Netdev: <empty>
                SID: 2
                iSCSI Connection State: LOGGED IN
                iSCSI Session State: LOGGED_IN
                Internal iscsid Session State: NO CHANGE
                *********
                Timeouts:
                *********
                Recovery Timeout: 120
                Target Reset Timeout: 30
                LUN Reset Timeout: 30
                Abort Timeout: 15
                *****
                CHAP:
                *****
                username: <empty>
                password: ********
                username_in: <empty>
                password_in: ********
                ************************
                Negotiated iSCSI params:
                ************************
                HeaderDigest: None
                DataDigest: None
                MaxRecvDataSegmentLength: 262144
                MaxXmitDataSegmentLength: 65536
                FirstBurstLength: 65536
                MaxBurstLength: 65536
                ImmediateData: Yes
                InitialR2T: No
                MaxOutstandingR2T: 1
                ************************
                Attached SCSI devices:
                ************************
                Host Number: 34 State: running
                scsi34 Channel 00 Id 0 Lun: 5
                        Attached scsi disk sdc          State: running

From the last output I see that my new disk is known as sdc, which I will use to create a new volume group

# vgcreate iscsiVG /dev/sdc

The final step is to create a file system and this is it – no magic at all. 🙂

Posted in Linux, LINUX.

Tagged with .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.

WordPress Anti Spam by WP-SpamShield



Copyright © 2016 - 2017 Waldemar Mark Duszyk. All Rights Reserved. Created by Blog Copyright.