Heartbeat2+iSASI+DRBD

Standard

Step 1:
安装Heartbeat+DRBD 详细步骤请参考 http://yemaosheng.com/?p=333

Step 2:
安装iSCSI Enterprise Target
安装过程中如遇”Module iscsi_trgt not found”的报错请参考 http://yemaosheng.com/?p=340 中的方法处理

Step 3:
vi /etc/ietd.conf
Target iqn.2008-11.yemaosheng.com.example:storage.disk1
Lun 0 Path=/dev/drbd0,Type=fileio
Alias drbd0

vi /var/lib/heartbeat/crm/cib.xml
#在XML配置文件中的相应位置加入

<primitive id="ISCSI_Target" class="lsb" type="iscsi-target" provider="heartbeat">
   <instance_attributes id="ISCSI_Target_instance_attrs">
        <attributes>
           <nvpair id="ISCSI_Target_target_role" name="target_role" value="started"/>
        </attributes>
   </instance_attributes>
</primitive>

至此,将两台机器的heartbeat启动就ok了.

另外要记一下的,不知为何,我用haresources2cib.py通过haresources生成的XML配置文件就没能启动成功.生成的XML配置文件和手工写的有点出入,但也看不出具体错在哪.

转载请注明出处:http://yemaosheng.com

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.