{"id":433,"date":"2019-08-22T14:06:25","date_gmt":"2019-08-22T04:06:25","guid":{"rendered":"https:\/\/blog.hegars.com\/?p=433"},"modified":"2025-04-27T22:33:41","modified_gmt":"2025-04-27T12:33:41","slug":"targetcli","status":"publish","type":"post","link":"https:\/\/blog.hegars.com\/?p=433","title":{"rendered":"TargetCLI on Debian"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Install Debian<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Partition<\/h3>\n\n\n\n<p>leave space for a zfs zpool<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Add some useful packages<\/h3>\n\n\n\n<p>apt-get install vim curl sudo ntfs-3g<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Install TargetCLI<\/h3>\n\n\n\n<p>apt-get install targetcli-fb<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Install ZFS <\/h3>\n\n\n\n<p>apt-get install zfs-dkms<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">ZFS Backstores<\/h3>\n\n\n\n<p>zpool create -f storagepool1 \/dev\/vda3<br>zfs create -V 20Gb storagepool1\/vol1<br>shows up as \/dev\/zvol\/storagepool1\/vol1<br>zpool iostat storagepool1<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setup iSCSI Targets<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Block Targets<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Backstores<\/h4>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Setup ACLS and AUTH<\/h4>\n\n\n\n<h3 class=\"wp-block-heading\">pSCSI and FC Targets<\/h3>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-blog-hegars wp-block-embed-blog-hegars\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"6FSDx353dT\"><a href=\"https:\/\/blog.hegars.com\/?p=697\">iSCSI\/FC\/pSCSI<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;iSCSI\/FC\/pSCSI&#8221; &#8212; blog@hegars\" src=\"https:\/\/blog.hegars.com\/?p=697&#038;embed=true#?secret=z5I5TSUdGJ#?secret=6FSDx353dT\" data-secret=\"6FSDx353dT\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Installing from iso and booting debian over iscsi<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Install from ISO<\/h3>\n\n\n\n<p>Start install sequence and get up to disk partitions section<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Edit \/etc\/iscsi\/initiatorname.iscsi<\/h3>\n\n\n\n<p>switch to VT2<\/p>\n\n\n\n<p>edit to add the correct IQN to match the target acls<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Edit \/etc\/iscsi\/iscsid.conf<\/h3>\n\n\n\n<p>set node.session.auth.authmethod = CHAP<br>set node.session.auth.username = username<br>set node.session.auth.password = password<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Find, kill then restart iscsid<\/h3>\n\n\n\n<p>kill -9 PID<br>\/sbin\/iscsid<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Contiune to follow normal process <\/h3>\n\n\n\n<p>Switch back to VT1<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">References<\/h2>\n\n\n\n<p><a href=\"https:\/\/www.server-world.info\/en\/note?os=Debian_12&amp;p=iscsi&amp;f=3\">https:\/\/www.server-world.info\/en\/note?os=Debian_12&amp;p=iscsi&amp;f=3<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/docs.redhat.com\/en\/documentation\/red_hat_enterprise_linux\/9\/html\/managing_storage_devices\/configuring-an-iscsi-target_managing-storage-devices#creating-a-fileio-storage-object_configuring-an-iscsi-target\">https:\/\/docs.redhat.com\/en\/documentation\/red_hat_enterprise_linux\/9\/html\/managing_storage_devices\/configuring-an-iscsi-target_managing-storage-devices#creating-a-fileio-storage-object_configuring-an-iscsi-target<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install Debian Partition leave space for a zfs zpool Add some useful packages apt-get install vim curl sudo ntfs-3g Install TargetCLI apt-get install targetcli-fb Install ZFS apt-get install zfs-dkms ZFS Backstores zpool create -f storagepool1 \/dev\/vda3zfs create -V 20Gb storagepool1\/vol1shows up as \/dev\/zvol\/storagepool1\/vol1zpool iostat storagepool1 Setup iSCSI Targets Block Targets Backstores Setup ACLS and AUTH [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[6,16],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.hegars.com\/index.php?rest_route=\/wp\/v2\/posts\/433"}],"collection":[{"href":"https:\/\/blog.hegars.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hegars.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hegars.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hegars.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=433"}],"version-history":[{"count":18,"href":"https:\/\/blog.hegars.com\/index.php?rest_route=\/wp\/v2\/posts\/433\/revisions"}],"predecessor-version":[{"id":2625,"href":"https:\/\/blog.hegars.com\/index.php?rest_route=\/wp\/v2\/posts\/433\/revisions\/2625"}],"wp:attachment":[{"href":"https:\/\/blog.hegars.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hegars.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hegars.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}