情境:若今天我們要建立兩個Pool,第一個Pool有兩個Lun,這兩個Lun分別只給192.168.1.1與192.168.2.2掛載。而第二個Pool只有一個Lun,這個Lun可以給所有人掛載。那我們的設定檔可以如下。

$ vim /etc/tgt/targets.conf

-------------------------------------------------------------------------
default-driver iscsi

<target iqn.2012-05.hostname:iSCSI-Pool_one>
        <backing-store /mnt/iscsi/LUN1>
                lun 1        #此為這個Pool下的Lun編號:1
                initiator-address 192.168.1.1
        </backing-store>

        <backing-store /mnt/iscsi/LUN2>
                lun 2        #此為這個Pool下的Lun編號:2
                initiator-address 192.168.2.2
        </backing-store>
</target>

<target iqn.2012-05.hostname:iSCSI-Pool_two>
        backing-store /mnt/iscsi/LUN3
        lun 1        #此為這個Pool下的Lun編號:1
        initiator-address ALL

</target>
-------------------------------------------------------------------------

arrow
arrow
    全站熱搜

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