{"id":7461,"date":"2024-05-16T15:47:32","date_gmt":"2024-05-16T13:47:32","guid":{"rendered":"https:\/\/blog.atola.com\/?p=7461"},"modified":"2024-05-16T15:59:27","modified_gmt":"2024-05-16T13:59:27","slug":"script-to-create-iscsi-targets","status":"publish","type":"post","link":"https:\/\/atola.com\/blog\/script-to-create-iscsi-targets\/","title":{"rendered":"Script to automatically create iSCSI targets"},"content":{"rendered":"<p>iSCSI network protocol allows remote access to physical or logical devices. In the DFIR domain, it is primarily used for imaging drives that are soldered into a motherboard, working servers that couldn\u2019t be turned off, or devices for which you have legal warrant to access but not seize. In the enterprise segment, iSCSI also could help with replication of an image to multiple computers over a network.<\/p>\n<p>However, to expose a physical or logical drive via iSCSI on a network, you need to set up an iSCSI target correctly. And that is a tedious, multi-step task. To help you with that, we created a Python script named <strong>iscsi-targets<\/strong>. As its name suggests, the script automatically creates iSCSI targets for all drives except for a boot device.<\/p>\n<p><a href=\"https:\/\/github.com\/atola-technology\/iscsi-targets\/\"><span><strong>&#8212; Download iscsi-targets from GitHub &#8212;<\/strong><\/span><\/a><\/p>\n<h3><b>How it works<\/b><\/h3>\n<p><span>As the script was designed to work either independently or in conjunction with Atola imagers, it has a couple useful features:<\/span><\/p>\n<ul>\n<li aria-level=\"1\"><span>To save you time when filling up case details, the script makes sure that the<\/span><b> iSCSI Qualified Name (IQN)<\/b><span> of every iSCSI target <\/span><b>includes the drive model and serial number<\/b><span>. When you add such an iSCSI target in Atola imagers as a source drive, imager\u2019s software pulls the drive model and serial number from IQN into a case.<\/span><\/li>\n<li aria-level=\"1\"><span>Not necessarily you expose all drives, you can also specify a block device as a script argument to create an iSCSI target for it.<\/span><\/li>\n<\/ul>\n<p><span>By the way, we have tested the script on multiple Linux distros:\u00a0<\/span><\/p>\n<ul>\n<li aria-level=\"1\"><span>latest Ubuntu, Fedora, RHEL<\/span><\/li>\n<li aria-level=\"1\"><span>older CentOS versions<\/span><\/li>\n<li aria-level=\"1\"><span>DFIR images, including: Sumuri Paladin, Tsurugi Linux, Caine Linux<br \/>\n<\/span><\/li>\n<\/ul>\n<p>The example below shows the first run of iscsi-targets.py on Paladin. It has added 3 iSCSI targets for SATA and USB drives in the blink of an eye.<\/p>\n<div id=\"attachment_7465\" style=\"width: 944px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-7465\" decoding=\"async\" loading=\"lazy\" src=\"https:\/\/atola.com\/blog\/wp-content\/uploads\/2024\/05\/create-iscsi-targets1.png\" alt=\"Automated iSCSI target creation in Paladin\" width=\"934\" height=\"227\" class=\"atola-shadow wp-image-7465 size-full\" title=\"Automated iSCSI target creation in Paladin\" \/><p id=\"caption-attachment-7465\" class=\"wp-caption-text\">Automated iSCSI target creation in Paladin<\/p><\/div>\n<h2><b>Use the script with Atola Insight Forensic<\/b><\/h2>\n<p><span>Thanks to iSCSI support in <\/span><a href=\"https:\/\/atola.com\/products\/insight\/\"><span>Atola Insight Forensic<\/span><\/a><span>, our portable forensic imaging tool with damaged drive support and data recovery functions, you can add up to 3 remote network drives simultaneously and image them in parallel.<\/span><\/p>\n<p><span>This feature is available on <\/span><b>both DiskSense and DiskSense 2 hardware units.<\/b><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>iSCSI network protocol allows remote access to physical or logical devices. In the DFIR domain, it is primarily used for imaging drives that are soldered into a motherboard, working servers that couldn\u2019t be turned off, or devices for which you have legal warrant to access but not seize. In the [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":7465,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,43],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Script to automatically create iSCSI targets<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/atola.com\/blog\/script-to-create-iscsi-targets\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Script to automatically create iSCSI targets\" \/>\n<meta property=\"og:description\" content=\"iSCSI network protocol allows remote access to physical or logical devices. In the DFIR domain, it is primarily used for imaging drives that are soldered into a motherboard, working servers that couldn\u2019t be turned off, or devices for which you have legal warrant to access but not seize. In the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/AtolaTechnology\" \/>\n<meta property=\"article:published_time\" content=\"2024-05-16T13:47:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-16T13:59:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.atola.com\/wp-content\/uploads\/2024\/05\/create-iscsi-targets1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"934\" \/>\n\t<meta property=\"og:image:height\" content=\"227\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Sergiy Pasyuta\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@atola_insight\" \/>\n<meta name=\"twitter:site\" content=\"@atola_insight\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sergiy Pasyuta\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/\"},\"author\":{\"name\":\"Sergiy Pasyuta\",\"@id\":\"https:\/\/atola.com\/blog\/#\/schema\/person\/599f36f15ee355ac182737cc792fcee9\"},\"headline\":\"Script to automatically create iSCSI targets\",\"datePublished\":\"2024-05-16T13:47:32+00:00\",\"dateModified\":\"2024-05-16T13:59:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/\"},\"wordCount\":369,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/atola.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/atola.com\/blog\/wp-content\/uploads\/2024\/05\/create-iscsi-targets1.png\",\"articleSection\":[\"Atola Insight Forensic\",\"Open source\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/\",\"url\":\"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/\",\"name\":\"Script to automatically create iSCSI targets\",\"isPartOf\":{\"@id\":\"https:\/\/atola.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/atola.com\/blog\/wp-content\/uploads\/2024\/05\/create-iscsi-targets1.png\",\"datePublished\":\"2024-05-16T13:47:32+00:00\",\"dateModified\":\"2024-05-16T13:59:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/#primaryimage\",\"url\":\"https:\/\/atola.com\/blog\/wp-content\/uploads\/2024\/05\/create-iscsi-targets1.png\",\"contentUrl\":\"https:\/\/atola.com\/blog\/wp-content\/uploads\/2024\/05\/create-iscsi-targets1.png\",\"width\":934,\"height\":227},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/atola.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Script to automatically create iSCSI targets\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atola.com\/blog\/#website\",\"url\":\"https:\/\/atola.com\/blog\/\",\"name\":\"Atola Blog\",\"description\":\"Atola Blog\",\"publisher\":{\"@id\":\"https:\/\/atola.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atola.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atola.com\/blog\/#organization\",\"name\":\"Atola Technology\",\"url\":\"https:\/\/atola.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/atola.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atola.com\/blog\/wp-content\/uploads\/2026\/04\/Atola_technology1.jpg\",\"contentUrl\":\"https:\/\/atola.com\/blog\/wp-content\/uploads\/2026\/04\/Atola_technology1.jpg\",\"width\":840,\"height\":689,\"caption\":\"Atola Technology\"},\"image\":{\"@id\":\"https:\/\/atola.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/AtolaTechnology\",\"https:\/\/x.com\/atola_insight\",\"https:\/\/ua.linkedin.com\/company\/atola-technology\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atola.com\/blog\/#\/schema\/person\/599f36f15ee355ac182737cc792fcee9\",\"name\":\"Sergiy Pasyuta\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/atola.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/75d60b3c5460fff20cfdd3afee4937c8?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/75d60b3c5460fff20cfdd3afee4937c8?s=96&d=identicon&r=g\",\"caption\":\"Sergiy Pasyuta\"},\"description\":\"Sergiy is an experienced technical writer with a passion for simplifying complex concepts in user manuals. With a keen eye for detail and a knack for clear communication, he crafts articles that guide users through our products\u2019 functionalities.\",\"url\":\"https:\/\/atola.com\/blog\/author\/sergiy-pasyutaatola-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Script to automatically create iSCSI targets","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/atola.com\/blog\/script-to-create-iscsi-targets\/","og_locale":"en_US","og_type":"article","og_title":"Script to automatically create iSCSI targets","og_description":"iSCSI network protocol allows remote access to physical or logical devices. In the DFIR domain, it is primarily used for imaging drives that are soldered into a motherboard, working servers that couldn\u2019t be turned off, or devices for which you have legal warrant to access but not seize. In the [&hellip;]","og_url":"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/","article_publisher":"https:\/\/www.facebook.com\/AtolaTechnology","article_published_time":"2024-05-16T13:47:32+00:00","article_modified_time":"2024-05-16T13:59:27+00:00","og_image":[{"width":934,"height":227,"url":"https:\/\/blog.atola.com\/wp-content\/uploads\/2024\/05\/create-iscsi-targets1.png","type":"image\/png"}],"author":"Sergiy Pasyuta","twitter_card":"summary_large_image","twitter_creator":"@atola_insight","twitter_site":"@atola_insight","twitter_misc":{"Written by":"Sergiy Pasyuta","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/#article","isPartOf":{"@id":"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/"},"author":{"name":"Sergiy Pasyuta","@id":"https:\/\/atola.com\/blog\/#\/schema\/person\/599f36f15ee355ac182737cc792fcee9"},"headline":"Script to automatically create iSCSI targets","datePublished":"2024-05-16T13:47:32+00:00","dateModified":"2024-05-16T13:59:27+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/"},"wordCount":369,"commentCount":0,"publisher":{"@id":"https:\/\/atola.com\/blog\/#organization"},"image":{"@id":"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/#primaryimage"},"thumbnailUrl":"https:\/\/atola.com\/blog\/wp-content\/uploads\/2024\/05\/create-iscsi-targets1.png","articleSection":["Atola Insight Forensic","Open source"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/","url":"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/","name":"Script to automatically create iSCSI targets","isPartOf":{"@id":"https:\/\/atola.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/#primaryimage"},"image":{"@id":"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/#primaryimage"},"thumbnailUrl":"https:\/\/atola.com\/blog\/wp-content\/uploads\/2024\/05\/create-iscsi-targets1.png","datePublished":"2024-05-16T13:47:32+00:00","dateModified":"2024-05-16T13:59:27+00:00","breadcrumb":{"@id":"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/#primaryimage","url":"https:\/\/atola.com\/blog\/wp-content\/uploads\/2024\/05\/create-iscsi-targets1.png","contentUrl":"https:\/\/atola.com\/blog\/wp-content\/uploads\/2024\/05\/create-iscsi-targets1.png","width":934,"height":227},{"@type":"BreadcrumbList","@id":"https:\/\/blog.atola.com\/script-to-create-iscsi-targets\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/atola.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Script to automatically create iSCSI targets"}]},{"@type":"WebSite","@id":"https:\/\/atola.com\/blog\/#website","url":"https:\/\/atola.com\/blog\/","name":"Atola Blog","description":"Atola Blog","publisher":{"@id":"https:\/\/atola.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atola.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/atola.com\/blog\/#organization","name":"Atola Technology","url":"https:\/\/atola.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/atola.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/atola.com\/blog\/wp-content\/uploads\/2026\/04\/Atola_technology1.jpg","contentUrl":"https:\/\/atola.com\/blog\/wp-content\/uploads\/2026\/04\/Atola_technology1.jpg","width":840,"height":689,"caption":"Atola Technology"},"image":{"@id":"https:\/\/atola.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/AtolaTechnology","https:\/\/x.com\/atola_insight","https:\/\/ua.linkedin.com\/company\/atola-technology"]},{"@type":"Person","@id":"https:\/\/atola.com\/blog\/#\/schema\/person\/599f36f15ee355ac182737cc792fcee9","name":"Sergiy Pasyuta","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/atola.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/75d60b3c5460fff20cfdd3afee4937c8?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/75d60b3c5460fff20cfdd3afee4937c8?s=96&d=identicon&r=g","caption":"Sergiy Pasyuta"},"description":"Sergiy is an experienced technical writer with a passion for simplifying complex concepts in user manuals. With a keen eye for detail and a knack for clear communication, he crafts articles that guide users through our products\u2019 functionalities.","url":"https:\/\/atola.com\/blog\/author\/sergiy-pasyutaatola-com\/"}]}},"_links":{"self":[{"href":"https:\/\/atola.com\/blog\/wp-json\/wp\/v2\/posts\/7461"}],"collection":[{"href":"https:\/\/atola.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atola.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atola.com\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/atola.com\/blog\/wp-json\/wp\/v2\/comments?post=7461"}],"version-history":[{"count":16,"href":"https:\/\/atola.com\/blog\/wp-json\/wp\/v2\/posts\/7461\/revisions"}],"predecessor-version":[{"id":7480,"href":"https:\/\/atola.com\/blog\/wp-json\/wp\/v2\/posts\/7461\/revisions\/7480"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/atola.com\/blog\/wp-json\/wp\/v2\/media\/7465"}],"wp:attachment":[{"href":"https:\/\/atola.com\/blog\/wp-json\/wp\/v2\/media?parent=7461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atola.com\/blog\/wp-json\/wp\/v2\/categories?post=7461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atola.com\/blog\/wp-json\/wp\/v2\/tags?post=7461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}