{"id":717,"date":"2011-09-30T12:50:32","date_gmt":"2011-09-30T12:50:32","guid":{"rendered":"http:\/\/blog.designed79.co.uk\/?p=717"},"modified":"2011-09-30T12:50:32","modified_gmt":"2011-09-30T12:50:32","slug":"netbsd-iscsi-target-config","status":"publish","type":"post","link":"https:\/\/blog.designed79.co.uk\/?p=717","title":{"rendered":"NetBSD iSCSI target config"},"content":{"rendered":"<pre>The NetBSD iSCSI HOWTO\r\n======================\r\n\r\nThis document is intended to tell you how to set up an iSCSI target on\r\na NetBSD host, so that block storage can be presented to the network. \r\nIt then goes on to show how to connect to that storage using the\r\nMicrosoft iSCSI initiator (version 1.06, running on Windows XP).\r\n\r\n1. Configuring the NetBSD iSCSI target\r\n======================================\r\n\r\n1.1. Decide what storage will be presented\r\n\r\nThe iSCSI target serves up block storage to clients on the network.\r\nThese clients are called \"initiators\". Firstly, we must decide how\r\nmuch storage we are going to serve up, and for this document, we\r\nwill serve up 100 MB. It will be in a file called \/tmp\/iscsi-target0.\r\n\r\nSo we must first edit \/etc\/iscsi\/targets, so that it contains the\r\nfollowing lines:\r\n\r\n\t# extent        file or device          start           length\r\n\textent0         \/tmp\/iscsi-target0      0               100MB\r\n\r\n\t# target        flags   storage                 netmask\r\n\ttarget0         rw      extent0                 0\/0\r\n\r\nThe extent definition tells the file which is used as backing\r\nstore. It is persistent, so that the target can serve up the\r\nsame storage after reboot. Its length is 100 MB, and there is\r\nno offset into the file for the start of the extent. (An offset\r\nis useful if you need to skip over MBRs, or disklabels).\r\n\r\nThe extent is mounted read-write by \"target0\", and is served up\r\nto any host (the 0.0.0.0\/0 netmask).\r\n\r\n1.2. Start the iscsi-target\r\n\r\nIssue the command:\r\n\r\n\t# \/etc\/rc.d\/iscsi_target forcestart\r\n\r\nand you should see the messages from the iscsi-target:\r\n\r\n\tStarting iscsi_target.\r\n\tReading configuration from `\/etc\/iscsi\/targets'\r\n\ttarget0:rw:0\/0\r\n\t\textent0:\/tmp\/iscsi-target0:0:104857600\r\n\tDISK: 1 logical units (204800 blocks, 512 bytes\/block), type iscsi fs\r\n\tDISK: LU 0: 100 MB disk storage for \"target0\"\r\n\tTARGET: TargetName is iqn.1994-04.org.netbsd.iscsi-target\r\n\r\n1.3 You're done!\r\n\r\nCongratulations - your iSCSI target is now up and running and\r\nserving blocks to initiators.<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The NetBSD iSCSI HOWTO ====================== This document is intended to tell you how to set up an iSCSI target on a NetBSD [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-717","post","type-post","status-publish","format-standard","hentry","category-info-on-tech"],"_links":{"self":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=717"}],"version-history":[{"count":0,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/717\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=717"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}