Could not create NetworkPortal in configFS issue resolved
I see that there is an error while creating iscsi portal ” Could not create NetworkPortal in configFS ” in Red hat enterprise Linux 7. I have installed targetcli, started services targetcli and created block storage, LUN, iscsi internet name.
After creating all this i was trying to create an portal but it through an error ” could not create NetworkPortal in configFS “
i find no clue after few minutes i observe that there is an default portal has been created with 0.0.0.0:3260, i thought that was not created by me and i was trying to delete default port with 0.0.0.0:3260. See the Guide to create iscsi server
could not create NetworkPortal in configFS error resolution
/> ls o- / ................................................ [...] o- backstores ......................................... [...] | o- block ............................. [Storage Objects: 1] | | o- iscsi_storage .................. [/dev/iscsi_vg/iscsi_lv (3.0GiB) write-thru activated] | o- fileio ....................................... [Storage Objects: 0] | o- pscsi ........................................ [Storage Objects: 0] | o- ramdisk ......................................... [Storage Objects: 0] o- iscsi ........................................... [Targets: 1] | o- iqn.2014-09.com.example.com:server .................................. [TPGs: 1] | o- tpg1 ...................................... [no-gen-acls, no-auth] | o- acls ................................................... [ACLs: 1] | | o- iqn.2014-09.example.com:desktop ......................................... [Mapped LUNs: 1] | | o- mapped_lun0 .................................. [lun0 block/iscsi_storage (rw)] | o- luns ................................................ [LUNs: 1] | | o- lun0 ............................... [block/iscsi_storage (/dev/iscsi_vg/iscsi_lv)] | o- portals ...................................................... [Portals: 2] | o- 0.0.0.0:3260 ............................................... [OK] o- loopback .................................... [Targets: 0] /> /iscsi/iqn.2014-09.com.example.com:server/tpg1/portals delete 0.0.0.0 Missing required parameter ip_port
Here is an solution to resolve above error
/> /iscsi/iqn.2014-09.com.example.com:server/tpg1/portals delete 0.0.0.0 ip_port=3260 Deleted network portal 0.0.0.1:3260
Now try to create portal with specified IP address
/> /iscsi/iqn.2014-09.com.example.com:server/tpg1/portals/ create 192.168.4.20 Using default IP port 3260 Created network portal 192.168.4.20:3260. /> ls o- / ....................................................... [...] o- backstores ......................................... [...] | o- block .................................... [Storage Objects: 1] | | o- iscsi_storage ................... [/dev/iscsi_vg/iscsi_lv (3.0GiB) write-thru activated] | o- fileio ......................................... [Storage Objects: 0] | o- pscsi ........................................... [Storage Objects: 0] | o- ramdisk ................................... [Storage Objects: 0] o- iscsi ......................................... [Targets: 1] | o- iqn.2014-09.com.example.com:server ................................ [TPGs: 1] | o- tpg1 .................................... [no-gen-acls, no-auth] | o- acls ...................................... [ACLs: 1] | | o- iqn.2014-09.example.com:desktop ............................. [Mapped LUNs: 1] | | o- mapped_lun0 ................................. [lun0 block/iscsi_storage (rw)] | o- luns ....................................... [LUNs: 1] | | o- lun0 ......................... [block/iscsi_storage (/dev/iscsi_vg/iscsi_lv)] | o- portals .......................................... [Portals: 2] | o- 192.168.4.20:3260 ............................................ [OK] | o- 192.168.4.21:3260 ................................. [OK] o- loopback ....................................... [Targets: 0] />
Conclusion
Issue occurred due to an default portal was created and it was pointing to all of the interface by default. Deleting default portal which is 0.0.0.0:3260 using ip_port=3260 option resolve the issue.
Thanks.
Please do comment if this issue resolution helped.
Thanks for your wonderful Support and Encouragement
I also faced this issue
Delete 0.0.0.0 3260 I also it’s work
But I am unable to get clue why this default 0.0.0.0 3260 created automatically,from which parameter or Conf file it’s read default??
you can print like this
portals/ create ip_address=192.168.146.141 ip_port=3260
when you got the error “Could not create NetworkPortal in configFS ” delete the default one using
/iscsi/iqn.20…/tpg1/portals> delete ip_address=0.0.0.0 ip_port=3260
and then you can create the new as :
/iscsi/iqn.20…:target1/tpg1> portals/ create ip_address=192.168.146.141 ip_port=3260
Using default IP port 3260
Created network portal 192.168.146.141:3260.
/iscsi/iqn.20…:target1/tpg1> ls
o- tpg1 ……………………………………………………………………………………….. [no-gen-acls, no-auth]
o- acls …………………………………………………………………………………………………. [ACLs: 1]
| o- iqn.2017-03.com.example:server2 …………………………………………………………………. [Mapped LUNs: 0]
o- luns …………………………………………………………………………………………………. [LUNs: 0]
o- portals ……………………………………………………………………………………………. [Portals: 1]
o- 192.168.146.141:3260 ……………………………………………………………………………………… [OK]
🙂 Good LUCK
hi I have same problem but it’s not resolving with same solution. because in portal i have 0 . and when I am going to create its showing error ” couldn’t create NetworkPortal in configfs”. and then whenever I want to delete default port ip 0.0.0.0 or any . with port 3260 its showing another error …”No such NetworkPortal in configfs”
can anyone please help me on it. thanks
Post the ls output here.
Issue resolved…thnaks for help
iscsiadm : cannot make connection to “IP” : no route to host
couldnot perform sendtargets discovery encountered connection failure
Now this error is coming please help on this. I have 2 machines on same VM & they are pinging to each other.
It works – many thanks!
Worked for me