Red Hat linux iSCSI initiator configuration(zt)
Red Hat Linux iSCSI Configuration
Supported iSCSI Initiators:
Enterprise Linux (ES or AS) 3 Update 6:
Disc 2 of 4:
iscsi-initiator-utils-3.6.3-3.i386.rpm
linux-iscsi 3.4.x: Minimum kernel release: 2.4.21
linux-iscsi 3.6.x: Minimum kernel release: 2.4.21
NOTE: Versions of the linux-iscsi Initiator above 3.x are not compatible with the 2.4.x and below kernel release.
Enterprise Linux (ES or AS) 4 Update 2:
Disc 4 of 4:
iscsi-initiator-utils-4.0.3.0-2.i386.rpm
linux-iscsi:
4.0.2 – Mnimum kernel release: 2.6.10
4.0.1 – minimum kernel Release: 2.6.0
NOTE: Versions of the linux-iscsi Initiator below 4.x are not compatible with the 2.6.x and higher kernel release.
NOTE: The linux-iscsi version 5.x and higher has yet to be successfully tested by UIT.
Installation Instructions:
Red Hat Supplied iSCSI Initiator:
Regardless of whether Enterprise Linux 3 or 4 is being run, you simply find the RPM on the Red Hat Media, then install it using the rpm –ivh command as follows:
# rpm –ivh iscsi-initiator-utils-4.0.3.0-2.i386.rpm
NOTE: This is the version for Enterprise Linux ES 4 Update 2. Your version may differ.
An alternative to installing this package manually in Red Hat Enterprise Linux (ES or AS) 4 Update 2 or greater is to use the “Add/Remove Applications” menu item in the “System Settings” menu. In the details for the “Network Servers” 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.
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:
DiscoveryAddress=
This needs to be set to the Group IP Address of your UIT Array.
SendAsyncText=yes
For the initiator to receive Vendor Specific async events from the target.
Continuous=yes
To globally specify that all discovery sessions be kept open.
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.
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:
# service iscsi start
To verify that the iscsi service will be started at boot time, the chkconfig command can be used as follows:
# chkconfig –list iscsi
iscsi 0:off 1:off 2:off 3:off 4:off 5:off 6:off
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:
# chkconfig –add iscsi
# chkconfig iscsi on
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.
Then check to be sure the changes took effect:
# chkconfig –list iscsi
iscsi 0:off 1:off 2:on 3:on 4:on 5:on 6:off
To verify that you can see your iscsi devices, you can run the following command:
# iscsi-ls
************************************************************************
SFNet iSCSI Driver Version … 3.6.3 (27-Jun-2005 )
************************************************************************
TARGET NAME : iqn.2001-05.com.UIT:6-8a0900-148270001-987006efd6c43836-pat-rhel3-vol2
TARGET ALIAS : pat-rhel3-vol2
HOST NO : 1
BUS NO : 0
TARGET ID : 5
TARGET ADDRESS : 172.19.50.13:3260
SESSION STATUS : ESTABLISHED AT Thu Dec 1 15:51:50 2005
NO. OF PORTALS : 1
PORTAL ADDRESS 1 : 172.19.50.10:3260,0
SESSION ID : ISID 00023d000001 TSIH 06
************************************************************************
To see greater details of the devices, you can run the above command with the –l option:
# iscsi-ls –s
************************************************************************
SFNet iSCSI Driver Version … 3.6.3 (27-Jun-2005 )
************************************************************************
TARGET NAME : iqn.2001-05.com.UIT:6-8a0900-148270001-987006efd6c43836-pat-rhel3-vol2
TARGET ALIAS : pat-rhel3-vol2
HOST NO : 1
BUS NO : 0
TARGET ID : 5
TARGET ADDRESS : 172.19.50.13:3260
SESSION STATUS : ESTABLISHED AT Thu Dec 1 15:51:49 2005
NO. OF PORTALS : 1
PORTAL ADDRESS 1 : 172.19.50.10:3260,0
SESSION ID : ISID 00023d000001 TSIH 06
DEVICE DETAILS :
————–
LUN ID : 0
Vendor: EQLOGIC Model: 100E-00 Rev: 2.1
Type: Direct-Access ANSI SCSI revision: 05
page83 type3: 0690a018007082143638c4d6ef067098
page80: 3036393041303138303037303832313433363338433444364546303637303938
Device: /dev/sdc
************************************************************************
As can be seen in the example iscsi-ls –l output above, the device in question is mapped to the /dev/sdc device.
Linux-iscsi Sourceforge Initiator:
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.
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 “Add/Remove Applications” in the “System Settings Menu” from within the Desktop GUI. Depending on the version of Red Hat you are running will determine what you select to be installed:
Red Hat AS 3:
Development Tools (Default packages have all required packages)
Kernel Development (Again, default is fine)
Red Hat AS 4:
Development Tools (Default packages have all required packages)
NOTE: If there is no Kernel Development choice, the Kernel Source files need to be found and installed prior to compilation.
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.
Persistent Device naming:
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:
Red Hat Enterprise Linux (ES or AS) 3:
Devlabel (see the devlabel man page):
This will only work on Red Hat kernel’s 2.4.x.
Use devlabel to setup symlinks from known names to the current device name.
A basic add command to setup a devlabel link is as follows:
# devlabel add –d
An example:
# devlabel add –d /dev/sdc –s /dev/iscsi/vollink
# ls –l /dev/iscsi/vollink
lrwxrwxrwx 1 root root 8 Dec 1 16:31 newvol -> /dev/sdc
Red Hat Enterprise Linux (ES or AS) 4:
Use the udev facility (man udev, man scsi_id):
This is only available on Red Hat EL 4/Kernel 2.6.*
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.
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.
Red Hat may be able to provide additional information on persistent device naming for iSCSI devices using their iSCSI initiator with udev.
Both Red Hat Enterprise Linux 3 and 4:
Use filesystem LABELs (see the e2label man page):
This will work on all ext2/3 filesystem partitions.
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:
# e2label /dev/sdc1 TESTLABEL
# mkdir /TESTLABEL
# echo “LABEL=TESTLABEL /TESTLABEL ext3 _netdev,defaults 0 0” >> /etc/fstab
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.
# mount –a
# df –k | grep TESTLABEL
/dev/sdc1 5166332 43072 4860816 1% /TESTLABEL
日期:2007-06-16 22:54:33 分類:
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/312079/viewspace-245780/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- linux iscsi initiator 安裝配置薦Linux
- Migrating Red Hat Linux 2.1 or 3.0 to Red Hat Linux 4.0Linux
- Red Hat Enterprise LinuxLinux
- 從 Red Hat Enterprise Linux 2.1 AS升級到 Red Hat Enterprise Linux 3Linux
- Red Hat Enterprise Linux 7.4Linux
- Red Hat Linux 入門指南!(轉)Linux
- 如何檢視red hat linux 的版本Linux
- Red Hat Linux - top 命令簡易理解Linux
- Red Hat Linux - top 命令簡易理解Linux
- red hat linux 9.0安裝求助!(轉)Linux
- [zt]Oracle9i (9.2.0.4.0) Installation on Red Hat Enterprise Linux 5 (RHEL5)OracleLinux
- 【ISCSI】-iSCSI Initiator與 Target 的安裝、配置與連線過程備忘
- Linux red hat 核心版下安裝NginxLinuxNginx
- Red Hat Linux安裝CentOS的yum源LinuxCentOS
- Red Hat linux9 初裝配置(轉)Linux
- 製作Red Hat Linux急救盤組(轉)Linux
- 系統操作程式:Red Hat linux inittab(轉)Linux
- Oracle ASMLib & Red Hat Linux & Linux核心版本資訊OracleASMLinux
- 在 Red Hat Advanced Server 4 上安裝 Oracle 10.2.0.1 RAC (zt)ServerOracle
- Linux Red Hat啟動時顯示system not foundLinux
- Red Hat Enterprise Linux Server 7.4 安裝LinuxServer
- Red Hat Enterprise Linux 9的簡介Linux
- Red Hat Enterprise Linux 7的新功能Linux
- Oracle 9i Installation on Red Hat Linux (轉)OracleLinux
- red hat linux 9.0下安裝oracle 8.1.7(轉)LinuxOracle
- Fedora Core 與 Red Hat Linux 的關係(轉)Linux
- Red Hat Magazine釋出
- Install iSCSI target for Linux with kernel 2.6.14(zt)Linux
- Red Hat能否推動OpenStack再現Linux的成功?Linux
- 在Red Hat Linux Server 6上能否使用ASMLib?LinuxServerASM
- Red Hat Enterprise Linux使用資源的限制Linux
- 在Red Hat Linux中自動執行程式(轉)Linux行程
- Red Hat Enterprise Linux AS4-U3硬碟Linux硬碟
- 安裝Red Hat Linux 9最小磁碟空間(轉)Linux
- Linux巨頭Red Hat涉足電信行業(轉)Linux行業
- zt_Red Hat 5.5中java JDK的解除安裝和安裝rpmJavaJDK
- How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7Linux
- How to disable transparent Hugepage (THP) on Red Hat Enterprise Linux 8?Linux