asm的配置日志(一)


平台: linux 4
      oracle 10g
      vmware GSX server3.2
author: skate
time:2008/03/8

Last login: Fri Mar  7 18:06:16 2008 from 192.168.0.95
[root@skate-test ~]# ll
total 80
-rw-r--r--  1 root root  1341 Dec  6 20:24 anaconda-ks.cfg
drwxr-xr-x  2 root root  4096 Dec  6 20:58 Desktop
-rw-r--r--  1 root root 46879 Dec  6 20:24 install.log
-rw-r--r--  1 root root  4945 Dec  6 20:24 install.log.syslog

[root@db ~]# uname -a
Linux db.movo.tv 2.6.9-55.0.9.EL #1 Thu Sep 27 18:10:45 EDT 2007 i686 i686 i386 GNU/Linux


[root@skate-test ~]# rz
rz waiting to receive.
正在开始 zmodem 传输。 按 Ctrl+C 取消。
正在传输 kernel-2.6.9-22.EL.i686.rpm...
正在传输 kernel-2.6.9-22.EL.i686.rpm...
正在传输 kernel-2.6.9-22.EL.i686.rpm...
正在传输 kernel-2.6.9-22.EL.i686.rpm...
正在传输 kernel-2.6.9-22.EL.i686.rpm...
  100%    9948 KB 2487 KB/s 00:00:04       0 错误
正在传输 oracleasm-2.6.9-22.EL-2.0.3-1.i686.rpm...
  100%     123 KB  123 KB/s 00:00:01       0 错误
正在传输 oracleasmlib-2.0.2-1.i386.rpm...
  100%      12 KB   12 KB/s 00:00:01       0 错误
正在传输 oracleasm-support-2.0.3-1.i386.rpm...
  100%      22 KB   22 KB/s 00:00:01       0 错误

root@skate-test ~]# ll
total 10232
-rw-r--r--  1 root root     1341 Dec  6 20:24 anaconda-ks.cfg
drwxr-xr-x  2 root root     4096 Dec  6 20:58 Desktop
-rw-r--r--  1 root root    46879 Dec  6 20:24 install.log
-rw-r--r--  1 root root     4945 Dec  6 20:24 install.log.syslog
-rw-r--r--  1 root root 10187342 Mar  5 14:23 kernel-2.6.9-22.EL.i686.rpm
-rw-r--r--  1 root root   126085 Mar  5 14:43 oracleasm-2.6.9-22.EL-2.0.3-1.i686.rpm
-rw-r--r--  1 root root    12948 Mar  5 11:01 oracleasmlib-2.0.2-1.i386.rpm
-rw-r--r--  1 root root    22662 Mar  5 11:00 oracleasm-support-2.0.3-1.i386.rpm
[root@skate-test ~]# rpm -Uvh kernel-2.6.9-22.EL.i686.rpm
warning: kernel-2.6.9-22.EL.i686.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:kernel                 ########################################### [100%]
[root@skate-test ~]# vi /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
        initrd /initrd-2.6.9-22.EL.img
~
~
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/sda
"/boot/grub/grub.conf" 17L, 617C written
[root@skate-test ~]# uname -a
Linux skate-test 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 athlon i386 GNU/Linux
[root@skate-test ~]# reboot

Broadcast message from root (pts/0) (Fri Mar  7 18:09:21 2008):

The system is going down for reboot NOW!
Last login: Fri Mar  7 18:06:48 2008 from 192.168.0.95
[root@skate-test ~]# ll
total 10232
-rw-r--r--  1 root root     1341 Dec  6 20:24 anaconda-ks.cfg
drwxr-xr-x  2 root root     4096 Dec  6 20:58 Desktop
-rw-r--r--  1 root root    46879 Dec  6 20:24 install.log
-rw-r--r--  1 root root     4945 Dec  6 20:24 install.log.syslog
-rw-r--r--  1 root root 10187342 Mar  5 14:23 kernel-2.6.9-22.EL.i686.rpm
-rw-r--r--  1 root root   126085 Mar  5 14:43 oracleasm-2.6.9-22.EL-2.0.3-1.i686.rpm
-rw-r--r--  1 root root    12948 Mar  5 11:01 oracleasmlib-2.0.2-1.i386.rpm
-rw-r--r--  1 root root    22662 Mar  5 11:00 oracleasm-support-2.0.3-1.i386.rpm
[root@skate-test ~]# uname -a
Linux skate-test 2.6.9-22.EL #1 Sat Oct 8 17:48:27 CDT 2005 i686 athlon i386 GNU/Linux
[root@skate-test ~]# rpm -Uvh oracleasm-2.6.9-22.EL-2.0.3-1.i686.rpm  oracleasm-support-2.0.3-1.i386.rpm oracleasmlib-2.0.2-1.i386.rpm
Preparing...                ########################################### [100%]
   1:oracleasm-support      ########################################### [ 33%]
   2:oracleasm-2.6.9-22.EL  ########################################### [ 67%]
   3:oracleasmlib           ########################################### [100%]
[root@skate-test ~]# /etc/init.d/oracleasm  configure
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.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: oinstall
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: [  OK  ]
Creating /dev/oracleasm mount point: [  OK  ]
Loading module "oracleasm": [  OK  ]
Mounting ASMlib driver filesystem: [  OK  ]
Scanning system for ASM disks: [  OK  ]
[root@skate-test ~]# fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        1044     8281507+  8e  Linux LVM
[root@skate-test ~]# shutdown -h now

Broadcast message from root (pts/0) (Fri Mar  7 18:26:39 2008):

The system is going down for system halt NOW!
Last login: Fri Mar  7 18:18:40 2008 from 192.168.0.95
[root@skate-test ~]# /etc/init.d/oracleasm enable
Writing Oracle ASM library driver configuration: [  OK  ]
Scanning system for ASM disks: [  OK  ]
[root@skate-test ~]# fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        1044     8281507+  8e  Linux LVM

Disk /dev/sdb: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table

Disk /dev/sdd: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdd doesn't contain a valid partition table

Disk /dev/sde: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sde doesn't contain a valid partition table

Disk /dev/sdf: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdf doesn't contain a valid partition table

Disk /dev/sdg: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdg doesn't contain a valid partition table
[root@skate-test ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): m
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): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-261, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-261, default 261):
Using default value 261

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@skate-test ~]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): m
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): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-261, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-261, default 261):
Using default value 261

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@skate-test ~]# fdisk /dev/sdd
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-261, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-261, default 261):
Using default value 261

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@skate-test ~]# fdisk /dev/sde
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-261, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-261, default 261):
Using default value 261

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL1 /dev/sdb1
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL1 /dev/sdb1
Marking disk "/dev/sdb1" as an ASM disk: [  OK  ]
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL1 /dev/sdb1
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL /dev/sdb1
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL2 /dev/sdb1
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL2 /dev/sd1
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL2 /dev/sdc1
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL2 /dev/sdc1
Marking disk "/dev/sdc1" as an ASM disk: [  OK  ]
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL2 /dev/sdc1
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL /dev/sdc1
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL3 /dev/sdc1
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL3 /dev/sd1
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL3 /dev/sdd1
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL3 /dev/sdd1
Marking disk "/dev/sdd1" as an ASM disk: [  OK  ]
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL3 /dev/sdd1
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL3 /dev/sd1
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL3 /dev/sde1
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL /dev/sde1
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL4 /dev/sde1
[root@skate-test ~]# /etc/init.d/oracleasm  createdisk VOL4 /dev/sde1
Marking disk "/dev/sde1" as an ASM disk: [  OK  ]
[root@skate-test ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
VOL4
[root@skate-test ~]# su - oracle
[oracle@skate-test ~]$ echo $ORACLE_HOME
/home/oracle/product/10.2.0.3/db_1
[oracle@skate-test ~]$ cd /home/oracle/product/10.2.0.3/db_1/dbs/

[oracle@skate-test dbs]$ orapwd file=orapw+ASM password=dba
[oracle@skate-test dbs]$ ll
total 84
-rw-r-----  1 oracle oinstall  1544 Dec  7 12:13 hc_omovo.dat
-rw-r--r--  1 oracle oinstall   250 Mar  7 18:53 init+ASM.ora
-rw-r-----  1 oracle oinstall 12920 May  3  2001 initdw.ora
-rw-r-----  1 oracle oinstall  8385 Sep 11  1998 init.ora
-rw-r-----  1 oracle oinstall    24 Dec  7 12:14 lkOMOVO
-rw-r-----  1 oracle oinstall  1536 Mar  7 18:54 orapw+ASM
-rw-r-----  1 oracle oinstall  1536 Dec  7 12:17 orapwomovo
-rw-r-----  1 oracle oinstall  2560 Dec  7 12:17 spfileomovo.ora
[oracle@skate-test dbs]$ su - oracle
Password:
[oracle@skate-test ~]$ ll
total 32
drwxr-x---  3 oracle oinstall 4096 Dec  7 12:13 admin
drwxr-x---  3 oracle oinstall 4096 Dec  7 12:15 flash_recovery_area
drwxrwx---  6 oracle oinstall 4096 Dec  7 12:13 oraInventory
drwxrwx---  3 oracle oinstall 4096 Dec  7 11:29 product
[oracle@skate-test ~]$ ll admin/
total 8
drwxr-x---  8 oracle oinstall 4096 Dec  7 12:13 omovo
[oracle@skate-test ~]$ echo $ORACLE_BASE
/home/oracle

[oracle@skate-test ~]$ ll
total 32
drwxr-x---  3 oracle oinstall 4096 Dec  7 12:13 admin
drwxr-x---  3 oracle oinstall 4096 Dec  7 12:15 flash_recovery_area
drwxrwx---  6 oracle oinstall 4096 Dec  7 12:13 oraInventory
drwxrwx---  3 oracle oinstall 4096 Dec  7 11:29 product
[oracle@skate-test ~]$ mkdir -p $ORALCE_BASE/admin/+ASM/udump
mkdir: cannot create directory `/admin': Permission denied
[oracle@skate-test ~]$ mkdir -p /home/oracle/admin/+ASM/udump
[oracle@skate-test ~]$ mkdir -p /home/oracle/admin/+ASM/bdump
[oracle@skate-test ~]$ mkdir -p /home/oracle/admin/+ASM/cdump
[oracle@skate-test ~]$ ll admin/
total 16
drwxr-xr-x  5 oracle oinstall 4096 Mar  7 18:57 +ASM
drwxr-x---  8 oracle oinstall 4096 Dec  7 12:13 omovo
[oracle@skate-test ~]$ ll admin/+ASM/
total 24
drwxr-xr-x  2 oracle oinstall 4096 Mar  7 18:57 bdump
drwxr-xr-x  2 oracle oinstall 4096 Mar  7 18:57 cdump
drwxr-xr-x  2 oracle oinstall 4096 Mar  7 18:57 udump
[oracle@skate-test ~]$ export ORACLE_SID=+ASM
[oracle@skate-test ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 7 18:58:49 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORA-29701: unable to connect to Cluster Manager
SQL> host
[oracle@skate-test ~]$ ps -elf|grep ASM
0 S oracle    3228  3227  0  78   0 - 23246 pipe_w 18:58 ?        00:00:00 oracle+ASM (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
0 S oracle    3256  3237  0  76   0 -  1201 pipe_w 19:10 pts/0    00:00:00 grep ASM

 

[oracle@skate-test ~]$ su -
Password:
[root@skate-test ~]# vi /etc/inittab
#
# inittab       This file describes how the INIT process should set up
#               the system in a certain run-level.
#
# Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
#               Modified for RHS Linux by Marc Ewing and Donnie Barnes
#

# Default runlevel. The runlevels used by RHS are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:

# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
#
# inittab       This file describes how the INIT process should set up
#               the system in a certain run-level.
#
# Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
#               Modified for RHS Linux by Marc Ewing and Donnie Barnes
#

# Default runlevel. The runlevels used by RHS are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:

# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6

# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# When our UPS tells us power has failed, assume we have a few minutes
# of power left.  Schedule a shutdown for 2 minutes from now.
# This does, of course, assume you have powerd installed and your
# UPS connected and working correctly.

pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"


# If power was restored before the shutdown kicked in, cancel it.

pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"


# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

# Run xdm in runlevel 5
x:5:respawn:/etc/X11/prefdm -nodaemon
x:5:respawn:/etc/X11/prefdm -nodaemon

# sakte add
h1:35:respawn:/etc/init.d/init.cssd run >/dev/null 2>&1 </dev/null
"/etc/inittab" 56L, 1746C written

[root@skate-test ~]# su - oracle
[oracle@skate-test ~]$ export ORACLE_SID=+ASM
[oracle@skate-test ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 7 19:15:45 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORA-29701: unable to connect to Cluster Manager
SQL> exit
Disconnected


[oracle@skate-test ~]$ su -
Password:
[root@skate-test ~]# reboot

Broadcast message from root (pts/0) (Fri Mar  7 19:17:12 2008):

The system is going down for reboot NOW!
Last login: Fri Mar  7 18:42:34 2008 from 192.168.0.95
[root@skate-test ~]# su - oracle
[oracle@skate-test ~]$ export ORACLE_SID=+ASM
[oracle@skate-test ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 7 19:21:41 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORA-29701: unable to connect to Cluster Manager
SQL> exit
Disconnected


[root@skate-test ~]# su - oracle
[oracle@skate-test ~]$ export ORACLE_SID=+ASM
[oracle@skate-test ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 7 19:25:13 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORA-29701: unable to connect to Cluster Manager
SQL> host
[oracle@skate-test ~]$ ps |grep ASM
[oracle@skate-test ~]$ ps |grep asm
[oracle@skate-test ~]$ /etc/init.d/oracleasm  enable
Writing Oracle ASM library driver configuration: /etc/init.d/oracleasm: line 348: /etc/sysconfig/oracleasm: Permission denied
[FAILED]
[oracle@skate-test ~]$ su -
Password:
[root@skate-test ~]# /etc/init.d/oracleasm  enable
Writing Oracle ASM library driver configuration: [  OK  ]
Scanning system for ASM disks: [  OK  ]
[root@skate-test ~]# ps |grep asm
[root@skate-test ~]# ps |grep asm
[root@skate-test ~]# exit
logout
[oracle@skate-test ~]$ exit
exit

SQL> startup
ORA-29701: unable to connect to Cluster Manager
SQL> host
[oracle@skate-test ~]$ lsmod |grep oracleasm
bash: lsmod: command not found
[oracle@skate-test ~]$ su -
Password:
[root@skate-test ~]# lsmod | grep oracleasm
oracleasm              48020  1
[root@skate-test ~]# dmesg | grep oracleasm
ASM: oracleasmfs mounted with options: <defaults>
SELinux: initialized (dev oracleasmfs, type oracleasmfs), not configured for labeling
[root@skate-test ~]# su - oracle
[oracle@skate-test ~]$ export ORACLE_SID=+ASM
[oracle@skate-test ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 7 19:32:52 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORA-29701: unable to connect to Cluster Manager
SQL> exit        
Disconnected
[oracle@skate-test ~]$ ps -elf|grep ASM
0 S oracle    3375  3113  0  79   0 - 23246 pipe_w 19:29 ?        00:00:00 oracle+ASM (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
0 S oracle    3476  3447  0  77   0 -  1407 pipe_w 19:33 pts/0    00:00:00 grep ASM
[oracle@skate-test ~]$ ps -elf|grep ASM
0 S oracle    3375  3113  0  79   0 - 23246 pipe_w 19:29 ?        00:00:00 oracle+ASM (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
0 S oracle    3478  3447  0  77   0 -  1183 pipe_w 19:33 pts/0    00:00:00 grep ASM
[oracle@skate-test ~]$ crs_stat -t
-bash: crs_stat: command not found
[oracle@skate-test ~]$ echo $ORACLE_HOME
/home/oracle/product/10.2.0.3/db_1

[oracle@skate-test ~]$ more /home/oracle/product/10.2.0.3/db_1/dbs/init+ASM.ora
asm_diskstring='OMOVO:VOL*'
background_dump_dest='/home/oracle/admin/+ASM/bdump'
core_dump_dest='/home/oracle/admin/+ASM/cdump'
instance_type='asm'
large_pool_size=12M
remote_login_passwordfile='SHARED'
user_dump_dest='/home/oracle/admin/+ASM/udump'
[oracle@skate-test ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 7 19:40:15 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup pfile=/home/oracle/product/10.2.0.3/db_1/dbs/init+ASM.ora
ORA-29701: unable to connect to Cluster Manager
SQL> exit
Disconnected
[oracle@skate-test ~]$ echo $ORACLE_HOME
/home/oracle/product/10.2.0.3/db_1

 

[oracle@skate-test ~]$ ll /home/oracle/product/10.2.0.3/db_1/bin/ |more


[oracle@skate-test ~]$ sh /home/oracle/product/10.2.0.3/db_1/bin/localconfig  delete
You must be logged in as root to run /home/oracle/product/10.2.0.3/db_1/bin/localconfig.
Log in as root and restart /home/oracle/product/10.2.0.3/db_1/bin/localconfig execution.
[oracle@skate-test ~]$ su -
Password:
[root@skate-test ~]# sh /home/oracle/product/10.2.0.3/db_1/bin/localconfig delete
/etc/oracle does not exist. Creating it now.
/home/oracle/product/10.2.0.3/db_1/bin/localconfig: line 715: /etc/init.d/init.cssd: No such file or directory
[root@skate-test ~]# sh /home/oracle/product/10.2.0.3/db_1/bin/localconfig add
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized

Adding to inittab
Startup will be queued to init within 90 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
        skate-test
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)
[root@skate-test ~]# su - oracle
[oracle@skate-test ~]$ export ORACLE_SID=+ASM
[oracle@skate-test ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 7 19:51:56 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup pfile=/home/oracle/product/10.2.0.3/db_1/dbs/init+ASM.ora
ASM instance started

Total System Global Area   83886080 bytes
Fixed Size                  1217836 bytes
Variable Size              57502420 bytes
ASM Cache                  25165824 bytes
ORA-15110: no diskgroups mounted


SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@skate-test ~]$ su -
Password:

 

 

测试:

SQL> startup pfile='/home/oracle/product/10.2.0.3/db_1/dbs/init+ASM.ora'
ASM instance started

Total System Global Area   83886080 bytes
Fixed Size                  1217836 bytes
Variable Size              57502420 bytes
ASM Cache                  25165824 bytes
ORA-15110: no diskgroups mounted

SQL> create diskgroup dgroup1 normal redundancy
  2   failgroup fgroup1 disk 'VOL1','VOL2'
  3   failgroup fgroup2 disk 'VOL3','VOL4';
create diskgroup dgroup1 normal redundancy
*
ERROR at line 1:
ORA-15018: diskgroup cannot be created
ORA-15031: disk specification 'VOL4' matches no disks
ORA-15031: disk specification 'VOL3' matches no disks
ORA-15031: disk specification 'VOL2' matches no disks
ORA-15031: disk specification 'VOL1' matches no disks


[oracle@skate-test ~]$ locate VOL1

[oracle@skate-test ~]$ vi /home/oracle/product/10.2.0.3/db_1/dbs/init+ASM.ora
asm_diskstring='/dev/oracleasm/disks/VOL*'
background_dump_dest='/home/oracle/admin/+ASM/bdump'
core_dump_dest='/home/oracle/admin/+ASM/cdump'
instance_type='asm'
large_pool_size=12M
remote_login_passwordfile='SHARED'
user_dump_dest='/home/oracle/admin/+ASM/udump'


SQL> create diskgroup dgroup1 normal redundancy
  2  failgroup fgroup1 disk '/dev/oracleasm/disks/VOL1','/dev/oracleasm/disks/VOL2'
  3  failgroup fgroup2 disk '/dev/oracleasm/disks/VOL3','/dev/oracleasm/disks/VOL4';

Diskgroup created.


SQL> select name ,state from v$asm_disgroup;
select name ,state from v$asm_disgroup
                        *
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only


SQL> shutdown immediate;
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup pfile='/home/oracle/product/10.2.0.3/db_1/dbs/init+ASM.ora'
ASM instance started

Total System Global Area   83886080 bytes
Fixed Size                  1217836 bytes
Variable Size              57502420 bytes
ASM Cache                  25165824 bytes
ORA-15110: no diskgroups mounted


SQL> select name,state from v$asm_diskgroup;

NAME                           STATE
------------------------------ -----------
DGROUP1                        DISMOUNTED

SQL> alter diskgroup dgroup1 mount;

Diskgroup altered.

SQL> show parameter asm_asm_diskgroups
SQL> show parameter asm_diskgroups

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups                       string      DGROUP1

 

SQL> alter diskgroup fgroup1 frop disk VOL4;
alter diskgroup fgroup1 frop disk VOL4
                        *
ERROR at line 1:
ORA-00905: missing keyword


SQL> select name,path from v$asm_disk
  2  ;

NAME
------------------------------
PATH
--------------------------------------------------------------------------------

ORCL:VOL5


ORCL:VOL6

DGROUP1_0000
ORCL:VOL1


NAME
------------------------------
PATH
--------------------------------------------------------------------------------
DGROUP1_0001
ORCL:VOL2

DGROUP1_0002
ORCL:VOL3

DGROUP1_0003
ORCL:VOL4


6 rows selected.

SQL> alter diskgroup dgroup1 drop disk DGROUP1_0003;  

Diskgroup altered.

SQL> SELECT group_number, operation, state, est_work, sofar, est_rate, est_minutes FROM v$asm_operation;

GROUP_NUMBER OPERA STAT   EST_WORK      SOFAR   EST_RATE EST_MINUTES
------------ ----- ---- ---------- ---------- ---------- -----------
           1 REBAL RUN         919         28        420           2
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值