Part 7 - Configure First Node: oralin11




Architecture

Node: oralin11

arch_oralin11


Configure PuTTY and Connect 

Enter: Host Name:127.0.0.1, Port:5011, Select SSH and Click Open button

Accept PuTTY Security Alert

Enter root as login, and tototo as password


Each time you see:
 [root@oralin11 ~]#

This is here just to tell you to use a connection with user root to oralin11. 
You have to "Copy and Paste" following lines in connection window.

Installation of VirtualBox Extensions

Install Missing Packages from CDROM

Insert Oracle Linux ISO in Virtual Drive

Create Yum Repo

[root@oralin11 ~]# 

cat >/etc/yum.repos.d/media.repo <<-EOF
[media]
name=media
baseurl=file:///misc/cd
gpgcheck=0
enabled=0
EOF

Install Missing Package

[root@oralin11 ~]#

yum install --enablerepo=media -y kernel-uek-devel gcc pam-devel iscsi-initiator-utils  glibc.i686 libgcc.i686

Unmount CDROM

[root@oralin11 ~]#

umount /dev/cdrom

Select "Remove disk from virtual drive"



Install VirtualBox Extensions

Select "Install Guest Additions..."


Launch installation from CDROM

[root@oralin11 ~]# 

/misc/cd/VBoxLinuxAdditions.run

this is normal: 
Installing the Window System drivers                       [FAILED]


Configure oralin11


Configure kernel

[root@oralin11 ~]# 

/sbin/sysctl -w kernel.shmmax=1073741824 >>/etc/sysctl.conf 
/sbin/sysctl -w kernel.shmall=1073741824 >>/etc/sysctl.conf 
/sbin/sysctl -w kernel.randomize_va_space=0 >>/etc/sysctl.conf 
/sbin/sysctl -p

Stop Useless Services

[root@oralin11 ~]# 

for s in iptables ip6tables postfix rhnsd; do
chkconfig $s off
service $s stop
done

Disable secure linux

[root@oralin11 ~]# 

sed -i 's/^SELINUX=.*$/SELINUX=disabled/' /etc/sysconfig/selinux

Finalize Network

Suppress NM_CONTROLLED, HWADDR and UUID informations in network config

[root@oralin11 ~]#

sed -i '/^NM_CONTROLLED\|HWADDR\|UUID/d' /etc/sysconfig/network-scripts/ifcfg-eth0
sed -i '/^NM_CONTROLLED\|HWADDR\|UUID/d' /etc/sysconfig/network-scripts/ifcfg-eth1

Add hosts

[root@oralin11 ~]# 

cat >>/etc/hosts <<-EOF
# external networks (NAT)
10.0.2.10 nas10ext nas10ext.cluster
10.0.2.11 oralin11ext oralin11ext.cluster
10.0.2.12 oralin12ext oralin12ext.cluster
# internal networks
10.1.0.10 nas10 nas10.cluster
10.1.0.11 oralin11 oralin11.cluster
10.1.0.12 oralin12 oralin12.cluster
EOF

Add FS / NFS

[root@oralin11 ~]# 

mkdir /opt/sybase

echo "nas10:/mnt/sybase_bin/nfs/ce155 /opt/sybase nfs rw,bg,hard,nointr,tcp,vers=3,timeo=300,rsize=32768,wsize=32768,actimeo=0 0 0" >>/etc/fstab

mount /opt/sybase

Add user/group

Create a group and a user "sybase" with password "tototo"

[root@oralin11 ~]#

/usr/sbin/groupadd -g 1500 sybase

/usr/sbin/useradd -d /opt/sybase -M -g sybase -G vboxsf -u 1500 -p '$1$gB9nJP0X$Hrj.Yr4Sd9LX8S.lbid5q1' sybase

cat >/opt/sybase/.bash_profile <<EOF
#! /bin/bash
[ -f .bashrc ] && . .bashrc || . /etc/bashrc
export SYBASE=/opt/sybase
[ -f \$SYBASE/SYBASE.sh ] && . \$SYBASE/SYBASE.sh
EOF

chown -R sybase:sybase /opt/sybase

Add Shared Storage

Configure the iSCSI (initiator) Service

[root@oralin11 ~]# 

service iscsid start
chkconfig iscsid on
chkconfig iscsi on

[root@oralin11 ~]# 

iscsiadm -m discovery -t sendtargets -p nas10

You should see:
Starting iscsid:                                           [  OK  ]
10.1.0.10:3260,1 iqn.2006-01.com.nas10:sybase_data

Manually Login to iSCSI Targets

[root@oralin11 ~]# 

iscsiadm -m node -T iqn.2006-01.com.nas10:sybase_data -l

You should see:
Logging in to [iface: default, target: iqn.2006-01.com.nas10:sybase_data, portal: 10.1.0.10,3260]
Login to [iface: default, target: iqn.2006-01.com.nas10:sybase_data, portal: 10.1.0.10,3260] successful.

Configure Automatic Login

[root@oralin11 ~]#

iscsiadm -m node -T iqn.2006-01.com.nas10:sybase_data --op update -n node.startup -v automatic

Create partition

[root@oralin11 ~]# 

parted /dev/sdb mklabel msdos
parted /dev/sdb unit mb mkpart extended    1 5335 # all
parted /dev/sdb unit mb mkpart logical     2  841 # 800M
parted /dev/sdb unit mb mkpart logical   842 1052 # 200M
parted /dev/sdb unit mb mkpart logical  1053 1262 # 200M
parted /dev/sdb unit mb mkpart logical  1264 1473 # 200M
parted /dev/sdb unit mb mkpart logical  1474 1684 # 200M
parted /dev/sdb unit mb mkpart logical  1685 2209 # 500M
parted /dev/sdb unit mb mkpart logical  2210 2735 # 500M
parted /dev/sdb unit mb mkpart logical  2736 5335 # rest

Create Persistent Local SCSI Device Names 

[root@oralin11 ~]#

cat >/etc/udev/rules.d/99-sybase.rules <<-EOF
KERNEL=="sdb5", NAME="sybase/quorum", OWNER="sybase", MODE="0660"
KERNEL=="sdb6", NAME="sybase/master", OWNER="sybase", MODE="0660"
KERNEL=="sdb7", NAME="sybase/sybsystemprocs", OWNER="sybase", MODE="0660"
KERNEL=="sdb8", NAME="sybase/system", OWNER="sybase", MODE="0660"
KERNEL=="sdb9", NAME="sybase/sysmgmt", OWNER="sybase", MODE="0660"
KERNEL=="sdb10", NAME="sybase/tempdb1", OWNER="sybase", MODE="0660"
KERNEL=="sdb11", NAME="sybase/tempdb2", OWNER="sybase", MODE="0660"
KERNEL=="sdb12", NAME="sybase/data", OWNER="sybase", MODE="0660"
EOF

/sbin/start_udev

Result:
Starting udev:                                             [  OK  ]


[root@oralin11 ~]#

ls -l /dev/sybase

Result:
total 0
brw-rw----. 1 sybase disk 8, 28 Jul 16 00:49 data
brw-rw----. 1 sybase disk 8, 22 Jul 16 00:49 master
brw-rw----. 1 sybase disk 8, 21 Jul 16 00:49 quorum
brw-rw----. 1 sybase disk 8, 23 Jul 16 00:49 sybsystemprocs
brw-rw----. 1 sybase disk 8, 25 Jul 16 00:49 sysmgmt
brw-rw----. 1 sybase disk 8, 24 Jul 16 00:49 system
brw-rw----. 1 sybase disk 8, 26 Jul 16 00:49 tempdb1
brw-rw----. 1 sybase disk 8, 27 Jul 16 00:49 tempdb2


Done !

Prepare Network Interface for the clone

[root@oralin11 ~] 

rm -f /etc/udev/rules.d/70-persistent-net.rules

now shutdown before cloning VM:

[root@oralin11 ~]# 

init 0