Professional Documents
Culture Documents
11 0 3799040 sr0
252 0 10485760 vda
252 1 512000 vda1
252 2 9972736 vda2
252 16 1048576 vdb
253 0 1048576 dm-0
253 1 8880128 dm-1
253 2 524288 dm-2
Dependency Installed:
pyparsing.noarch 0:1.5.6-9.el7 python-configshell.noarch 1:1.1.fb14-1.el7 python-
kmod.x86_64 0:0.9-4.el7
python-rtslib.noarch 0:2.1.fb50-1.el7 python-urwid.x86_64 0:1.1.1-3.el7
Complete!
/> cd backstores/block
/backstores/block> create sharedisk01 /dev/sanvg01/lunlv01
Created block storage object sharedisk01 using /dev/sanvg01/lunlv01.
/backstores/block> cd /
/> cd iscsi
/iscsi> create iqn.2015-03.com.example:lun1
Created target iqn.2015-03.com.example:lun1.
Created TPG 1.
Global pref auto_add_default_portal=true
Created default portal listening on all IPs (0.0.0.0), port 3260.
/iscsi> cd iqn.2015-03.com.example:lun1/tpg1/
/iscsi/iqn.20...ple:lun1/tpg1> ls
o- tpg1 ..................................................................................................... [no-gen-acls,
no-auth]
o- acls ................................................................................................................ [ACLs: 0]
o- luns ................................................................................................................ [LUNs: 0]
o- portals .......................................................................................................... [Portals: 1]
o- 0.0.0.0:3260 ...........................................................................................................
[OK]
/iscsi/iqn.20...ple:lun1/tpg1> exit
Global pref auto_save_on_exit=true
Last 10 configs saved in /etc/target/backup.
Configuration saved to /etc/target/saveconfig.json
Main configuration file /etc/target/saveconfig.json:
[root@rhel7dns01 ~]# cat /etc/target/saveconfig.json
Click this link to download the saveconfig.json file
To verify the initiator name on the client system (as per the acls):
[root@rhel7dns02 ~]# cat /etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.2015-03.com.example:clientlun1
[root@rhel7dns02 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rhel-root 8.5G 3.0G 5.5G 35% /
devtmpfs 487M 0 487M 0% /dev
tmpfs 497M 80K 497M 1% /dev/shm
tmpfs 497M 7.1M 490M 2% /run
tmpfs 497M 0 497M 0% /sys/fs/cgroup
/dev/vda1 497M 124M 373M 25% /boot
/dev/sr0 4.3G 4.3G 0 100% /mnt
/dev/mapper/datavg01-datalv01 380M 2.3M 354M 1% /datafs
[root@rhel7dns02 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rhel-root 8.5G 3.0G 5.5G 35% /
devtmpfs 487M 0 487M 0% /dev
tmpfs 497M 80K 497M 1% /dev/shm
tmpfs 497M 7.1M 490M 2% /run
tmpfs 497M 0 497M 0% /sys/fs/cgroup
/dev/vda1 497M 124M 373M 25% /boot
/dev/mapper/datavg01-datalv01 380M 2.3M 354M 1% /datafs
Troubleshooting:
Connectivity Issue:
[root@rhel7dns02 nodes]# ping rhel7dns01.example.com
PING rhel7dns01.example.com (192.168.122.100) 56(84) bytes of data.
64 bytes from rhel7dns01.example.com (192.168.122.100): icmp_seq=1 ttl=64
time=0.485 ms
64 bytes from rhel7dns01.example.com (192.168.122.100): icmp_seq=2 ttl=64
time=0.292 ms
^C
--- rhel7dns01.example.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.292/0.388/0.485/0.098 ms
Authentication Issue:
[root@rhel7dns02 nodes]# iscsiadm -m node -T iqn.2015-03.com.example:lun1 -l
Logging in to [iface: default, target: iqn.2015-03.com.example:lun1, portal:
192.168.122.100,3260] (multiple)
iscsiadm: Could not login to [iface: default, target: iqn.2015-03.com.example:lun1,
portal: 192.168.122.100,3260].
iscsiadm: initiator reported error (24 - iSCSI login failed due to authorization failure)
iscsiadm: Could not log into all portals
On Client Side:
[root@rhel7dns02 nodes]# vi /etc/iscsi/iscsid.conf
Thank you very much to being with us. Hope this document will help you to configure
iSCSI target & initiator on RHEL7 (Including PowerLinux