背景:
阅读新闻
HA群集rhcs----ip-san(iscsi)存储区域网络(fence)
[日期:2012-06-05] 来源:Linux社区 作者:haoxiaoyang [字体:]
准备工作
一:target 192.168.2.100
1:修改主机的名字
[root@zzu ~]# vim /etc/sysconfig/network         
NETWORKING=yes 
NETWORKING_IPV6=no 
HOSTNAME=target.a.com
2:修改hosts文件
[root@target ~]# vim /etc/hosts 
127.0.0.1    localhost.localdomain localhost 
::1             localhost6.localdomain6 localhost6 
192.168.2.100   target.a.com  target 
192.168.2.10    node1.a.com   node1 
192.168.2.20    node2.a.com   node2
3:同步各个节点之间的时间
[root@target ~]# hwclock -s
二:node1 192.168.2.10
1:修改主机的名字
[root@zzu ~]# vim /etc/sysconfig/network         
NETWORKING=yes 
NETWORKING_IPV6=no 
HOSTNAME=node1.a.com 
2:修改hosts文件
[root@target ~]# vim /etc/hosts 
127.0.0.1    localhost.localdomain localhost 
::1             localhost6.localdomain6 localhost6 
192.168.2.100   target.a.com  target 
192.168.2.10    node1.a.com   node1 
192.168.2.20    node2.a.com   node2
3:同步各个节点之间的时间
[root@node1 ~]# hwclock -s
三:node2 192.168.2.20
1:修改主机的名字
[root@zzu ~]# vim /etc/sysconfig/network         
NETWORKING=yes 
NETWORKING_IPV6=no 
HOSTNAME=node2.a.com 
2:修改hosts文件
[root@target ~]# vim /etc/hosts 
127.0.0.1    localhost.localdomain localhost 
::1             localhost6.localdomain6 localhost6 
192.168.2.100   target.a.com  target 
192.168.2.10    node1.a.com   node1 
192.168.2.20    node2.a.com   node2
3:同步各个节点之间的时间
[root@node2 ~]# hwclock -s
实施操作
一:target
1:在target上面增加新的硬盘,做存储的挂接使用。
[root@target ~]# fdisk -l
Device Boot      Start         End      Blocks   Id  System 
/dev/sdb1               1         123      987966   83  Linux
2:[root@target ~]# yum install scsi-target-utils*
3:[root@target ~]# service tgtd restart 
Stopping SCSI target daemon:                               [  OK  ] 
Starting SCSI target daemon:                                [  OK  ]
4:[root@target ~]# chkconfig tgtd on 设置tgtd为开机启动
5:
[root@target ~]# tgtadm --lld iscsi  --op new --mode target --tid 1 --targetname iqn.2012-05.com.a.target 
[root@target ~]# tgtadm --lld iscsi --op new --mode logicalunit --tid 1  --lun 1 -b /dev/sdb1 
[root@target ~]# tgtadm --lld iscsi --op bind  --mode target --tid 1  --initiator-address=192.168.2.0/24  开启对存储设备ip验证
[root@target ~]# tgtadm --lld iscsi --op show  --mode target  查看target设备       
Target 1: iqn.2012-05.com.a.target 
    System information: 
        Driver: iscsi 
        State: ready 
    I_T nexus information: 
    LUN information: 
        LUN: 0 
            Type: controller 
            SCSI ID: deadbeaf1:0 
            SCSI SN: beaf10 
            Size: 0 MB 
            Online: Yes 
            Removable media: No 
            Backing store: No backing store 
        LUN: 1 
            Type: disk 
            SCSI ID: deadbeaf1:1 
            SCSI SN: beaf11 
            Size: 1012 MB 
            Online: Yes 
            Removable media: No 
            Backing store: /dev/sdb1 
    Account information: 
    ACL information: 
        192.168.2.0/24
[root@target ~]# vim /etc/tgt/targets.conf 
<target iqn.2012-05.com.a.target> 
         backing-store /dev/sdb1 
initiator-address 192.168.2.0/24 
</target>
相关资讯
		       
	
本文评论 查看全部评论 (0)
 尊重网上道德,遵守中华人民共和国的各项有关法律法规 承担一切因您的行为而直接或间接导致的民事或刑事法律责任 本站管理人员有权保留或删除其管辖留言中的任意内容 本站有权在网站内转载或引用您的评论 参与本评论即表明您已经阅读并接受上述条款
评论声明
最新资讯
