iSCSI Server安裝與啟用:

step 1. $ yum install kernel-devel openssl-devel gcc rpm-build

step 2. 下載iSCSI-Target Packages(http://iscsitarget.sourceforge.net/)至/tmp

step 3. $ tar zxvf iscsitarget-1.4.20.2.tar.gz

step 4. $ cd /tmp/iscsitarget-1.4.20.2

step 5. $ make

step 6. $ make install

step 7. 建立iSCSI要使用的硬碟空間區塊
        $ dd if=/dev/zero of=/tmp/LUN0 bs=4096 count=262144
        $ dd if=/dev/zero of=/tmp/LUN1 bs=4096 count=262144

step 8. IET Daemon設定
        $ vim /etc/iet/initiators.allow
        ----------------------------------
        ALL ALL
        ----------------------------------

        $ vim /etc/iet/targets.allow
        ----------------------------------
        ALL ALL
        ----------------------------------

        $ vim /etc/iet/initiators.deny
        ----------------------------------
        # ALL ALL
        ----------------------------------

        $ vim /etc/iet/ietd.conf
        ----------------------------------
        Target ign.2012-04.hostname:iSCSI-data1
                Lun 0 Path=/tmp/LUN0,Type=fileio
                Lun 1 Path=/tmp/LUN1,Type=fileio
                Alias iSCSIserver
                MaxConnections          1
                InitialR2T                     Yes
                ImmediateData           Yes
        ----------------------------------


step 9. 設定與啟動iSCSI-Target
        $ chkconfig iscsi-target on
        $ service iscsi-target start

 

以上資料參考自:http://www.ichiayi.com/wiki/tech/centos_iscsi#centos_5_%E4%B8%8A%E9%85%8D%E7%BD%AE_iscsi_%E8%A8%AD%E5%AE%9A

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()