手机版
你好,游客 登录 注册
背景:
阅读新闻

CentOS 5.2+Raid 0+LVM+ISCSI配置详解

[日期:2011-03-06] 来源:Linux社区  作者:lingping [字体:大 中 小]

再使用以下命令创建另一个 target device:
tgtadm --lld iscsi --op new --mode target --tid 2 -T iqn.2008-12.cn.lanexpert:iscsi-data2
tgtadm --lld iscsi --op new --mode logicalunit --tid 2 --lun 1 -b /dev/LVM1/data2
tgtadm --lld iscsi --op bind --mode target --tid 2 -I 192.168.11.108
 
创建完毕后,再利用下面的命令查看 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
            Backing store: /dev/LVM1/data1
    Account information:
    ACL information:
        192.168.3.18
Target 2: iqn.2008-12.cn.lanexpert:iscsi-data2
    System information:
        Driver: iscsi
        Status: running
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: deadbeaf2:0
            SCSI SN: beaf20
            Size: 0
            Backing store: No backing store
        LUN: 1
            Type: disk
            SCSI ID: deadbeaf2:1
            SCSI SN: beaf21
            Size: 325G
            Backing store: /dev/LVM1/data2
    Account information:
    ACL information:
        192.168.11.108
 
5、 修改 /etc/rc.local ,设置开机自动加载 target device 配置
因为以上命令的配置结果,重新开机后便会消失,而且现版本的 target server,RedHat 尚未修改成 System V 服务,如果需要系统重新启动后上述配置仍然有效,只能将以上配置写入 /etc/rc.local ,让系统每次开机都自动执行一次:
 
# ISCSI target device setting -LingPing 2008/12/06
#target 1 (Space 1.5TB)
tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.2008-12.cn.lanexpert:iscsi-data1
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /dev/LVM1/data1
tgtadm --lld iscsi --op bind --mode target --tid 1 -I 192.168.3.18
 
#target 2 (Space 325GB)
tgtadm --lld iscsi --op new --mode target --tid 2 -T iqn.2008-12.cn.lanexpert:iscsi-data2
tgtadm --lld iscsi --op new --mode logicalunit --tid 2 --lun 1 -b /dev/LVM1/data2
tgtadm --lld iscsi --op bind --mode target --tid 2 -I 192.168.11.108
 
由于 tgtdm 的参数短时间内难于记忆,建议多参考 man 或以下提及的文章;

linux
相关资讯       CentOS 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款