Oracle 11gRACÊý¾Ý¿â°²×°(HPUX11.31+ASM without MC-SG) - ͼÎÄ ÏÂÔر¾ÎÄ

HPUX11.31+RAC11GÊý¾Ý¿â°²×°

2011Äê6ÔÂ

Author: ma.yu@163.com

Ŀ¼

1£® Óû§ÐèÇó£º........................................................................................................................... 3 2£®°²×°¹ý³Ì£º ................................................................................................................................ 4

2£®1 ϵͳ»·¾³×¼±¸£¬¼ì²éÁ½Ì¨»úÆ÷µÄ×´¿ö£º ..................................................................... 4 2£®2 ÍøÂç»·¾³×¼±¸£º ............................................................................................................. 7 2£®3 ²¹¶¡£º............................................................................................................................. 7 2£®4 Äں˲ÎÊýÐ޸ģº ............................................................................................................. 7 2£®5 ´´½¨ORACLEÓû§£º.................................................................................................. 8 2£®6 ´ÅÅÌ·ÖÅ䣺................................................................................................................... 10 2£®7 ORACLE °²×°Ç°×¼±¸£º............................................................................................. 13 2£®8 ORACLE Clusterware°²×°£º .................................................................................... 15 2£®9 ORACLE RAC databaseÈí¼þ°²×°£º ..................................................................... 30 2£®10 Éý¼¶11.1.0.6µ½11.1.0.7£º ...................................................................................... 38 2£®11 Listener´´½¨£º ........................................................................................................... 53 2£®12 dbca´´½¨Êý¾Ý¿â£º .................................................................................................... 54

1£® Óû§ÐèÇó£º

Óû§ÐèÒª°²×°Ò»Ì×Êý¾Ý¿âRAC: Êý¾Ý¿âÈí¼þ£ºOracle11g

Êý¾Ý¿âÈí¼þ°æ±¾£º11.1.0.6 £¬Éý¼¶µ½11.1.0.7¡£ ģʽ£ºrac

Êý¾Ý¿âsid£ºMIS

Êý¾Ý¿âip ¹æ»®ÈçÏ£º

ÐͺŠHp rx6600 Hp rx6600 Ö÷»úÃû HOSTA HOSTB ʵ Vip ʵ Vip IP 10.111.11.19 10.111.11.21 10.111.11.20 10.111.11.22 ·þÎñÆ÷ MISÊý¾Ý¿â·þÎñÆ÷£± MISÊý¾Ý¿â·þÎñÆ÷2

Ä¿Ç°Õâ±ßÓ²¼þ»·¾³ÊÇÁ½Ì¨rx6600 £¬²Ù×÷ϵͳ°æ±¾£ºHP-UX B.11.31

´æÖüÉ豸 hp storage works P2000£¬×Ü´æ´¢¿Õ¼ä2.8T £¬ÕâÌ×´æ´¢É豸¹©MISϵͳʹÓõĴÅÅÌ·ÖΪËĸö£¬·Ö±ðΪ1G£¬800G*3¡£

2£®°²×°¹ý³Ì£º

ÓÉÓÚÓû§Ã»ÓйºÂòSGeRAC£¬ËùÒÔÔÚÕâ´ÎµÄ°²×°¹ý³ÌÖУ¬Ê¹ÓÃClusterware+RACdatabase+ASMµÄ·½Ê½£¬²»Ê¹ÓÃSGeRAC¡£

ÕâÑùµÄ»°£¬ËùÓеķÇASMÊý¾Ý¶¼Òª±£´æÔÚ¹²Ïí´ÅÅÌ·ÖÇøÂãÉ豸ÉÏ£¬¶ø²»Êǹ²ÏíµÄlvÉÏ¡£

2£®1 ϵͳ»·¾³×¼±¸£¬¼ì²éÁ½Ì¨»úÆ÷µÄ×´¿ö£º

A.¼ì²éÄÚ´æ´óС£¬ÖÁÉÙ>1GB.

# /usr/contrib/bin/machinfo | grep -i Memory # /usr/sbin/dmesg | grep \

16GB.

B£®½»»»¿Õ¼äµÄ¼ì²é£º

-If RAM between 1GB and 2GB, then swap space required is 1.5 times the size of RAM -If RAM > 2GB, then swap space required is equal to the size of RAM

# /usr/sbin/swapinfo ¨Ca 16GB¡£

C£®/tmp ¿Õ¼ä£º #bdf /tmp ×îÉÙ400MB¡£ Ä¿Ç°2GB.

D. °²×°ORACLEÈí¼þµÄĿ¼£¬×îÉÙ4GB. #bdf /oracle Ä¿Ç°20GB¡£

E£®²Ù×÷ϵͳ°æ±¾ºÍ»úÆ÷λÊý£º #uname ¨Ca

(¾¡¹Üoracle10GÖ»Ö§³Öµ½HP UX11.23,µ«ÊÇÔÚ11.31ÉÏÈÔÈ»Äܹ»°²×°¡£) HP-UX hosta B.11.31 U ia64 3599024424 unlimited-user license

# /bin/getconf KERNEL_BITS 64

F£®¼ì²éAsync I/OÅäÖᣠÔÚ11.23/11.31ÉÏÒÑȱʡÅäºÃ¡£ # ll /dev/async

crw-rw-rw- 1 bin bin 101 0x000000 Mar 28 17:41 /dev/async

If you want to use Oracle on RAW devices and Async I/O is not configured, then Create the /dev/async character device

# /sbin/mknod /dev/async c 101 0x0 # chown oracle:dba /dev/async # chmod 660 /dev/async

Configure the async driver in the kernel using SAM => Kernel Configuration => Kernel

=> the driver is called 'asyncdsk' Generate new kernel Reboot

Set HP-UX kernel parameter max_async_ports using SAM. max_async_ports limits the maximum number of processes that can concurrently use /dev/async. Set this parameter to the sum of 'processes' from init.ora + number of background processes. If max_async_ports is reached, subsequent processes will use synchronous i/o.

Set HP-UX kernel parameter aio_max_ops using SAM. aio_max_ops limits the maximum number of asynchronous i/o operations that can be queued at any time. Set thisparameter to the default value (2048), and monitor over time using glance¡£

G£®¼ì²éC±àÒëÆ÷

For PL/SQL native compilation, Pro*C/C++, Oracle Call Interface, Oracle C++ Call Interface, Oracle XML Developer¡¯s Kit (XDK):

HP-UX 11i v2 (11.23):

HP C/ANSI C Compiler (A.06.00): C-ANSI-C HP aC++ Compiler (C.06.00): ACXX

# cc ¨CV

(Bundled) cc: HP C/aC++ B3910B A.06.12 [Oct 11 2006] ´ËÍ⣬ÐèÒªÓÐaCC±àÒëÆ÷£¬·ñÔòÓÐbug. [ID 794903.1] Ò²¾ÍÊÇ˵ÃüÁî $aCC

Ó¦¸Ã¿ÉÒÔÖ´ÐС£

H£®ÎªÁ˳ɹ¦±àÒëÁ´½ÓOralce£¬½¨Á¢ÒÔÏÂÁ¬½Ó£º # cd /usr/lib

# ln -s /usr/lib/libX11.3 libX11.sl # ln -s /usr/lib/libXIE.2 libXIE.sl # ln -s /usr/lib/libXext.3 libXext.sl # ln -s /usr/lib/libXhp11.3 libXhp11.sl # ln -s /usr/lib/libXi.3 libXi.sl # ln -s /usr/lib/libXm.4 libXm.sl # ln -s /usr/lib/libXp.2 libXp.sl # ln -s /usr/lib/libXt.3 libXt.sl # ln -s /usr/lib/libXtst.2 libXtst.sl

I£®È·±£Á½¸ö½ÚµãµÄʱ¼ä·Ç³£½Ó½ü£¬×îºÃʹÓÃNTPЭÒé½øÐÐʱ¼äͬ²½¡£

J. ²¹¶¡£º

HP-UX Operating System Itanium:

? HP-UX 11i Version 3 (11.31) with March 2007 Patch bundle for HP-UX (11iV2-B.11.23.0703) £¨´ËΪoracle°²×°ÎĵµÐèÇó£¬Èç¹ûÓÐ×îеģ¬¾¡Á¿´ò×îеIJ¹¶¡¡££© Ä¿Ç°£º

2011Mar1131 2011.03 HPUX 11.31 Megpatch for Mar 2011

ÆäËû²¹¶¡£º HP-UX 11.31:

General Patches:

? PHKL_37296 vfs module patch £¨Òѱ»40167 Ìæ´ú£©

? PHKL_37452 vm cumulative patch [replaces PHKL_35900, PHKL_35936] £¨Òѱ»41362 Ìæ´ú£©

? PHKL_37453 esdisk cumulative patch [replaces PHKL_36249] £¨Òѱ»41006 Ìæ´ú£©

? PHKL_37454 esctl cumulative patch [replaces PHKL_36248] £¨Òѱ»40922 Ìæ´ú£© ? PHCO_37476 libc cumulative patch £¨Òѱ»38658 Ìæ´ú£© ? PHCO_37807 Cumulative Patch for bcheckrc £¨ÓУ©

? PHSS_37948 linker + fdp cumulative patch£¨Òѱ»41492 Ìæ´ú£© ? PHSS_37954 Integrity Unwind Library £¨Òѱ»40542 Ìæ´ú£©

? PHNE_35894 Networking commands cumulative patch £¨Òѱ»39717 Ìæ´ú£©

C and C++ patches for Pro*C/C++,Oracle Call Interface,Oracle C++ Call Interface, Oracle XML Developer¡¯s Kit (XDK):

? PHSS_35976 HP C/aC++ Compiler (A.06.14) Itanium ûÓС£

³¢ÊÔ¹ý£¬Õâ¸ö²¹¶¡´ò²»ÉÏ¡£¿ÉÄÜÊÇaC++ûÓа²×°µÄÔµ¹Ê¡£

ʵ¼ÊÉÏÐèÒªÓÐaCC±àÒëÆ÷£¬·ñÔòÓÐbug. [ID 794903.1] Ò²¾ÍÊÇ˵ $aCC

Ó¦¸Ã¿ÉÒÔÖ´ÐÐ

µ«Ä¿Ç°Ã»ÓУ¬µ¼ÖÂbug. BugµÄ´¦Àí·½·¨¼ûºó¡£

Serviceguard 11.18 Patches (optional, only if you want to use Serviceguard): ? PHSS_37602 Serviceguard A.11.18.00

ûÓÐʹÓÃServiceGuard.

ʹÓÃ

#swlist -l patch -a supersedes|grep PHKL_XXXXX¼ì²éÊÇ·ñÒÑÓлòÊÇÒѱ»Ìæ´ú¡£

2£®2 ÍøÂç»·¾³×¼±¸£º

A£®Ä¿Ç°»úÆ÷µÄ·þÎñIP¶¨Îª:

hosta: 10.111.11.19 VIP:10.111.11.21 hostb: 10.111.11.20 VIP:10.111.11.22

ÅäÖÃ/etc/hosts: (Á½Ì¨»úÆ÷¶¼Åä)

127.0.0.1 hostb

127.0.0.1 localhost loopback

10.111.11.19 hosta 10.111.11.20 hostb

10.111.11.21 hosta_vip 10.111.11.22 hostb_vip

192.168.1.1 hosta_rac 192.168.1.2 hostb_rac

¾­¹ý¼ì²é£¬·¢ÏÖ¸Õ°²×°Íê±ÏµÄHOSTA£¬HOSTBÉÏÃæµÄlanÊÇÒ»Ò»¶ÔÓ¦µÄ£¬²»ÐèÒªµ÷Õû¡£ ÅäÖÃÍê±Ïºó£º

HOSTA£ºlan900: 10.111.11.19 lan0:192.168.1.1 HOSTB: lan900 10.111.11.20 lan0:192.168.1.2

2£®3 ²¹¶¡£º

Õë¶Ô11.31,ÒÑ´ò×îв¹¶¡¡£

2011Mar1131 2011.03 HPUX 11.31 Megpatch for Mar 2011

2£®4 Äں˲ÎÊýÐ޸ģº

Õë¶ÔHP UX11.31µÄÄںˣ¬ÐÞ¸ÄÁ½Ì¨»úÆ÷µÄ²ÎÊý£¨16GBÄڴ棩£º

Ê×ÏÈÁгöÏÖÓвÎÊý£º # kctune > /tmp/kctune.log

È»ºó£¬Ö´Ðнű¾£º

kctune 'nproc>=4096'

kctune 'ksi_alloc_max>=33600' #kctune ¡®executable_stack=0¡¯(ȱʡÊÇ0)

kctune 'max_thread_proc>=1024' kctune 'maxdsiz>=1073741824'

kctune 'maxdsiz_64bit>=2147483648' kctune 'maxssiz>=134217728'

kctune 'maxssiz_64bit>=1073741824' kctune 'maxuprc>=3780' #kctune 'msgmap>=4202' kctune 'msgmni>=4200' #kctune 'msgseg>=32767' kctune 'msgtql>=4200' kctune 'ncsize>=36672' #kctune 'nfile>=202048' kctune 'nflocks>=4200' kctune 'ninode>=35648' kctune 'nkthread>=7366' #kctune 'semmap>=8402' kctune 'semmni>=4200' kctune 'semmns>=8400' kctune 'semmnu>=4196' kctune 'semvmx>=32767'

kctune 'shmmax>=16000000000' kctune 'shmmni>=4096' kctune 'shmseg>=512' kctune 'swchunk>=40960' kctune 'vps_ceiling>=12000'

Ç°ÃæÓÐ#µÄ±íʾHPUX11.31ÖÐûÓÐ

ÕâÀïÓм¸¸ö²ÎÊý±È½Ï´ó£¬ÊÇÒòΪÄÚ´æ±È½Ï´ó¡£

Ö´ÐÐÍê±Ïºó£¬Ê¹ÓÃÃüÁ#kctune ¨CDÁгöÐèÒªÖØÐÂÆô¶¯²ÅÄÜÉúЧµÄ²ÎÊý¡£ È»ºóreboot¡£

2£®5 ´´½¨ORACLEÓû§£º

ÔÚÁ½Ì¨»úÆ÷ÉÏ´´½¨×é/Óû§£º # /usr/sbin/groupadd -g 201 dba # /usr/sbin/groupadd -g 200 oinstall

# /usr/sbin/useradd -u 200 -g oinstall -G dba oracle

# id oracle

uid=200(oracle) gid=200(oinstall) groups=201(dba)

Create HOME directory for Oracle user # mkdir /home/oracle

# chown oracle:oinstall /home/oracle

ÐÞ¸ÄÃÜÂ룺

#passwd oracle (oracleÓû§ÃÜÂ룺oracle) ÅäÖÃssh:

SSH Set-up£¨Á½Ì¨»úÆ÷¶¼ÉèÖã©

Hosta$ mkdir ~/.ssh Hosta $ chmod 700 ~/.ssh

Hosta $ /usr/bin/ssh-keygen -t rsa Here, we leave the passphrase empty.

Your identification has been saved in /home/oracle/.ssh/id_rsa. Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.

È»ºó°ÑÁ½Ì¨»úÆ÷µÄid_rsa.pubµÄÄÚÈݺϲ¢£¬²¢´æ·Åµ½Á½¸ö½ÚµãÉÏ£º

/home/oracle/.ssh/authorized_keys on both nodes.

Hosta$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

Hosta$ ssh oracle@hostb cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys Hosta$ chmod 644 ~/.ssh/authorized_keys

Hosta$ scp ~/.ssh/authorized_keys Hostb:~/.ssh/authorized_keys

Ssh²âÊÔ£º

Hosta$ ssh hosta ls Hosta$ssh hostb ls Hostb$ ssh hosta ls Hostb$ssh hostb ls

·¢ÏÖ²»³É¹¦£¬¾­¼ì²é·¢ÏÖ¿ÉÄÜÊÇÎļþȨÏÞÎÊÌâ¡£ ÐÞ¸Ä/home/oracleµÄȨÏÞΪ0755¡£ È»ºóÐÞ¸Ä~/.ssh/µÄȨÏÞΪ0700 ÐÞ¸ÄÆäËûÎļþµÄȨÏÞÈçÏ£º $ ls -l ~/.ssh total 64

-rw-r--r-- 1 oracle oinstall 788 Jun 21 11:44 authorized_keys -rw------- 1 oracle oinstall 1675 Jun 21 11:40 id_rsa -rw-r--r-- 1 oracle oinstall 394 Jun 21 11:40 id_rsa.pub -rw-r--r-- 1 oracle oinstall 1326 Jun 21 11:39 known_hosts È»ºó²âÊԳɹ¦¡£

ÅäÖÃÁ½Ì¨»úÆ÷µÄ.rhostsÎļþ: # .rhosts file in $HOME of root HOSTA root HOSTA_vip root HOSTA_rac root HOSTB root HOSTB_vip root HOSTB_rac root

# .rhosts file in $HOME of oracle HOSTA oracle HOSTA_vip oracle HOSTA_rac oracle HOSTB oracle

HOSTB_vip oracle HOSTB_rac oracle

·Ö±ðʹÓÃroot/oracleÕÊ»§½øÐÐÔ¶³Ì²âÊÔ£º #remsh HOSTA ll $remsh HOSTB ll µÈ¡£

2£®6 ´ÅÅÌ·ÖÅ䣺

ÓÉÓÚÎÞ·¨Ê¹ÓÃSGeRAC£¬ËùÒÔ²ÉÓÃASM·½Ê½¡£

¹æ»®£º OCRÕ¼ÓÃÁ½¸ö´ÅÅÌ£¬»¥Îª±¸·Ý£¬´óС1G×óÓÒ¡£ CRS Voting´ÅÅÌÕ¼ÓÃ3¸ö£¬»¥Îª±¸·Ý£¬´óС1G×óÓÒ¡£

ASM´ÅÅÌ6¸ö£ºÈ«²¿Îª405G×óÓÒ£¬5¸ö´æ·ÅDATA,1¸ö´æ·ÅFLASH_RECOVERY

ÓÉÓÚÁ½±ßµÄ´ÅÅÌÐèÒªÒ»Ö£¬ËùÒÔ£¬µ÷ÕûHOSTA,HOSTBÉϵĴÅÅÌ: HOSTA[/]#ioscan -m lun

Class I Lun H/W Path Driver S/W State H/W Type Health Description

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

disk 12 64000/0xfa00/0xd esdisk CLAIMED DEVICE online HP P2000 G3 FC

0/6/0/0/0/0/2/0/0/0.0x207000c0ff119abc.0x0 0/7/0/0/0/0.0x247000c0ff119abc.0x0

/dev/disk/disk12 /dev/rdisk/disk12

disk 13 64000/0xfa00/0xe esdisk CLAIMED DEVICE online HP P2000 G3 FC

0/6/0/0/0/0/2/0/0/0.0x207000c0ff119abc.0x1000000000000 0/7/0/0/0/0.0x247000c0ff119abc.0x1000000000000 /dev/disk/disk13 /dev/rdisk/disk13

disk 14 64000/0xfa00/0xf esdisk CLAIMED DEVICE online HP P2000 G3 FC

0/6/0/0/0/0/2/0/0/0.0x207000c0ff119abc.0x2000000000000 0/7/0/0/0/0.0x247000c0ff119abc.0x2000000000000 /dev/disk/disk14 /dev/rdisk/disk14

disk 15 64000/0xfa00/0x10 esdisk CLAIMED DEVICE online HP P2000 G3 FC

0/6/0/0/0/0/2/0/0/0.0x207000c0ff119abc.0x3000000000000 0/7/0/0/0/0.0x247000c0ff119abc.0x3000000000000 /dev/disk/disk15 /dev/rdisk/disk15

ʹÓÃÃüÁî¼ì²éÁ½±ßµÄ´ÅÅÌ´óС£¬È·±£Á½±ß¶ÔÓ¦µÄÒ»Ö£º diskinfo /dev/rdisk/disk12 diskinfo /dev/rdisk/disk13 diskinfo /dev/rdisk/disk14 £¬ diskinfo /dev/rdisk/disk15

¼ì²éWWIDºÅ£¬È·±£Á½Ì¨»úÆ÷µÄ´ÅÅÌÊÇÒ»Öµģ¬ÀýÈ磺 scsimgr lun_map -D /dev/rdisk/disk12

´ÅÅÌ˳ÐòΪ£º 0x0 <-> disk12 976560 Kbytes (1G)

0x 1000000000000<-> disk13 830078112 Kbytes (800G) 0x 2000000000000<-> disk14 830078112 Kbytes (800G) 0x 3000000000000<-> disk15 830078112 Kbytes (800G)

Èç¹û²»Ò»Ö£¬ÐèҪʹÓÃioinitµ÷Õû¡£

ÓÉÓÚûÓÐSGeRAC£¬ÎÞ·¨Ê¹ÓÃslvm,ËùÒÔÈ»ºó°´ÕÕÏÂ±í£¬¶Ô´ÅÅ̽øÐзÖÇø£º P1: P2: P3: Disk12: 400M(Voting) 400M(OCR)

Disk13: 400M(Voting) 400G(ASM) 400G(ASM) Disk14: 400M(Voting) 400G (ASM) 400G(ASM) Disk15: 400M(OCR) 400G(ASM) 400G(ASM)

·ÖÇø¹ý³ÌÈçÏ£º

´´½¨ /tmp/disk12par,/tmp/disk13par:

HOSTA[/tmp]#more disk12par 2

EFI 403MB HPUX 100%

HOSTA[/tmp]#more disk13par(disk14par,disk15parºÍdisk13parÏàͬ) 3

EFI 403MB

HPUX 405110MB HPUX 100%

È»ºóʹÓÃÃüÁ# idisk -f /tmp/disk12par -w /dev/rdisk/disk12 ¶Ô¼¸¸ö¸ö´ÅÅ̽øÐзÖÇø¡£·ÖÇøÍê³Éºó£¬Ê¹ÓÃÃüÁ #insf ¨Ce ¨CC disk´´½¨¸÷¸ö·ÖÇøµÄÉ豸Îļþ¡£ HOSTA[/tmp]#ioscan -m lun

Class I Lun H/W Path Driver S/W State H/W Type Health Description

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

disk 12 64000/0xfa00/0xd esdisk CLAIMED DEVICE online HP P2000 G3 FC

0/6/0/0/0/0/2/0/0/0.0x207000c0ff119abc.0x0

0/7/0/0/0/0.0x247000c0ff119abc.0x0

/dev/disk/disk12 /dev/rdisk/disk12 /dev/disk/disk12_p1 /dev/rdisk/disk12_p1 /dev/disk/disk12_p2 /dev/rdisk/disk12_p2

disk 13 64000/0xfa00/0xe esdisk CLAIMED DEVICE online HP P2000 G3 FC

0/6/0/0/0/0/2/0/0/0.0x207000c0ff119abc.0x1000000000000 0/7/0/0/0/0.0x247000c0ff119abc.0x1000000000000 /dev/disk/disk13 /dev/rdisk/disk13 /dev/disk/disk13_p1 /dev/rdisk/disk13_p1 /dev/disk/disk13_p2 /dev/rdisk/disk13_p2 /dev/disk/disk13_p3 /dev/rdisk/disk13_p3

disk 14 64000/0xfa00/0xf esdisk CLAIMED DEVICE P2000 G3 FC

0/6/0/0/0/0/2/0/0/0.0x207000c0ff119abc.0x2000000000000 0/7/0/0/0/0.0x247000c0ff119abc.0x2000000000000 /dev/disk/disk14 /dev/rdisk/disk14 /dev/disk/disk14_p1 /dev/rdisk/disk14_p1 /dev/disk/disk14_p2 /dev/rdisk/disk14_p2 /dev/disk/disk14_p3 /dev/rdisk/disk14_p3

disk 15 64000/0xfa00/0x10 esdisk CLAIMED DEVICE P2000 G3 FC

0/6/0/0/0/0/2/0/0/0.0x207000c0ff119abc.0x3000000000000 0/7/0/0/0/0.0x247000c0ff119abc.0x3000000000000 /dev/disk/disk15 /dev/rdisk/disk15 /dev/disk/disk15_p1 /dev/rdisk/disk15_p1 /dev/disk/disk15_p2 /dev/rdisk/disk15_p2 /dev/disk/disk15_p3 /dev/rdisk/disk15_p3

ʹÓÃÃüÁdiskinfo /dev/rdisk/diskX_pXºË¶Ô¸÷¸ö´ÅÅ̵ĴóС£¬È·±£Á½±ßÒ»Ö¡£# diskinfo /dev/rdisk/disk12_p1

SCSI describe of /dev/rdisk/disk12_p1: vendor: HP

product id: P2000 G3 FC type: direct access size: 412652 Kbytes bytes per sector: 512

# diskinfo /dev/rdisk/disk12_p2

SCSI describe of /dev/rdisk/disk12_p2: vendor: HP

product id: P2000 G3 FC type: direct access size: 563200 Kbytes

online HP online HP bytes per sector: 512

# diskinfo /dev/rdisk/disk13_p1

SCSI describe of /dev/rdisk/disk13_p1: vendor: HP

product id: P2000 G3 FC type: direct access size: 412640 Kbytes bytes per sector: 512

# diskinfo /dev/rdisk/disk13_p2

SCSI describe of /dev/rdisk/disk13_p2: vendor: HP

product id: P2000 G3 FC type: direct access

size: 414832640 Kbytes bytes per sector: 512

# diskinfo /dev/rdisk/disk13_p3

SCSI describe of /dev/rdisk/disk13_p3: vendor: HP

product id: P2000 G3 FC type: direct access

size: 414832640 Kbytes bytes per sector: 512 #

ºË¶ÔÍê³Éºó£¬ÔÚÁ½Ì¨»úÆ÷ÉÏÐ޸ĴÅÅ̵ÄÊôÐÔ£º

OCR disks:£¨ËùÓеĶ¼Ð޸ģ¬ÕâÀïÒÔdisk12_p2ΪÀý£© # chown root:dba /dev/rdisk/disk12_p2 # chmod 640 /dev/rdisk/disk12_p2

ASM & Voting disks: £¨ËùÓеĶ¼Ð޸ģ¬ÕâÀïÒÔdisk12_p1ΪÀý£© # chown oracle:dba /dev/rdisk/disk12_p1 # chmod 660 /dev/rdisk/disk12_p1

2£®7 ORACLE °²×°Ç°×¼±¸£º

´´½¨Îļþ£º /etc/privgroup,°üÀ¨£º dba MLOCK RTSCHED RTPRIO ÔÚÁ½Ì¨»úÆ÷ÉÏÖ´ÐУº

#setprivgrp ¨Cf /etc/privgroup

¿ÉÒÔʹÓÃ#getprivgrp dbaÀ´ÑéÖ¤ÉèÖÃÊÇ·ñÕýÈ·¡£

ÔÚÁ½Ì¨»úÆ÷É϶¼´´½¨Ä¿Â¼£º # mkdir /var/opt/oracle

# chown oracle:oinstall /var/opt/oracle # chmod 755 /var/opt/oracle

Oracle Clusterware:

# mkdir -p /oracle/product/CRS Oracle RAC:

# mkdir ¨Cp /oracle/product/RAC11g

# chown -R oracle:oinstall /oracle/product

±à¼­Á½Ì¨»úÆ÷ÉϵÄoracleÓû§µÄ.profileÎļþ£º

# Set up the search paths: PATH=$PATH:.

# Set up the shell environment: set -u

trap \

# Set up the shell variables:

export PS1=`whoami`@`hostname`\\['$ORACLE_SID'\\]':$PWD$ '

# Oracle Environment

export ORACLE_BASE=/oracle/product

export ORACLE_HOME=$ORACLE_BASE/RAC11g export ORA_CRS_HOME=$ORACLE_BASE/CRS export ORACLE_SID=MIS1(»ò2)

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:$ORACLE_HOME/rdbms/lib export PATH=$PATH:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin export

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib/ export CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib print ' '

print '$ORACLE_SID: '$ORACLE_SID

print '$ORACLE_HOME: '$ORACLE_HOME print '$ORA_CRS_HOME: '$ORA_CRS_HOME print ' ' # ALIAS

alias psg=\

alias oh=\alias crs=\

ÔÚÏÂÃæµÄ°²×°¹ý³ÌÖУ¬¿ÉÄÜ»áÔÚ°²×°Ç°¼ì²é¹ý³ÌÖб¨$PATHÀïÓжàÓàµÄORACLE_HOME, ¸üÕý·½·¨Îª£º

ÐÞ¸ÄPATH¶¨Òå,´ÓÖÐɾ³ý$ORA_CRS_HOME/bin»òÊÇ$ORACLE_HOME/binÖеÄÒ»¸ö£¬Ö»

±£ÁôÆäÖÐÒ»¸ö¡£ÔÙÖØеǼ£¬ÖØÐÂÆô¶¯runInstaller¡£

2£®8 ORACLE Clusterware°²×°£º

Ê×ÏÈ°²×°Clusterware.

ORACLEÊý¾Ý¿â±¾ÉíËùÓÐÕʺŵÄÃÜÂ붼ÉèÖÃΪ£ºoracle.

ÔÚHOSTAÉÏ£¬Ê¹ÓÃXmanagerÒÔoracleµÇ¼£¬²¢ÉèÖãº

ÔËÐÐxclock½øÐвâÊÔ¡£ Mount oracle°²×°¹âÅÌ£º

/usr/sbin/mount -F cdfs -o rr /dev/dsk/cxtydz /SD_CDROM

ʹÓÃruncluvfy.sh½øÐмì²é£º µ«Êǵ÷ÓÃʱÐèҪʹÓÃÈçϸñʽ£º

#/cdrom/runcluvfy.sh

/tmp/bootstrap/bin/cluvfy: not found.

¼ì²é²»Ò»¶¨ÄÜͨ¹ý¡£´óÖ¼ì²éÏ£¬¸ü¸ÄÏÂÖ÷ÒªµÄ´íÎó¡£

È»ºóÔËÐÐ/cdromϵÄrunInstaller. $/cdrom/runInstaller &

Ñ¡ÏÕâÀïÑ¡ÔñOracle Clusterware:

ÊäÈëInventoryµÄλÖúͿÉÒÔ¹ÜÀíInventoryµÄ×飺

³öÏÖ°²×°Ä¿Â¼ÊäÈëÒªÇóʱ£¬ÌîдOraCrs11g_home,Õâ¸öÒÔ¼°ÏàÓ¦µÄpath:/oracle/product/CRS£¬Ó¦¸ÃºÍRAC databaseÈí¼þµÄ°²×°Ä¿Â¼²»Ò»Ñù¡£

È»ºó»á½øÐа²×°Ç°¼ì²é£¬Õâ¸ö¼ì²éÒ»¶¨ÒªÍ¨¹ý£º

³öÏÖ°²×°CRS¼ì²éµÄʱºò±¨´í£¬´íÎóÔ­Òò³ö×ÔÓÚ/etc/nsswitch.conf:

±¨´íÐÅÏ¢ÈçÏ£º

Checking Network Configuration File Permissions ...

Check complete. The overall result of this check is: Failed <<<<

Problem: The network configuration file nswitch.conf is not world readable. It needs to have world read permissions in order for hostnames to resolve properly.

Recommendation: Set the permissions on the file nswitch.conf to 444. ========================================================

´íÎóÔ­Òò£º

HP OS 11.31ºÍÒÔÇ°µÄ°æ±¾11.23ÓбȽϴóµÄ¸Ä¶¯¡£ÒÔÇ°11.23ÔÚ/etc/Ŀ¼ÏÂÓÐÒ»¸ö½Ð¡°nsswitch.conf\Îļþ£¬µ«ÊÇÔÚ11.31°æ±¾Ã»ÓÐÕâ¸öÎļþ¡£

½â¾ö°ì·¨£º

# cp /etc/nsswitch.files /etc/nsswitch.conf # chown bin:bin nsswitch.conf

# chmod 444 nsswitch.conf //ÐÞ¸ÄÏàӦȨÏÞ£¬ÎÊÌâ½â¾ö¡£

Ñ¡ÔñCluster½Úµã, Ñ¡ÔñPublic Node/Private NodeµÄ½çÃæ(ÀàËÆÏÂͼ):

ÊäÈë/etc/hostsÖж¨ÒåµÄ HOSTA/HOSTB, HOSTA_rac/HOSTB_rac, HOSTA_vip/HOSTB_vip¡£

È»ºóÊäÈëÍøÂçÑ¡Ôñ£¬ÀàËÆÏÂͼ£¬ÕâÀォLan900/10.111.11.0ÉèΪPublic, lan0/192.168.1.0 ÉèΪPrivate.

Ñ¡ÔñOCRµÄλÖã¬ÀàËÆÏÂͼ£¬ÎÒÃÇÕâÀïÊäÈë/dev/rdisk/disk12_p2,/dev/rdisk/disk15_p1, Normal Redundancy.

½ÓÏÂÀ´ÊäÈëVoting DiskµÄλÖã¬ÀàËÆÏÂͼ£¬ÎÒÃÇÕâÀïÊäÈ룺 /dev/rdisk/disk12_p1,/dev/rdisk/disk13_p1,/dev/rdisk/disk14_p1

ÏÂÒ»²½£¬ºó½øÈëSummary Page, ½øÐа²×°¡£

°²×°½øÐÐÖУº

°²×°Íê±ÏÖ´Ðнű¾£º

°²×°Íê±Ïºó£¬»áÒªÇóÔÚHOSTBÉÏÖ´ÐУº/oracle/oraInventory/orainstRoot.sh hostb# ./orainstRoot.sh

Creating the Oracle inventory pointer file (/var/opt/oracle/oraInst.loc) Changing permissions of /oracle/oraInventory to 770. Changing groupname of /oracle/oraInventory to oinstall. The execution of the script is complete

ÒÔ¼°ÔÚHOSTA,HOSTBÉÏÖ´ÐУº/oracle/product/CRS/root.sh

°´ÕÕÒªÇó£¬Ê×ÏÈÔÚHOSTBÉÏÖ´ÐÐorainstRoot.sh£¨ÈçÉÏ£©,È»ºóÔÚHOSTAÉÏÖ´ÐÐroot.sh£¬´´½¨CRS£¬¸ñʽ»¯CRSµÄ´ÅÅÌ¡£Ö´ÐÐÍê±Ïºó£¬ÔÙÔÚHOSTBÉÏÖ´ÐÐroot.sh£¬»áʶ±ð³öCRS/VotingµÄ´ÅÅÌ£¬²¢Ìí¼Óvip£º hosta# ./root.sh

WARNING: directory '/oracle/product' is not owned by root WARNING: directory '/oracle' is not owned by root

Checking to see if Oracle CRS stack is already configured

Setting the permissions on OCR backup directory Setting up Network socket directories

Oracle Cluster Registry configuration upgraded successfully

The directory '/oracle/product' is not owned by root. Changing owner to root

The directory '/oracle' is not owned by root. Changing owner to root Successfully accumulated necessary OCR keys.

Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897. node : node 1: hosta hosta_rac hosta node 2: hostb hostb_rac hostb

Creating OCR keys for user 'root', privgrp 'sys'.. Operation successful.

Now formatting voting device: /dev/rdisk/disk12_p1 Now formatting voting device: /dev/rdisk/disk13_p1 Now formatting voting device: /dev/rdisk/disk14_p1 Format of 3 voting devices complete.

Startup will be queued to init within 30 seconds. Adding daemons to inittab

Expecting the CRS daemons to be up within 600 seconds. Cluster Synchronization Services is active on these nodes. hosta

Cluster Synchronization Services is inactive on these nodes. hostb

Local node checking complete. Run root.sh on remaining nodes to start CRS daemons. hosta#

hostb# ./root.sh

WARNING: directory '/oracle/product' is not owned by root WARNING: directory '/oracle' is not owned by root

Checking to see if Oracle CRS stack is already configured

Setting the permissions on OCR backup directory Setting up Network socket directories

Oracle Cluster Registry configuration upgraded successfully

The directory '/oracle/product' is not owned by root. Changing owner to root The directory '/oracle' is not owned by root. Changing owner to root clscfg: EXISTING configuration version 4 detected. clscfg: version 4 is 11 Release 1.

Successfully accumulated necessary OCR keys.

Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897. node : node 1: hosta hosta_rac hosta node 2: hostb hostb_rac hostb

clscfg: Arguments check out successfully.

NO KEYS WERE WRITTEN. Supply -force parameter to override.

-force is destructive and will destroy any previous cluster configuration.

Oracle Cluster Registry for cluster has already been initialized Startup will be queued to init within 30 seconds. Adding daemons to inittab

Expecting the CRS daemons to be up within 600 seconds. Cluster Synchronization Services is active on these nodes. hosta hostb

Cluster Synchronization Services is active on all the nodes. Waiting for the Oracle CRSD and EVMD to start

Oracle CRS stack installed and running under init(1M) Running vipca(silent) for configuring nodeapps

Creating VIP application resource on (2) nodes... Creating GSD application resource on (2) nodes... Creating ONS application resource on (2) nodes... Starting VIP application resource on (2) nodes... Starting GSD application resource on (2) nodes... Starting ONS application resource on (2) nodes...

Done.

Clusterware°²×°Íê³É£º

¼ì²éVIP: #

Hosta# netstat -niw

Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll

lan0 1500 192.168.1.0 192.168.1.1 6144 0 4659 0 0

lo0 32808 127.0.0.0 127.0.0.1 16415 0 16415 0 0

lan900 1500 10.111.11.0 10.111.11.19 422953 0 1496848 0 0

lan900:801 1500 10.111.11.0 10.111.11.21 0 0 0 0 0

°²×°Íê³Éºó£¬¿ÉÒÔʹÓÃ$olsnode/$crsctl check crs¼ì²é°²×°£¬²¢Ê¹ÓÃpsÓ¦¸Ã¿ÉÒÔ¿´µ½evmd,ocssd,crsd,oprocd.

/etc/inittabÖÐÓ¦¸Ã°üÀ¨ÒÔϲ¿·Ö£º

h1:3:respawn:/etc/init.d/init.evmd run >/dev/null 2>&1 /dev/null 2>&1 /dev/null 2>&1

Õâ¸öʱºò£¬crs_stat ¨CtÓ¦¸Ã¿ÉÒÔÁгöGSD/ONS/VIPµÈµÄ״̬¡£

Clusterware°²×°£¬Íê³É£¬ÖØÐÂÆô¶¯»úÆ÷£¬crsÓ¦¸ÃÄܹ»×Ô¶¯Æô¶¯¡£

2£®9 ORACLE RAC databaseÈí¼þ°²×°£º

ÉèÖÃеÄ$ORACLE_HOME,

$export ORACLE_HOME=/oracle/product/RAC11g $/cdrom/runInstaller&

Ñ¡ÔñOracle Database11g:

Ñ¡ÔñEnterprise Edition:

ÐÞ¸ÄName,PathµÄÄÚÈÝ£¬ºÍCRS²»ÄÜÖصþ£¬ÀàËÆÏÂͼ£¬ÕâÀïΪName£ºOraDb11g_home1 Path£º/oracle/product/RAC11g

Ñ¡ÔñCluster·½Ê½£¬°üº¬Á½¸ö½Úµã,hosta,hostb:

°²×°Ç°ÐèÇó¼ì²é£¬Ò»¶¨ÒªÍ¨¹ý£º

ÒòΪҪ°Ñoracle11g 11.1.0.6Éý¼¶µ½oracle11.1.0.7£¬ËùÒÔÕâÀïÑ¡ÔñÖ»°²×°Èí¼þ£¬ÕâÑù£¬Éý¼¶»áÏà¶Ô·½±ãµã£º

Ñ¡Ôñ¸÷¸ö¹ÜÀíÔ±ËùÔÚµÄ×飬ÈçÏÂͼËùʾ£¬Ò²¿ÉÒÔ¶¼¸ÄΪdba×飺

¿ªÊ¼°²×°Èí¼þ£º

½áÊø£º

Æô¶¯Netca,ÅäÖüàÌý£º

ÅäÖÃÍê±Ïºó£¬Ê¹ÓÃ$crs_stat ¨CtÓ¦¸Ã¿ÉÒÔÁгö¼àÌý¡£

2£®10 Éý¼¶11.1.0.6µ½11.1.0.7£º

Íê³Éºó£¬Ê¹ÓÃcrs_stat ¨Ct¼ì²é°²×°µÄ״̬¡£ ÖØÐÂÆô¶¯»úÆ÷£¬×¼±¸°²×°11.1.0.7µÄ²¹¶¡¡£

Ê×ÏȶÔClusterware½øÐв¹¶¡£º

´Óoracle ÍøÕ¾ÏÂÔØunzipÈí¼þ£¬½â¿ªÁ½¸öѹËõ°ü£º p6890831_111070_HPUX-IA64_1of2.zip p6890831_111070_HPUX-IA64_2of2.zip ½âѹºó£¬ËùÓÐÎļþ¶¼´æ·Åµ½Disk1Ï£º

°´ÕÕ²¹¶¡µÄ˵Ã÷£¬²ÉÓÃNon rolling upgrade,Í£Ö¹Ò»ÇÐoracle»î¶¯£º

ÒÔoracleÓû§£¬Í£Ö¹ËùÓеÄoracleʵÀý£¬asmµÈ£¬Èçsrvctl stop database ¨Cd MIS£¨Ä¿Ç°Ã»ÓÐÕâЩ£¬Ö»ÓÐcrsºÍnodeapps£¬Í£Ö¹nodeapps.£© $srvctl stop nodeapps ¨Cn hosta $srvctl stop nodeapps ¨Cn hostb

ÒÔrootÓû§Í£Ö¹crs£º #crsctl stop crs

Í£Ö¹ºó£¬ÔÚhostaÉÏÉèÖÃORACLE_HOME, ÔÚ´Ë£¬OUIÆäʵ²¢²»Àí»áÕâ¸ö¡£ ÔËÐÐpatchµÄrunInstaller.

¿ªÊ¼Éý¼¶clusterwareºÍdatabaseÈí¼þµ½11.1.0.7£¬»áͬʱ×Ô¶¯Éý¼¶OUIµ½11.1.0.7¡£ Ö´ÐÐ

$./Disk1/runInstaller & ¿ªÊ¼Éý¼¶£º

Ê×ÏÈÉý¼¶CRS£¬Ñ¡ÔñOraCrs11g_home£¬path»á×Ô¶¯¸ÄΪ/oracle/product/CRS£º

Ñ¡ÔñCluster °²×°·½Ê½£º

¶ÔCRSÉý¼¶Ç°£¬È«Ãæ¼ì²é£¬Ò»¶¨ÒªÍ¨¹ý£º

ͨ¹ýºó£¬ÁгöÒª°²×°µÄÈí¼þ£º

Ñ¡ÔñInstall,¿ªÊ¼°²×°¡£

°²×°Íê³Éºó£¬ÐèÒªÖ´Ðнű¾£º

°´ÕÕÒÔÏÂ˵Ã÷£¬Ö´Ðнű¾£º

To complete the installation of this patchset, you must perform the following tasks on each node: 1. Log in as the root user. 2. As the root user, perform the following tasks: a. Shutdown the CRS daemons by issuing the following command: /oracle/product/CRS/bin/crsctl stop crs b. Run the shell script located at: /oracle/product/CRS/install/root111.sh This script will automatically start the CRS daemons on the patched node upon completion.

3. After completing this procedure, proceed to the next node and repeat.

Ê×ÏÈÍ£Ö¹CRS:

Hosta£¬hostbÉ϶¼Í£Ö¹crs£º

#/oracle/product/CRS/bin/crsctl stop crs

Ö´ÐÐroot111.sh£º hosta# ./root111.sh

Creating pre-patch directory for saving pre-patch clusterware files /oracle/product/CRS/lib32/libskgxn2.so not found

Completed patching clusterware files to /oracle/product/CRS Relinking some shared libraries.

Relinking of patched files is complete.

Preparing to recopy patched init and RC scripts. Recopying init and RC scripts.

Startup will be queued to init within 30 seconds. Starting up the CRS daemons.

Waiting for the patched CRS daemons to start. This may take a while on some systems. . . . . . . .

11107 patch successfully applied.

clscfg: EXISTING configuration version 4 detected. clscfg: version 4 is 11 Release 1.

Successfully accumulated necessary OCR keys.

Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897. node : node 1: hosta hosta_rac hosta

Creating OCR keys for user 'root', privgrp 'sys'.. Operation successful.

clscfg -upgrade completed successfully

Creating '/oracle/product/CRS/install/paramfile.crs' with data used for CRS configuration Setting CRS configuration values in /oracle/product/CRS/install/paramfile.crs Setting cluster unique identifier Restarting Oracle clusterware Stopping Oracle clusterware Stopping resources.

This could take several minutes.

Successfully stopped Oracle Clusterware resources Stopping Cluster Synchronization Services.

Shutting down the Cluster Synchronization Services daemon. Shutdown request successfully issued.

Waiting for Cluster Synchronization Services daemon to stop Waiting for Cluster Synchronization Services daemon to stop Cluster Synchronization Services daemon has stopped Starting Oracle clusterware

Attempting to start Oracle Clusterware stack

Waiting for Cluster Synchronization Services daemon to start Waiting for Cluster Synchronization Services daemon to start Waiting for Cluster Synchronization Services daemon to start Waiting for Cluster Synchronization Services daemon to start Waiting for Cluster Synchronization Services daemon to start Waiting for Cluster Synchronization Services daemon to start Cluster Synchronization Services daemon has started Event Manager daemon has started

Cluster Ready Services daemon has started hosta#

Hostb# ./root111.sh

Creating pre-patch directory for saving pre-patch clusterware files /oracle/product/CRS/lib32/libskgxn2.so not found

Completed patching clusterware files to /oracle/product/CRS Relinking some shared libraries.

Relinking of patched files is complete.

Preparing to recopy patched init and RC scripts. Recopying init and RC scripts.

Startup will be queued to init within 30 seconds. Starting up the CRS daemons.

Waiting for the patched CRS daemons to start. This may take a while on some systems. .

11107 patch successfully applied.

clscfg: EXISTING configuration version 4 detected. clscfg: version 4 is 11 Release 1.

Successfully accumulated necessary OCR keys.

Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897. node : node 2: hostb hostb_rac hostb

Creating OCR keys for user 'root', privgrp 'sys'.. Operation successful.

clscfg -upgrade completed successfully

Creating '/oracle/product/CRS/install/paramfile.crs' with data used for CRS configuration Setting CRS configuration values in /oracle/product/CRS/install/paramfile.crs hostb#

Á½Ì¨»úÆ÷¶¼Ö´ÐÐÍê³Éroot111.shºó£¬¿ÉÒÔ½áÊøclusterware patch¹ý³Ì¡£Ê¹ÓÃÃüÁî

$/oracle/product/CRS/bin/crsctl query crs activeversion¼ì²éÉý¼¶ºóµÄcrs°æ±¾: Oracle Clusterware active version on the cluster is [11.1.0.7.0]

$crs_stat ¨Ct¼ì²écrsÊÇ·ñÕý³£ÔËÐС£

È»ºó¶ÔRAC databaseÈí¼þÉý¼¶£º

Í£Ö¹Á½Ì¨»úÆ÷ÉϵÄnodeapps, CRS, ÖØÐÂÖ´ÐÐ $./Disk1/runInstaller &

Éý¼¶RAC Database¡£Éý¼¶¹ý³ÌÖУ¬NAMEÑ¡ÔñOraDb11g_home1£¬path»á×Ô¶¯¸ÄΪ/oracle/product/RAC11g¡£

ÒªÌṩһ¸öºÏ·¨µÄemailµØÖ·£¬½ÓÊÜoracle·¢À´µÄÓʼþ£¬¿ÉÒÔºöÂÔ£º

Ñ¡Ôñcluster°²×°·½Ê½£¬Ñ¡ÔñCluster Installation:

Éý¼¶databaseÇ°È«Ãæ¼ì²é£º

ÁгöÒª°²×°µÄÈí¼þ£º