HowtoForge

How To Create A Cluster Testbed Using CentOS 5 Virtualization And iSCSI - Page 3

E. iSCSI

iSCSI is a Storage Area Network protocol allowing shared storage going through an exising network infrastructure. In my setup, I used iscsitarget from http://iscsitarget.sourceforge.net.

 

1. iSCSI server installation and configuration

1.a compiling the iscsi application tarball

This needs to be done on the physical host.

1.b configuration needed

This is my ietd.conf configuration defining the "LUNs" to be allocated to the guests from the physical host's disks:

#/etc/ietd.conf
# NOTE: the config files has more entries than what i'm showing here.
# but i've commented out the original entries and made the following
Target iqn.2008-07.NODE00:LUN01.NODE00
   MaxConnections         2
   Lun 1 Path=/dev/Virtual00VG/lvLUN01,Type=fileio
   Alias LUN01
Target iqn.2008-07.NODE00:LUN02.NODE00
   MaxConnections         2
   Lun 2 Path=/dev/Virtual00VG/lvLUN02,Type=fileio
   Alias LUN02
# end of ietd.conf

In my physical host system, I have created two logical volumes 50G each in size. You can also use files or disk partitions, just change the Path entries in the ietd.conf file.

1.c ACL

iscsitarget has /etc/initiators.allow and /etc/initiators.deny that work like hosts.allow and hosts.deny. In my setup, I will allow node01 and node02 to access the two LUNs defined in ietd.conf.

#/etc/initiators.allow
#this should correspond to the definition in your /etc/ietd.conf
iqn.2008-07.NODE00:LUN01.NODE00 192.168.100.10, 192.168.100.20
iqn.2008-07.NODE00:LUN02.NODE00 192.168.100.10, 192.168.100.20
# endof initiators.allow

 

2 Client Side

The package iscsi-initiator-utils-6.2.0.865-0.8.el5 should already be installed (as it is included in the kickstart file above).

2.a configuration

Now do the same for node02. Once the disks are seen by both guests, you can then start setting up a two-node cluster. I've used this configuration to test a two-node Oracle 10gR2 RAC setup with shared ASM storage and OCFS2 on a 64-bit system.

 

F. Conclusion

This kind of setup will help you to learn the basics of clustering without the need of acquiring additional hardware. In no way can this setup be used in a "live" environment. Once you have familiarized yourself with the concept of how a cluster is prepared, you can apply the concept when building real, physical setups that you need for your organization. I hope you'll find this useful.

 

G. Further Readings

How To Create A Cluster Testbed Using CentOS 5 Virtualization And iSCSI - Page 3