{"id":320,"date":"2018-01-24T16:55:51","date_gmt":"2018-01-24T21:55:51","guid":{"rendered":"https:\/\/www.unliterate.net\/?p=320"},"modified":"2018-01-25T10:34:33","modified_gmt":"2018-01-25T15:34:33","slug":"home-linux-file-server-with-software-raid-and-iscsi-45-10","status":"publish","type":"post","link":"https:\/\/www.unliterate.net\/index.php\/2018\/01\/24\/home-linux-file-server-with-software-raid-and-iscsi-45-10\/","title":{"rendered":"Home Linux File Server with Software RAID and iSCSI (4+5\/10)"},"content":{"rendered":"<p>Continuation from <a href=\"https:\/\/www.unliterate.net\/index.php\/2018\/01\/23\/home-linux-file-server-with-software-raid-and-iscsi-1-10\/\">Home Linux File Server<\/a><\/p>\n<p>Challenge 4 and 5: <strong>Setup and configure iSCSI Target<\/strong> and <strong>Mount the LUN from a separate computer<\/strong><\/p>\n<p>I&#8217;m going to be using a guide here: [<a href=\"https:\/\/access.redhat.com\/documentation\/en-us\/red_hat_enterprise_linux\/6\/html\/storage_administration_guide\/ch-iscsi\" rel=\"noopener\" target=\"_blank\">Set up an iSCSI Target and Initiator<\/a>]<\/p>\n<p><!--more--><\/p>\n<p><strong>Preparation<\/strong><\/p>\n<p>So, the first concept is to make the linux box an iSCSI target. We&#8217;ve originally mounted and formatted \/dev\/md0 to ext4, so in order to property iSCSI this we&#8217;ll need to undo our mounting and let the destination machines use this as they want to use it.<\/p>\n<p>So, I <code>umount \/dev\/md0<\/code> and remove it from <code>\/etc\/fstab<\/code>. For the sake of validating it, I reboot the box.<\/p>\n<p><strong>Setting up iSCSI Target<\/strong><\/p>\n<p>Gotta install some tools and services:<\/p>\n<pre># yum install scsi-target-utils\r\n# service tgtd start\r\n# chkconfig tgtd on<\/pre>\n<p>and then we setup <code>\/etc\/tgt\/targets.conf<\/code> with the following:<\/p>\n<pre>\r\n# Set the driver. If not specified, defaults to \"iscsi\".\r\n#\r\n# This can be iscsi or iser. To override a specific target set the\r\n# \"driver\" setting in the target's config.\r\ndefault-driver iscsi\r\n&lt;target iqn.2018-01.eye-scrunchie:target1&gt;\r\n        backing-store \/dev\/md0\r\n&lt;\/target&gt;\r\n<\/pre>\n<p>Reload the new configuration:<\/p>\n<pre># service tgtd restart<\/pre>\n<p>and check the configuration:<\/p>\n<pre># tgt-admin --show\r\nTarget 1: iqn.2018-01.eye-scrunchie:target1\r\n    System information:\r\n        Driver: iscsi\r\n        State: ready\r\n    I_T nexus information:\r\n    LUN information:\r\n        LUN: 0\r\n            Type: controller\r\n            SCSI ID: IET     00010000\r\n            SCSI SN: beaf10\r\n            Size: 0 MB, Block size: 1\r\n            Online: Yes\r\n            Removable media: No\r\n            Prevent removal: No\r\n            Readonly: No\r\n            Backing store type: null\r\n            Backing store path: None\r\n            Backing store flags:\r\n        LUN: 1\r\n            Type: disk\r\n            SCSI ID: IET     00010001\r\n            SCSI SN: beaf11\r\n            Size: 533 MB, Block size: 512\r\n            Online: Yes\r\n            Removable media: No\r\n            Prevent removal: No\r\n            Readonly: No\r\n            Backing store type: rdwr\r\n            Backing store path: \/dev\/md0\r\n            Backing store flags:\r\n    Account information:\r\n    ACL information:\r\n        ALL\r\n<\/pre>\n<p>Step 4 done!<\/p>\n<p><strong>Mounting my iSCSI Target on my Initiator<\/strong><\/p>\n<p>For Step 5, i&#8217;m using a Windows 10 machine and the iSCSI Initiator Desktop App.<\/p>\n<p>For <code>Target:<\/code> I give it the IP Address of my Linux Virtuabox (192.168.1.38) and click <code>Quick Connect...<\/code><\/p>\n<p>The I go to my Disk Management, Initialize the Disk, give it a Letter, and done!<\/p>\n<p>Step 5 Done!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Continuation from Home Linux File Server Challenge 4 and 5: Setup and configure iSCSI Target and Mount the LUN from a separate computer I&#8217;m going to be using a guide here: [Set up an iSCSI Target and Initiator]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,20,17],"tags":[],"class_list":["post-320","post","type-post","status-publish","format-standard","hentry","category-centos","category-geek-instructions","category-linux"],"_links":{"self":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts\/320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/comments?post=320"}],"version-history":[{"count":4,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts\/320\/revisions"}],"predecessor-version":[{"id":324,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts\/320\/revisions\/324"}],"wp:attachment":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/media?parent=320"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/categories?post=320"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/tags?post=320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}