{"id":457,"date":"2020-10-17T20:25:30","date_gmt":"2020-10-17T19:25:30","guid":{"rendered":"http:\/\/192.168.8.14\/?p=457"},"modified":"2020-10-17T20:25:30","modified_gmt":"2020-10-17T19:25:30","slug":"freenas-iscsi-setup","status":"publish","type":"post","link":"https:\/\/www.jasonstreet.com\/?p=457","title":{"rendered":"FreeNAS, iSCSI setup"},"content":{"rendered":"\n<p>To get a zvol shared out on a network and visible to clients we need to set up the iSCSI service. This is not as bad as it used to be in the older interfaces.<\/p>\n\n\n\n<p>The iSCSI config can be reached from Sharing \/ Block Shares (iSCSI) or Services \/ iSCSI.<br>Just remember to check that the iSCSI service is running and set to start automatically (says the voice of very bitter experience)<\/p>\n\n\n\n<p>Go to Services \/ iSCSI (don&#8217;t start it now) and click the pencil.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"493\" src=\"http:\/\/192.168.8.14\/wp-content\/uploads\/2020\/10\/47_pool_iscsi13-1024x493.png\" alt=\"\" class=\"wp-image-458\" srcset=\"https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/47_pool_iscsi13-1024x493.png 1024w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/47_pool_iscsi13-300x145.png 300w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/47_pool_iscsi13-768x370.png 768w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/47_pool_iscsi13-850x409.png 850w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/47_pool_iscsi13.png 1501w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>FreeNAS services<\/figcaption><\/figure>\n\n\n\n<p>The first tab in the iSCSI config is Target Global config.<br>This can be left as is for now. Click Save<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"333\" src=\"http:\/\/192.168.8.14\/wp-content\/uploads\/2020\/10\/48_pool_iscsi14-1024x333.png\" alt=\"\" class=\"wp-image-459\" srcset=\"https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/48_pool_iscsi14-1024x333.png 1024w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/48_pool_iscsi14-300x98.png 300w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/48_pool_iscsi14-768x250.png 768w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/48_pool_iscsi14-850x277.png 850w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/48_pool_iscsi14.png 1296w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Although this is not technically a config change, FreeNAS will now want to enable the iSCSI service. If the service is not enabled it will be now. Click Enable Service.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/192.168.8.14\/wp-content\/uploads\/2020\/10\/49_pool_iscsi15.png\" alt=\"\" class=\"wp-image-460\" width=\"288\" height=\"141\" srcset=\"https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/49_pool_iscsi15.png 304w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/49_pool_iscsi15-300x147.png 300w\" sizes=\"auto, (max-width: 288px) 100vw, 288px\" \/><\/figure>\n\n\n\n<p>The Portals menu is shown. Click Add.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"296\" src=\"http:\/\/192.168.8.14\/wp-content\/uploads\/2020\/10\/50_pool_iscsi16-1024x296.png\" alt=\"\" class=\"wp-image-461\" srcset=\"https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/50_pool_iscsi16-1024x296.png 1024w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/50_pool_iscsi16-300x87.png 300w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/50_pool_iscsi16-768x222.png 768w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/50_pool_iscsi16-850x245.png 850w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/50_pool_iscsi16.png 1299w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The Portal pop window will ask for an IP address, select the IP defined for the iSCSI NIC and click Save.<\/p>\n\n\n\n<p>Note: as this is a test build and I&#8217;m not that paranoid I am not using any authentication.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"952\" height=\"308\" src=\"http:\/\/192.168.8.14\/wp-content\/uploads\/2020\/10\/51_pool_iscsi17.png\" alt=\"\" class=\"wp-image-462\" srcset=\"https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/51_pool_iscsi17.png 952w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/51_pool_iscsi17-300x97.png 300w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/51_pool_iscsi17-768x248.png 768w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/51_pool_iscsi17-850x275.png 850w\" sizes=\"auto, (max-width: 952px) 100vw, 952px\" \/><figcaption>Binding the ISCSI servie to a NIC<\/figcaption><\/figure>\n\n\n\n<p>Select the Initiators tab and click on the Add button to create an initiator group.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"298\" src=\"http:\/\/192.168.8.14\/wp-content\/uploads\/2020\/10\/52_pool_iscsi18-1024x298.png\" alt=\"\" class=\"wp-image-463\" srcset=\"https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/52_pool_iscsi18-1024x298.png 1024w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/52_pool_iscsi18-300x87.png 300w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/52_pool_iscsi18-768x223.png 768w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/52_pool_iscsi18-850x247.png 850w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/52_pool_iscsi18.png 1300w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Here I have just added the whole iSCSI network segment. If you are more paranoid (or are going to use this build) I would add the individual host initiators.<br>Click Save when done<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"595\" src=\"http:\/\/192.168.8.14\/wp-content\/uploads\/2020\/10\/53_pool_iscsi19-1024x595.png\" alt=\"\" class=\"wp-image-464\" srcset=\"https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/53_pool_iscsi19-1024x595.png 1024w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/53_pool_iscsi19-300x174.png 300w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/53_pool_iscsi19-768x446.png 768w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/53_pool_iscsi19-850x494.png 850w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/53_pool_iscsi19.png 1284w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Adding iSCSI initiators<\/figcaption><\/figure>\n\n\n\n<p>Click on the Target tab and then click the Add button.<\/p>\n\n\n\n<p>Select the Portal Group ID created earlier (normally 1) and the Initiator group ID (again normally 1) <br>This is a test homelab so I&#8217;m not using Chap authentication, these are blank.<br>Click Save<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"958\" height=\"414\" src=\"http:\/\/192.168.8.14\/wp-content\/uploads\/2020\/10\/54_pool_iscsi20.png\" alt=\"\" class=\"wp-image-465\" srcset=\"https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/54_pool_iscsi20.png 958w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/54_pool_iscsi20-300x130.png 300w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/54_pool_iscsi20-768x332.png 768w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/54_pool_iscsi20-850x367.png 850w\" sizes=\"auto, (max-width: 958px) 100vw, 958px\" \/><\/figure>\n\n\n\n<p>Click the Extents tab and the Add button<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"283\" src=\"http:\/\/192.168.8.14\/wp-content\/uploads\/2020\/10\/55_pool_iscsi21-1024x283.png\" alt=\"\" class=\"wp-image-466\" srcset=\"https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/55_pool_iscsi21-1024x283.png 1024w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/55_pool_iscsi21-300x83.png 300w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/55_pool_iscsi21-768x212.png 768w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/55_pool_iscsi21-850x235.png 850w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/55_pool_iscsi21.png 1271w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Give the Extent a name (I normally use the vmware Datastore name)<br>The Extent type is a device and that device is the zvol we created earlier.<br>Don&#8217;t forget the tick the enabled box and then click Save.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"951\" height=\"641\" src=\"http:\/\/192.168.8.14\/wp-content\/uploads\/2020\/10\/56_pool_iscsi22.png\" alt=\"\" class=\"wp-image-467\" srcset=\"https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/56_pool_iscsi22.png 951w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/56_pool_iscsi22-300x202.png 300w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/56_pool_iscsi22-768x518.png 768w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/56_pool_iscsi22-850x573.png 850w\" sizes=\"auto, (max-width: 951px) 100vw, 951px\" \/><figcaption>iSCSI Extent config<\/figcaption><\/figure>\n\n\n\n<p>Now click on the Associated Targets tab and then click the Add button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"289\" src=\"http:\/\/192.168.8.14\/wp-content\/uploads\/2020\/10\/57_pool_iscsi23-1024x289.png\" alt=\"\" class=\"wp-image-468\" srcset=\"https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/57_pool_iscsi23-1024x289.png 1024w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/57_pool_iscsi23-300x85.png 300w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/57_pool_iscsi23-768x217.png 768w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/57_pool_iscsi23-850x240.png 850w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/57_pool_iscsi23.png 1294w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In the pop up window Add a target name. A valid name is something like iqn.2005-10.org.freenas.ctl:freenas.[your domain]<br>Leave the LUN ID black as it will be auto assigned and select the Extent we created earlier.<br>Click Save.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"950\" height=\"252\" src=\"http:\/\/192.168.8.14\/wp-content\/uploads\/2020\/10\/58_pool_iscsi24.png\" alt=\"\" class=\"wp-image-469\" srcset=\"https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/58_pool_iscsi24.png 950w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/58_pool_iscsi24-300x80.png 300w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/58_pool_iscsi24-768x204.png 768w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/58_pool_iscsi24-850x225.png 850w\" sizes=\"auto, (max-width: 950px) 100vw, 950px\" \/><\/figure>\n\n\n\n<p>iSCSI is now configured. Go back to Services \/ iSCSI and make sure the service is running and set to auto start.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"463\" src=\"http:\/\/192.168.8.14\/wp-content\/uploads\/2020\/10\/59_pool_iscsi25-1024x463.png\" alt=\"\" class=\"wp-image-470\" srcset=\"https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/59_pool_iscsi25-1024x463.png 1024w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/59_pool_iscsi25-300x136.png 300w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/59_pool_iscsi25-768x347.png 768w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/59_pool_iscsi25-850x384.png 850w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/59_pool_iscsi25.png 1497w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>The iSCSI service is running and set to start automatically<\/figcaption><\/figure>\n\n\n\n<p>Connecting to the iSCSI zvol<\/p>\n\n\n\n<p>In the ESXi host go to Configure \/ Storage Adapters \/ iSCSI adapter \/Dynamic Discovery and add the FreeNAS iSCSI NIC IP.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"990\" height=\"471\" src=\"http:\/\/192.168.8.14\/wp-content\/uploads\/2020\/10\/60_pool_iscsi26.png\" alt=\"\" class=\"wp-image-471\" srcset=\"https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/60_pool_iscsi26.png 990w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/60_pool_iscsi26-300x143.png 300w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/60_pool_iscsi26-768x365.png 768w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/60_pool_iscsi26-850x404.png 850w\" sizes=\"auto, (max-width: 990px) 100vw, 990px\" \/><\/figure>\n\n\n\n<p>Re-scan the adapter and then click on static discovery.<br>If the ESXi server can see FReeNAS server we will see the target IQN<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"966\" height=\"472\" src=\"http:\/\/192.168.8.14\/wp-content\/uploads\/2020\/10\/61_pool_iscsi27.png\" alt=\"\" class=\"wp-image-472\" srcset=\"https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/61_pool_iscsi27.png 966w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/61_pool_iscsi27-300x147.png 300w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/61_pool_iscsi27-768x375.png 768w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/61_pool_iscsi27-850x415.png 850w\" sizes=\"auto, (max-width: 966px) 100vw, 966px\" \/><\/figure>\n\n\n\n<p>Then we start the new storage wizard on an ESXi host. We should see the zvol.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"741\" height=\"180\" src=\"http:\/\/192.168.8.14\/wp-content\/uploads\/2020\/10\/62_pool_iscsi28.png\" alt=\"\" class=\"wp-image-473\" srcset=\"https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/62_pool_iscsi28.png 741w, https:\/\/www.jasonstreet.com\/wp-content\/uploads\/2020\/10\/62_pool_iscsi28-300x73.png 300w\" sizes=\"auto, (max-width: 741px) 100vw, 741px\" \/><\/figure>\n\n\n\n<p>From there just run through the wizard, naming the Datastore and setting the size, VMFS version etc.<\/p>\n\n\n\n<p>Other Posts in this series<\/p>\n\n\n\n<p><a href=\"http:\/\/192.168.8.14\/?p=404\">FreeNas build and setup<\/a><br>1, <a href=\"http:\/\/192.168.8.14\/?p=406\">Install from CD<\/a><br>2, <a href=\"http:\/\/192.168.8.14\/?p=418\">IP setup<\/a><br>3, Basic config<br>4, <a href=\"http:\/\/192.168.8.14\/?p=425\">Data NIC<\/a><br>5, <a href=\"http:\/\/192.168.8.14\/?p=434\">Disks and pools<\/a><br>6, <a href=\"http:\/\/192.168.8.14\/?p=457\">iSCSI setup<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To get a zvol shared out on a network and visible to clients we need to set up the iSCSI service. This is not as bad as it used to be in the older interfaces. The iSCSI config can be reached from Sharing \/ Block Shares (iSCSI) or Services \/ iSCSI.Just remember to check that&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[85,27],"tags":[88,93,86,90],"class_list":["post-457","post","type-post","status-publish","format-standard","hentry","category-freenas","category-tutorial","tag-freenas","tag-freenas-core","tag-install","tag-iscsi"],"_links":{"self":[{"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=\/wp\/v2\/posts\/457","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=457"}],"version-history":[{"count":7,"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=\/wp\/v2\/posts\/457\/revisions"}],"predecessor-version":[{"id":540,"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=\/wp\/v2\/posts\/457\/revisions\/540"}],"wp:attachment":[{"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}