CentOS 5.2+Raid 0+LVM+ISCSI配置详解(4)

新增 target device 命令如下:
 
#tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.2008-12.cn.lanexpert:iscsi-data1
 
执行后,可以利用以下命令查看 target device:
# tgtadm --lld iscsi --op show  --mode target
Target 1: iqn.2008-12. cn.lanexpert:iscsi-data1
    System information:
        Driver: iscsi
        Status: running
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: deadbeaf1:0
            SCSI SN: beaf10
            Size: 0
            Backing store: No backing store
    Account information:
ACL information:
3、 将 target server 新建的 LV1 ( /dev/LVM1/data1 )加入 target device
#tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /dev/LVM1/data1
将逻辑卷加入 target device 后,利用下列命令查看 target device 的信息:
# tgtadm --lld iscsi --op show  --mode target
Target 1: iqn.2008-12. cn.lanexpert:iscsi-data1
    System information:
        Driver: iscsi
        Status: running
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: deadbeaf1:0
            SCSI SN: beaf10
            Size: 0
            Backing store: No backing store
        LUN: 1
            Type: disk
            SCSI ID: deadbeaf1:1
            SCSI SN: beaf11
            Size: 1T                      
# 这里有些不解,实际上的容量是 1.5TB ,后来我在 Win2k3 上连接并分区时也是 1.5TB
            Backing store: /dev/LVM1/data1
    Account information:
    ACL information:
 
4、 允许 initiator 主机 node1(192.168.3.18) 可以存取此 target device
#tgtadm --lld iscsi --op bind --mode target --tid 1 -I 192.168.3.18
 
将逻辑卷加入 target device 后,利用下面的命令查看 target device 的信息:
# tgtadm --lld iscsi --op show  --mode target
Target 1: iqn.2008-12.local.superlgroup.xt:iscsi-data1
    System information:
         Driver: iscsi
        Status: running
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: deadbeaf1:0
            SCSI SN: beaf10
            Size: 0
            Backing store: No backing store
        LUN: 1
            Type: disk
            SCSI ID: deadbeaf1:1
            SCSI SN: beaf11
            Size: 1T
            Backing store: /dev/LVM1/data1
    Account information:
    ACL information:
        192.168.3.18

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wyzdfg.html