Tuesday, February 28, 2017

How to Install Oracle 11g on Linux with ASM


Step -1

Ensure /dev/shm is large enough. It should be set to the size of the physical RAM minus 4GB. (Or an appropriate amount reserved for the OS)
·         cd /dev/shm
·         df -h .

Step-2

Ensure oracle account and dba group exists.
Step-3
Install oel6 rpm
Step-4
Add hard disk in linux machine
root@pansoft100 Desktop]# fdisk /dev/sdb

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): p

Disk /dev/sdb: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe8269ef6

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        3265    26226081   83  Linux
/dev/sdb2            3266        6530    26226112+  83  Linux
/dev/sdb3            6531        9795    26226112+  83  Linux
/dev/sdb4            9796       13054    26177917+  83  Linux

Command (m for help): d
Partition number (1-4): 1

Command (m for help): d
Partition number (1-4): 2

Command (m for help): d
Partition number (1-4): 3

Command (m for help): d
Selected partition 4

Command (m for help): 4
4: unknown command
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): p

Disk /dev/sdb: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe8269ef6

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-13054, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-13054, default 13054): +25G

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (3266-13054, default 3266):
Using default value 3266
Last cylinder, +cylinders or +size{K,M,G} (3266-13054, default 13054): +25G

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (6531-13054, default 6531):
Using default value 6531
Last cylinder, +cylinders or +size{K,M,G} (6531-13054, default 13054): +25G

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Selected partition 4
First cylinder (9796-13054, default 9796):
Using default value 9796
Last cylinder, +cylinders or +size{K,M,G} (9796-13054, default 13054): +25G
Value out of range.
Last cylinder, +cylinders or +size{K,M,G} (9796-13054, default 13054):
Using default value 13054

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.




[root@pansoft100 Desktop]# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm
[root@pansoft100 Desktop]# oracleasm configure -i
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.
Disable firewall & selinux
Default user to own the driver interface []: grid
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
[root@pansoft100 Desktop]#
[root@pansoft100 Desktop]# oracleasm createdisk DATA1 /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@pansoft100 Desktop]# oracleasm createdisk DATA2 /dev/sdb2
Writing disk header: done
Instantiating disk: done
[root@pansoft100 Desktop]# oracleasm createdisk FRA /dev/sdb3
Writing disk header: done
Instantiating disk: done
[root@pansoft100 Desktop]# oracleasm createdisk DISK4 /dev/sdb4
Writing disk header: done
Instantiating disk: done
Set udev rules for ole6
[root@pansoft100 rules.d]# cat /etc/udev/rules.d/50-udev.rules
KERNEL=="sdb1", OWNER="grid", GROUP="dba", MODE="0644"
KERNEL=="sdb2", OWNER="grid", GROUP="dba", MODE="0644"
KERNEL=="sdb3", OWNER="grid", GROUP="dba", MODE="0644"
KERNEL=="sdb4", OWNER="grid", GROUP="dba", MODE="0644"
[root@pansoft100 rules.d]# vi 50-udev.rules
[root@pansoft100 rules.d]# /sbin/start_udev
Starting udev:                                             [  OK  ]
[root@pansoft100 rules.d]# ll /dev/sd*
brw-rw---- 1 root disk 8,  0 Feb 28 04:41 /dev/sda
brw-rw---- 1 root disk 8,  1 Feb 28 04:41 /dev/sda1
brw-rw---- 1 root disk 8,  2 Feb 28 04:41 /dev/sda2
brw-rw---- 1 root disk 8,  3 Feb 28 04:41 /dev/sda3
brw-rw---- 1 root disk 8,  4 Feb 28 04:41 /dev/sda4
brw-rw---- 1 root disk 8,  5 Feb 28 04:41 /dev/sda5
brw-rw---- 1 root disk 8,  6 Feb 28 04:41 /dev/sda6
brw-rw---- 1 root disk 8,  7 Feb 28 04:41 /dev/sda7
brw-rw---- 1 root disk 8, 16 Feb 28 04:41 /dev/sdb
brw-r--r-- 1 grid dba  8, 17 Feb 28 04:41 /dev/sdb1
brw-r--r-- 1 grid dba  8, 18 Feb 28 04:41 /dev/sdb2
brw-r--r-- 1 grid dba  8, 19 Feb 28 04:41 /dev/sdb3
brw-r--r-- 1 grid dba  8, 20 Feb 28 04:41 /dev/sdb4


GRID SOFTWARE INSTALLATION
1-    Make directories for grid soft.

















[grid@pansoft100 bin]$ ./srvctl status asm
ASM is running on pansoft100
[grid@pansoft100 bin]$ ./srvctl stop asm
PRCR-1065 : Failed to stop resource ora.asm
CRS-2529: Unable to act on 'ora.asm' because that would require stopping or relocating 'ora.DATA.dg', but the force option was not specified
[grid@pansoft100 bin]$ ./srvctl start asm
PRCC-1014 : asm was already running
PRCR-1004 : Resource ora.asm is already running
PRCR-1079 : Failed to start resource ora.asm
CRS-5702: Resource 'ora.asm' is already running on 'pansoft100'
[grid@pansoft100 bin]$
[grid@pansoft100 bin]$ ./srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): pansoft100
[grid@pansoft100 bin]$ ./crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    pansoft100
ora....ER.lsnr ora....er.type ONLINE    ONLINE    pansoft100
ora.asm        ora.asm.type   ONLINE    ONLINE    pansoft100
ora.cssd       ora.cssd.type  ONLINE    ONLINE    pansoft100
ora.diskmon    ora....on.type OFFLINE   OFFLINE
ora.evmd       ora.evm.type   ONLINE    ONLINE    pansoft100
ora.ons        ora.ons.type   OFFLINE   OFFLINE
[grid@pansoft100 bin]$ ps -ef|grep css
grid      26020      1  0 05:30 ?        00:00:01 /u01/grid_home/app/grid/bin/cssdagent
grid      26034      1  0 05:30 ?        00:00:00 /u01/grid_home/app/grid/bin/ocssd.bin
grid      27133  26664  0 06:10 pts/1    00:00:00 grep css
[grid@pansoft100 bin]$


No comments:

Post a Comment

Featured post

Migrate OCR & vote from external to normal or High redundancy in ASM

How to Move OCR & Vote from external to Normal or high. 1)  Create New diskgroup(CRS) with suitable redundancy for OCR and Voting files....

Popular Posts