{"id":254,"date":"2012-06-14T04:16:47","date_gmt":"2012-06-13T22:46:47","guid":{"rendered":"http:\/\/asgaur.com\/wp\/?p=254"},"modified":"2014-04-02T11:54:17","modified_gmt":"2014-04-02T06:24:17","slug":"linux-iscsi-initiator-installation-configration","status":"publish","type":"post","link":"http:\/\/www.asgaur.com\/wp\/linux-iscsi-initiator-installation-configration\/","title":{"rendered":"Linux: iSCSI Initiator installation &amp; configration"},"content":{"rendered":"<p>Installation Instructions:<\/p>\n<p>Red Hat Supplied iSCSI Initiator:<\/p>\n<p>Find the RPM on the Red Hat Media, then install it using the rpm \u2013ivh command as follows:<\/p>\n<p><code># rpm \u2013ivh iscsi-initiator-utils-6.2.0.742-0.5.el5<\/code><\/p>\n<p>NOTE: This is the version for Enterprise Linux AS 5. Your version may be different.<\/p>\n<p><!-- Adsense block #820 not displayed since it exceed the limit of 3 --><\/p>\n<p>An alternative to installing this package manually in Red Hat Enterprise Linux (ES or AS) 5 or greater is to use the \u201cAdd\/Remove Applications\u201d menu item in the \u201cSystem Settings\u201d menu. In the details for the \u201cNetwork Servers\u201d package list, the iscsi-initiator-utils is one of the packages listed. This same choice is available in the same location during the initial install of Red Hat, so this can also be done at that time.<\/p>\n<p>Once installed, there will be a file in the \/etc directory named iscsi.conf. If this file does not exist this may indicate a problem with the installation. This file can be created with the following minimal entries:<\/p>\n<p>DiscoveryAddress=<\/p>\n<p>&nbsp;<\/p>\n<p>This needs to be set to the Group IP Address of your UIT Array.<\/p>\n<p>SendAsyncText=yes<\/p>\n<p>For the initiator to receive Vendor Specific async events from the target.<\/p>\n<p>Continuous=yes<\/p>\n<p>To globally specify that all discovery sessions be kept open.<\/p>\n<p>Within the iscsi.conf file itself there are many more options available that can be set. You can look through the iscsi.conf file for information on what these variables are and what they are used for.<\/p>\n<p>Once these values are either placed in a newly created \/etc\/iscsi.conf file, or the respective lines are uncommented and edited where necessary, the iscsi service can be started:<\/p>\n<p><code># service iscsi start<\/code><\/p>\n<p>To verify that the iscsi service will be started at boot time, the chkconfig command can be used as follows:<br \/>\n<code><br \/>\n# chkconfig \u2013list iscsi<\/code><\/p>\n<p>iscsi 0:off 1:off 2:off 3:off 4:off 5:off 6:off<\/p>\n<p>By default, the newly added iscsi initiator is not enabled at boot which is the reason for each of the run levels listed to have the service set to off. To enable this at boot, again use the chkconfig command as follows:<\/p>\n<p><code># chkconfig \u2013add iscsi<\/code><\/p>\n<p># chkconfig iscsi on<\/p>\n<p>The above two commands first checks to be sure there are the necessary scripts to start and stop the service, then it sets this service to be on for the appropriate runlevels.<\/p>\n<p>Then check to be sure the changes took effect:<br \/>\n<code><br \/>\n# chkconfig \u2013list iscsi<\/code><\/p>\n<p>iscsi 0:off 1:off 2:on 3:on 4:on 5:on 6:off<\/p>\n<p>To verify that you can see your iscsi devices, you can run the following command:<\/p>\n<p><code># iscsi-ls<\/code><\/p>\n<p>************************************************************************<\/p>\n<p>SFNet iSCSI Driver Version \u2026 6.2 (27-July-2009 )<\/p>\n<p>************************************************************************<\/p>\n<p>TARGET NAME : iqn.2001-05.com.UIT:6-8a0900-148270001-987006efd6c43836-pat-rhel5-vol2<\/p>\n<p>TARGET ALIAS : pat-rhel5-vol2<\/p>\n<p>HOST NO : 1<\/p>\n<p>BUS NO : 0<\/p>\n<p>TARGET ID : 5<\/p>\n<p>TARGET ADDRESS : 172.19.50.13:3260<\/p>\n<p>SESSION STATUS : ESTABLISHED AT Thu Dec 1 15:51:50 2009<\/p>\n<p>NO. OF PORTALS : 1<\/p>\n<p>PORTAL ADDRESS 1 : 172.19.50.10:3260,0<\/p>\n<p>SESSION ID : ISID 00023d000001 TSIH 06<\/p>\n<p>************************************************************************<\/p>\n<p>To see greater details of the devices, you can run the above command with the \u2013l option:<\/p>\n<p><code># iscsi-ls \u2013s<\/code><\/p>\n<p>************************************************************************<\/p>\n<p>SFNet iSCSI Driver Version \u2026 6.2 (27-Jun-2009 )<\/p>\n<p>************************************************************************<\/p>\n<p>TARGET NAME : iqn.2001-05.com.UIT:6-8a0900-148270001-987006efd6c43836-pat-rhel5-vol2<\/p>\n<p>TARGET ALIAS : pat-rhel5-vol2<\/p>\n<p>HOST NO : 1<\/p>\n<p>BUS NO : 0<\/p>\n<p>TARGET ID : 5<\/p>\n<p>TARGET ADDRESS : 172.19.50.13:3260<\/p>\n<p>SESSION STATUS : ESTABLISHED AT Thu Dec 1 15:51:49 2009<\/p>\n<p>NO. OF PORTALS : 1<\/p>\n<p>PORTAL ADDRESS 1 : 172.19.50.10:3260,0<\/p>\n<p>SESSION ID : ISID 00023d000001 TSIH 06<\/p>\n<p>DEVICE DETAILS :<\/p>\n<p>\u2014\u2014\u2014\u2014\u2013<\/p>\n<p>LUN ID : 0<\/p>\n<p>Vendor: EQLOGIC Model: 100E-00 Rev: 2.1<\/p>\n<p>Type: Direct-Access ANSI SCSI revision: 05<\/p>\n<p>page83 type3: 0690a018007082143638c4d6ef067098<\/p>\n<p>page80: 3036393041303138303037303832313433363338433444364546303637303938<\/p>\n<p>Device: \/dev\/sdc<\/p>\n<p>************************************************************************<\/p>\n<p>As can be seen in the example iscsi-ls \u2013l output above, the device in question is mapped to the \/dev\/sdc device.<\/p>\n<p>Linux-iscsi Sourceforge Initiator:<\/p>\n<p>If you are not running the required update of Red Hat Linux to have their precompiled iSCSI Initiator, you can try to compile the iSCSI Initiator supplied by the Sourceforge linux-iscsi project.<\/p>\n<p>Beyond the required kernel revision as noted above, all development packages need to be installed for the compiling of the initiator as well as the kernel sources. The easiest way to install these items is to us the \u201cAdd\/Remove Applications\u201d in the \u201cSystem Settings Menu\u201d from within the Desktop GUI. Depending on the version of Red Hat you are running will determine what you select to be installed:<\/p>\n<p>Red Hat AS 3:<\/p>\n<p>Development Tools (Default packages have all required packages)<\/p>\n<p>Kernel Development (Again, default is fine)<\/p>\n<p>Red Hat AS 4:<\/p>\n<p>Development Tools (Default packages have all required packages)<\/p>\n<p>NOTE: If there is no Kernel Development choice, the Kernel Source files need to be found and installed prior to compilation.<\/p>\n<p>Once these OS packages are installed, it should be as easy as getting the source package from the Sourceforge linux-iscsi project, then making the initiator. Refer to the README file that comes with the source for detailed instructions on how to make the initiator. If there are problems compiling the initiator, check the linux-iscsi Sourceforge project for assistance. You are able to search and post to their mailing lists to get information and assistance with this product.<\/p>\n<p>Persistent Device naming:<\/p>\n<p>Devices using the Red Hat software initiators do not have a persistent naming scheme, but a few ways to setup Persistent Naming for the different versions of Red Hat are as follows:<\/p>\n<p>Red Hat Enterprise Linux (ES or AS) 3:<\/p>\n<p>Devlabel (see the devlabel man page):<\/p>\n<p>This will only work on Red Hat kernel\u2019s 2.4.x.<\/p>\n<p>Use devlabel to setup symlinks from known names to the current device name.<\/p>\n<p>A basic add command to setup a devlabel link is as follows:<\/p>\n<p><code># devlabel add \u2013d -s \t<link \/><\/code><\/p>\n<p>An example:<\/p>\n<p><code>sdc \u2013s \/dev\/iscsi\/vollink<\/code><\/p>\n<p><code># ls \u2013l \/dev\/iscsi\/vollink<\/code><\/p>\n<p>lrwxrwxrwx 1 root root 8 Dec 1 16:31 newvol -&gt; \/dev\/sdc<\/p>\n<p>Red Hat Enterprise Linux (ES or AS) 4:<\/p>\n<p>Use the udev facility (man udev, man scsi_id):<\/p>\n<p>This is only available on Red Hat EL 4\/Kernel 2.6.*<\/p>\n<p>This creates device links to the device files when the device nodes are created. Udev uses a rules file (see man udev) to determine what the link names or device names it should create for different devices.<\/p>\n<p>This is the least elegant of the solutions to configure and there is no straightforward example to provide on how this needs to be setup.<\/p>\n<p>Red Hat may be able to provide additional information on persistent device naming for iSCSI devices using their iSCSI initiator with udev.<\/p>\n<p>Both Red Hat Enterprise Linux 3 and 4:<\/p>\n<p>Use filesystem LABELs (see the e2label man page):<\/p>\n<p>This will work on all ext2\/3 filesystem partitions.<\/p>\n<p>Place an ext2\/3 filesystem label on your filesystem partition. Once the Label has been added, use the LABEL identifier to identify the filesystem you want to mount in the fstab (man fstab and\/or man mount). Following is an example of using the e2label command and what a resulting line in the fstab file would look like:<br \/>\n<code><br \/>\n# e2label \/dev\/sdc1 EMC<\/code><\/p>\n<p># mkdir \/EMC<\/p>\n<p># echo \u201cLABEL=EMC \/EMC ext3 _netdev,defaults 0 0\u201d &gt;&gt; \/etc\/fstab<\/p>\n<p>NOTE: _netdev delays the mounting of this filesystem until after the Network has been started and ensures that the filesystem is unmounted before stopping the Network.<br \/>\n<code><br \/>\n# mount \u2013a<\/code><\/p>\n<p># df \u2013k | grep EMC<\/p>\n<p>\/dev\/sdc1 5166332 43072 4860816 1% \/EMC<\/p>\n<p>Red Hat Linux iSCSI Configuration<\/p>\n<p>Supported iSCSI Initiators:<\/p>\n<p>Enterprise Linux (ES or AS) 3 Update 6:<\/p>\n<p>Disc 2 of 4:<\/p>\n<p>iscsi-initiator-utils-6.2-3.i386.rpm<\/p>\n<p>linux-iscsi 3.4.x: Minimum kernel release: 2.4.21<\/p>\n<p>linux-iscsi 3.6.x: Minimum kernel release: 2.4.21<\/p>\n<p>NOTE: Versions of the linux-iscsi Initiator above 3.x are not compatible with the 2.4.x and below kernel release.<\/p>\n<p>Enterprise Linux (ES or AS) 4 Update 2:<\/p>\n<p>Disc 4 of 4:<\/p>\n<p>iscsi-initiator-utils-6.2.0.742-0.5.el5<\/p>\n<p>linux-iscsi:<\/p>\n<p>4.0.2 \u2013 Mnimum kernel release: 2.6.10<\/p>\n<p>4.0.1 \u2013 minimum kernel Release: 2.6.0<\/p>\n<p>NOTE: Versions of the linux-iscsi Initiator below 4.x are not compatible with the 2.6.x and higher kernel release.<\/p>\n<div class=\"item_footer\">\n<p><small>\u00a0<\/small><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Installation Instructions: Red Hat Supplied iSCSI Initiator: Find the RPM on the Red Hat Media, then install it using the rpm \u2013ivh command as follows: # rpm \u2013ivh iscsi-initiator-utils-6.2.0.742-0.5.el5 NOTE: This is the version for Enterprise Linux AS 5. Your version may be different. An alternative to installing this package manually in Red Hat Enterprise [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[5,10,1],"tags":[302,365,395,223,394,106],"class_list":["post-254","post","type-post","status-publish","format-standard","hentry","category-linux","category-san","category-uncategorized","tag-amp","tag-configration","tag-initiator","tag-installation","tag-iscsi","tag-linux-2"],"_links":{"self":[{"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/posts\/254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/comments?post=254"}],"version-history":[{"count":1,"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/posts\/254\/revisions"}],"predecessor-version":[{"id":1185,"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/posts\/254\/revisions\/1185"}],"wp:attachment":[{"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/media?parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/categories?post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/tags?post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}