Configure iSCSI target on latest NexentaStor Community Edition

NeilZhang
NeilZhang
管理员
140
文章
106.8千
浏览
Storage Virtualization评论377字数 502阅读1分40秒阅读模式

Last night I installed the latest NexentaStor Community Edition (5.2.1) and tried to create an iSCSI target then added it to some ESXi nodes to build my home lab environment.

At the beginning I though I could finish such things in a short time but finally it took me more than half day. Configure iSCSI target on latest NexentaStor Community Edition

The installation was easy and I just selected some options as below:

  1.  27 for the keyboard language
  2.  Select 'Manual installation'
  3.  Select root disk ( I had two disks, so just selected the local one and left the other for shared datastore)
  4.  Assign the Computer Name and the Static IP address
  5.  Select 'default' storage profile
  6.  Select timezone
  7.  Do not run ntp client
  8.  Input admin user's password
  9.  Input Replication password
  10.  Begin installation

Then I tried to manage the system with web interface but failed. Yes, from version 5, have to manage it using console in Community Edition.

Although I was not afraid of shell interface I still did not feel comfortable as it was the first time I touched such NAS system.

First had to enable NAT NIC to access the internet and activate it:

  1. ip create static e1000g0/v4 192.168.126.102/24 (for NAT network)
  2. route create default 192.168.126.2
  3. route destroy default 192.168.116.1 (remove the host-only default gateway)
  4. license activate 83428764-XXXXXXXXXXXXXXXXXXXXXXXX
  5. license show

Below steps were to create one simple volume and map it to a iSCSI target group for lab test.

  1. CLI@iscsi> disk list
  2. # NAME LABEL SIZE MEDIATYPE SED STATE WHERE USAGE
  3. 1 c3t0d0 - 17.18GB ssd no ONLINE LEGACY_SAS:1 rpool (active)
  4. 2 c3t1d0 - 64.42GB ssd no ONLINE LEGACY_SAS:2 -
  5. CLI@iscsi> pool create sharedstore c3t1d0
  6. CLI@iscsi> disk list
  7. # NAME LABEL SIZE MEDIATYPE SED STATE WHERE USAGE
  8. 1 c3t0d0 - 17.18GB ssd no ONLINE LEGACY_SAS:1 rpool (active)
  9. 2 c3t1d0 - 64.42GB ssd no ONLINE LEGACY_SAS:2 sharedstore (active)
  10. CLI@iscsi> iscsitarget create -n iqn.2005-07.com.nexenta:internal 192.168.116.102
  11. New target 'iqn.2005-07.com.nexenta:internal' has been created
  12. CLI@iscsi> iscsitarget create -n iqn.2005-07.com.nexenta:external 192.168.126.102
  13. New target 'iqn.2005-07.com.nexenta:external' has been created
  14. CLI@iscsi> iscsitarget list
  15. NAME PORTALS AUTH STATE
  16. external 192.168.126.102:3260 default online
  17. internal 192.168.116.102:3260 default online
  18. CLI@iscsi> vg create sharedstore/nexenta
  19. CLI@iscsi> vol create sharedstore/nexenta/vol1 55G
  20. CLI@iscsi> targetgroup create tg1 internal external
  21. CLI@iscsi> targetgroup list
  22. NAME MEMBERS
  23. tg1 internal,external
  24. CLI@iscsi> lunmapping create sharedstore/nexenta/vol1 tg1 all
  25. CLI@iscsi> lunmapping list
  26. ID VOLUME TARGETGROUP HOSTGROUP LUN
  27. 67186C84E0E95E8C00000000 sharedstore/nexenta/vol1 tg1 all 0
  28. CLI@iscsi> iscsitarget list
  29. NAME PORTALS AUTH STATE
  30. external 192.168.126.102:3260 default online
  31. internal 192.168.116.102:3260 default online

Note: some documents said '-b 4096' should be used when creating the lunmapping, while if I added the option '-b 4096' then the ESXi would never found the iSCSI lun.

I failed here more than one day!

On the ESXi side, it was really simple and there were many posts about how to configure iSCSI devices on ESXi.

 
  • 本文由 NeilZhang 发表于28/07/2019 03:13:42
  • Repost please keep this link: https://www.dbcloudsvc.com/blogs/storage/configure-iscsi-target-on-latest-nexentastor-community-edition/
匿名

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定