Setting Up an Inexpensive iSCSI Linux Cluster Using SLES10 and OCFS2
(perfect for testing Oracle RAC!)
by Mark Fasheh , Oracle Linux Engineer, and Todd Trichler, OTN
** This guide is for testing purposes only - not production. **
Hardware : Connect 3 pc boxes to a 1Gb switch ($24 at Frys) with ethernet cables.
Installing software on the Server - iSCSI target
Partioning : create custom partioning
128MB /boot ext3
primary
make the rest
of free space an extended partition
40GB /
ext3 primary
2GB swap
extra disk or
partition with at least >2GB space for the iscsi partition
(as large as
you want your file system to be, eg. 40GB
/ocfs2 ext3 )
Software : SUSE Linux Enterprise Server 10
X Window System
Gnome or K Desktop
Environment for Server
Server Base Sytem
Yast > Software > Software Management
Search "iscsi"
X iscsitarget "open source iSCSI
target"
X yast2-iscsi-server
X autocheck
Configure Target :
(do the server target before setting up clients)
Yast > Network Services > iSCSI Target
Service Tab
set service to start when booting
Targets Tab
click Edit
LUN
(make up a
single digit number starting with 0 for the first target)
Path
/dev/sda7
(the path to the partition you set aside)
Next, 'no-auth' , Next,
Finish
click Yes to reload the config
Installing software on Client nodes 1 & 2
Partioning: create custom partioning
128MB /boot ext3
primary
make the rest
of free space an extended partition
40GB /
ext3 primary
2GB swap
Software: accept default
disable firewall
edit Network Interfaces
set IP and Subnet mask
static IP uncheck DHCP
skip internet test
default CA cert
set passwd authentication to
local/etc
Yast > Software > Software Management
Search "iscsi" X
open-iscsi "Linux* Open iSCSI Software Initiator"
X yast2-iscsi-client
X autocheck
Search "ocfs2" X
ocfs2-tools "OCFS2 core tools"
X
ocfs2console "OCFS2 gui tools"
X autocheck
Yast2 > Network Services > iSCSI initiator do this on both clients
Service Tab
* service start when booting
Discover Targets Tab
click on Discovery
put in _actual_ IP address of target , Next
highlight IP
address
click Login no-auth
is default
Connected Targets Tab
click on the Toggle Start Up
Finish
As root
# ocfs2console &
Cluster
select "Configure Nodes" add 2 nodes on client 1
iscsi-client-1
192.168.0.1
iscsi-client-2
192.168.0.2
click close
Cluster
select "Propogate Configuration" (sends to client 2)
Tasks
select "Format"
it should look similiar to this
available
devices : /dev/sdb unknown
volume label :
oracle
cluster size :
Auto
number of node
slots : 4
Blocksize
: Auto
Ok, Format device , Ok
(This may take a few minutes)
--- Do this section on both clients ---
# mkdir /ocfs2
# mount -t ocfs2 /dev/sdb /ocfs2/
# /etc/init/o2cb configure
select "y" to load O2CB driver on boot
select defaults for the rest
This should automatically start the cluster service
Addendum:
1. To set up Local Networking:
(For testing disable the firewall on each machine )
vi /etc/host
iscsi-client-1
192.168.0.1
iscsi-client-2
192.168.0.2
iscsi-server
192.168.0.3
subnet-mask
255.255.255.0
2. To get X forwarding started.
Yast > System > SysConfig Editor
Desktop/Display/Manager
Remote
access Yes
XServer
TCP_Port 600 open Yes