Thursday, July 18, 2013

Post 50 of series - Install Oracle RAC 12c on Vmware with Windows 7 64-bit as host OS and Linux CentOS or RHEL 6 as guest OS (Part 3, Setup SAN for RAC 12c install (san1))



Scrubbing with water, the body can be cleaned, O Siblings of Destiny, but the body becomes dirty again. Bathing in the supreme essence of spiritual wisdom, O Siblings of Destiny, the mind and body become pure.


                              Index of all the posts of Gurpartap Singh's Blog


Creation of “san1”  machine:
Now let’s create the shared storage on “san1” machine.

For that lets first install package :

Execute the following command as root:
yum install scsi-target-utils -y

Output is as follows:

[root@san1 ~]# yum install scsi-target-utils -y
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: centos.mirror.freedomvoice.com
 * extras: mirrordenver.fdcservers.net
 * updates: mirror.thelinuxfix.com
base                                                                                                                                                           | 3.7 kB     00:00
extras                                                                                                                                                         | 3.4 kB     00:00
ol6_UEK_latest                                                                                                                                                 | 1.2 kB     00:00
ol6_latest                                                                                                                                                     | 1.4 kB     00:00
updates                                                                                                                                                        | 3.4 kB     00:00
updates/primary_db                                                                                                                                             | 3.8 MB     00:03
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package scsi-target-utils.x86_64 0:1.0.24-2.el6 will be updated
---> Package scsi-target-utils.x86_64 0:1.0.24-3.el6_4 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================================================
 Package                                          Arch                                  Version                                       Repository                                 Size
======================================================================================================================================================================================
Updating:
 scsi-target-utils                                x86_64                                1.0.24-3.el6_4                                ol6_latest                                172 k

Transaction Summary
======================================================================================================================================================================================
Upgrade       1 Package(s)

Total download size: 172 k
Downloading Packages:
scsi-target-utils-1.0.24-3.el6_4.x86_64.rpm                                                                                                                    | 172 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : scsi-target-utils-1.0.24-3.el6_4.x86_64                                                                                                                            1/2
  Cleanup    : scsi-target-utils-1.0.24-2.el6.x86_64                                                                                                                              2/2
  Verifying  : scsi-target-utils-1.0.24-3.el6_4.x86_64                                                                                                                            1/2
  Verifying  : scsi-target-utils-1.0.24-2.el6.x86_64                                                                                                                              2/2

Updated:
  scsi-target-utils.x86_64 0:1.0.24-3.el6_4

Complete!
[root@san1 ~]#

==================

As root execute the following commands:

Create a directory for the disks
mkdir /disks

and then create a set of 24 disk files each 2Gb in size

for i in 1 to 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
do
dd if=/dev/zero of=/disks/disk$i.dat bs=1M count=2048
done


Here is the output of above commands:

[root@san1 ~]# mkdir /disks
[root@san1 ~]# for i in 1 to 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
> do
> dd if=/dev/zero of=/disks/disk$i.dat bs=1M count=2048
> done

2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 9.67433 s, 222 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.48382 s, 616 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.73513 s, 575 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.42602 s, 627 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.5391 s, 607 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.59968 s, 597 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.59282 s, 598 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.48779 s, 616 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.58452 s, 599 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.5852 s, 599 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.60032 s, 596 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.57827 s, 600 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.80625 s, 564 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.63132 s, 591 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.64369 s, 589 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.59806 s, 597 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.59464 s, 597 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.60537 s, 596 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.608 s, 595 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.53903 s, 607 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.55812 s, 604 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.70108 s, 580 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.65352 s, 588 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.57605 s, 601 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.60367 s, 596 MB/s
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.64776 s, 589 MB/s
[root@san1 ~]#
[root@san1 ~]#

Set the iscsi target demon to start automatically
chkconfig --level 345 tgtd on

Output is as:
[root@san1 ~]# chkconfig --level 345 tgtd on
[root@san1 ~]#



Edit the following file:
/etc/rc.d/rc.local

Add following to the end of this file:

#Stop firewall
service iptables stop

# Create a target
tgtadm --lld iscsi --op new --mode target --tid 1 -T iqm.mgmt.volumes-san

# Create LUNs within the target
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
do
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun $i -b /disks/disk$i.dat
done

# Expose target to all
tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL



After update the file looks like following:

[root@san1 ~]# cat /etc/rc.d/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

#Stop firewall
service iptables stop

# Create a target
tgtadm --lld iscsi --op new --mode target --tid 1 -T iqm.mgmt.volumes-san

# Create LUNs within the target
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
do
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun $i -b /disks/disk$i.dat
done

# Expose target to all
tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL

[root@san1 ~]#

Bounce the VM again with "reboot"



Verify target is ready and the LUNs are present:
tgtadm --lld iscsi --op show --mode target

You should see something like the following:

[root@san1 ~]# tgtadm --lld iscsi --op show --mode target
Target 1: iqm.mgmt.volumes-san
    System information:
        Driver: iscsi
        State: ready
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: IET     00010000
            SCSI SN: beaf10
            Size: 0 MB, Block size: 1
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: null
            Backing store path: None
            Backing store flags:
        LUN: 1
            Type: disk
            SCSI ID: IET     00010001
            SCSI SN: beaf11
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk1.dat
            Backing store flags:
        LUN: 2
            Type: disk
            SCSI ID: IET     00010002
            SCSI SN: beaf12
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk2.dat
            Backing store flags:
        LUN: 3
            Type: disk
            SCSI ID: IET     00010003
            SCSI SN: beaf13
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk3.dat
            Backing store flags:
        LUN: 4
            Type: disk
            SCSI ID: IET     00010004
            SCSI SN: beaf14
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk4.dat
            Backing store flags:
        LUN: 5
            Type: disk
            SCSI ID: IET     00010005
            SCSI SN: beaf15
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk5.dat
            Backing store flags:
        LUN: 6
            Type: disk
            SCSI ID: IET     00010006
            SCSI SN: beaf16
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk6.dat
            Backing store flags:
        LUN: 7
            Type: disk
            SCSI ID: IET     00010007
            SCSI SN: beaf17
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk7.dat
            Backing store flags:
        LUN: 8
            Type: disk
            SCSI ID: IET     00010008
            SCSI SN: beaf18
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk8.dat
            Backing store flags:
        LUN: 9
            Type: disk
            SCSI ID: IET     00010009
            SCSI SN: beaf19
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk9.dat
            Backing store flags:
        LUN: 10
            Type: disk
            SCSI ID: IET     0001000a
            SCSI SN: beaf110
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk10.dat
            Backing store flags:
        LUN: 11
            Type: disk
            SCSI ID: IET     0001000b
            SCSI SN: beaf111
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk11.dat
            Backing store flags:
        LUN: 12
            Type: disk
            SCSI ID: IET     0001000c
            SCSI SN: beaf112
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk12.dat
            Backing store flags:
        LUN: 13
            Type: disk
            SCSI ID: IET     0001000d
            SCSI SN: beaf113
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk13.dat
            Backing store flags:
        LUN: 14
            Type: disk
            SCSI ID: IET     0001000e
            SCSI SN: beaf114
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk14.dat
            Backing store flags:
        LUN: 15
            Type: disk
            SCSI ID: IET     0001000f
            SCSI SN: beaf115
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk15.dat
            Backing store flags:
        LUN: 16
            Type: disk
            SCSI ID: IET     00010010
            SCSI SN: beaf116
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk16.dat
            Backing store flags:
        LUN: 17
            Type: disk
            SCSI ID: IET     00010011
            SCSI SN: beaf117
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk17.dat
            Backing store flags:
        LUN: 18
            Type: disk
            SCSI ID: IET     00010012
            SCSI SN: beaf118
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk18.dat
            Backing store flags:
        LUN: 19
            Type: disk
            SCSI ID: IET     00010013
            SCSI SN: beaf119
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk19.dat
            Backing store flags:
        LUN: 20
            Type: disk
            SCSI ID: IET     00010014
            SCSI SN: beaf120
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk20.dat
            Backing store flags:
        LUN: 21
            Type: disk
            SCSI ID: IET     00010015
            SCSI SN: beaf121
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk21.dat
            Backing store flags:
        LUN: 22
            Type: disk
            SCSI ID: IET     00010016
            SCSI SN: beaf122
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk22.dat
            Backing store flags:
        LUN: 23
            Type: disk
            SCSI ID: IET     00010017
            SCSI SN: beaf123
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk23.dat
            Backing store flags:
        LUN: 24
            Type: disk
            SCSI ID: IET     00010018
            SCSI SN: beaf124
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /disks/disk24.dat
            Backing store flags:
    Account information:
    ACL information:
        ALL
[root@san1 ~]#

Now shutdown the machine using command “shutdown –h now”

On console of this machine do the following:


Click “Edit virtual machine settings”  and on the following screen enter 256MB in front of “Memory for this virtual machine” and click ok.




and take its backup. Copy folder “san1” inder directory “C:\VM\rac_12c” in the same directory and I will name the backup folder as “san1_ready”, it is required only if you mess-up something during install and want to restore san1 machine.



Everyone calls God his own, O Siblings of Destiny, but the
all-knowing Lord is known only through the Guru. Those who are pierced by His Love are saved, O Siblings of Destiny; they bear the Insignia of the True Word of the Shabad. |


No comments:

Post a Comment