设为首页 收藏本站
查看: 678|回复: 0

[经验分享] CREATE the ASM for ORACLE on Solaris 10!

[复制链接]
YunVN网友  发表于 2016-8-13 07:11:08 |阅读模式
  # df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0d0s0 4.6G 4.3G 265M 95% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 1.1G 928K 1.1G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
4.6G 4.3G 265M 95% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 1.1G 228K 1.1G 1% /tmp
swap 1.1G 60K 1.1G 1% /var/run
/dev/dsk/c0d0s7 3.7G 2.8G 807M 79% /export/home
/vol/dev/dsk/c1t0d0/vmwaretools
1.5M 1.5M 0K 100% /cdrom/vmwaretools
# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
0. c0d0 <DEFAULT cyl 1171 alt 2 hd 255 sec 63>
/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
1. c0d1 <VMware V-0000000000000000-0001-4.00GB>
/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0
Specify disk (enter its number): ^C
# zpool create asmdisks c0d1
# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0d0s0 4.6G 4.3G 265M 95% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 1.1G 928K 1.1G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
4.6G 4.3G 265M 95% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 1.1G 228K 1.1G 1% /tmp
swap 1.1G 60K 1.1G 1% /var/run
/dev/dsk/c0d0s7 3.7G 2.8G 807M 79% /export/home
/vol/dev/dsk/c1t0d0/vmwaretools
1.5M 1.5M 0K 100% /cdrom/vmwaretools
asmdisks 3.9G 1K 3.9G 1% /asmdisks
# chown oracle:dba /asmdisks
# su - oracle
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
$ dd if=/dev/zero of=/asmdisks/_file_disk1 bs=1k count=500000
500000+0 records in
500000+0 records out
$ dd if=/dev/zero of=/asmdisks/_file_disk2 bs=1k count=500000
500000+0 records in
500000+0 records out
$ dd if=/dev/zero of=/asmdisks/_file_disk3 bs=1k count=1000000
1000000+0 records in
1000000+0 records out
$ dd if=/dev/zero of=/asmdisks/_file_disk4 bs=1k count=1000000
1000000+0 records in
1000000+0 records out
$ exit
# lofiadm -a /asmdisks/_file_disk1
/dev/lofi/1
# lofiadm -a /asmdisks/_file_disk2
/dev/lofi/2
# lofiadm -a /asmdisks/_file_disk3
/dev/lofi/3
# lofiadm -a /asmdisks/_file_disk4
/dev/lofi/4
# ls -lL /dev/lofi/*
brw------- 1 root sys 144, 1 May 13 14:59 /dev/lofi/1
brw------- 1 root sys 144, 2 May 13 15:00 /dev/lofi/2
brw------- 1 root sys 144, 3 May 13 15:00 /dev/lofi/3
brw------- 1 root sys 144, 4 May 13 15:00 /dev/lofi/4
# mknod /asmdisks/vdisk1 c 144 1
mknod /asmdisks/vdisk2 c 144 2
mknod /asmdisks/vdisk3 c 144 3
mknod /asmdisks/vdisk4 c 144 4# # #
#
# chown oracle:dba /asmdisks/vdisk1
# chown oracle:dba /asmdisks/vdisk2
# chown oracle:dba /asmdisks/vdisk3
# chown oracle:dba /asmdisks/vdisk4#
# chown oracle:dba /asmdisks/vdisk4
# ps -ef|grep ocssd
oracle 4587 4478 0 14:32:55 ? 0:04 /export/home/oracle/product/10g/bin/ocssd.bin
root 4752 4649 0 15:04:26 pts/1 0:00 grep ocssd
# su - oracle
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
$ mkdir -p $ORACLE_BASE/asm/+ASM/bdump
mkdir -p $ORACLE_BASE/asm/+ASM/cdump
mkdir -p $ORACLE_BASE/asm/+ASM/hdump
$ mkdir -p $ORACLE_BASE/asm/+ASM/pfile
mkdir -p $ORACLE_BASE/asm/+ASM/udump$ $ $
$ more /export/home/oracle/product/10g/dbs/init+ASM.ora
###########################################
# Automatic Storage Management
###########################################
# _asm_allow_only_raw_disks=false
# asm_diskgroups='TESTDB_DATA1'

# Default asm_diskstring values for supported platforms:
# Solaris (32/64 bit) /dev/rdsk/*
# Windows NT/XP //./orcldisk*
# Linux (32/64 bit) /dev/raw/*
# HPUX /dev/rdsk/*
# HPUX(Tru 64) /dev/rdisk/*
# AIX /dev/rhdisk/*
# asm_diskstring=''

#asm_diskstrin 用于定义实例启动时搜索可用的ASM磁盘的路径,这个参数很重要。
#还有另外一个参数asm_diskgroups 用于定义ASM实例启动时自动加载的diskgroups,当CREATE #DISKGROUP时会自动在参数文件里写入。

###########################################
# Diagnostics and Statistics
###########################################
background_dump_dest=$ORACLE_BASE/asm/+ASM/bdump
core_dump_dest=$ORACLE_BASE/asm/+ASM/cdump
user_dump_dest=$ORACLE_BASE/asm/+ASM/udump

###########################################
# Miscellaneous
###########################################
instance_type=asm
compatible=10.1.0.4.0

###########################################
# Pools
###########################################
large_pool_size=12M

###########################################
# Security and Auditing
###########################################
remote_login_passwordfile=exclusive
$ export ORACLE_SID=+ASM
ORACLE_SID=+ASM: is not an identifier
$ ORACLE_SID=+ASM
$ export ORACLE_SID
$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.2.0.2.0 - Production on Wed May 13 15:09:21 2009

Copyright (c) 1982, 2005, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> startup

ASM instance started

Total System Global Area 83886080 bytes
Fixed Size 1278640 bytes
Variable Size 57441616 bytes
ASM Cache 25165824 bytes
ORA-15110: no diskgroups mounted
SQL> create spfile from pfile;

File created.

SQL> shutdown immediate
ORA-15100: invalid or missing diskgroup name


ASM instance shutdown
SQL> startup
ASM instance started

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


SQL> show parameter spfile;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /export/home/oracle/product/10
g/dbs/spfile+ASM.ora
bash-3.00# chown -h oracle:dba c0d1
bash-3.00# ls -lrt
total 126
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0s0 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:a,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0s1 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:b,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0s2 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:c,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0s3 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:d,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0s4 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:e,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0s5 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:f,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0s6 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:g,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0s7 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:h,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0s8 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:i,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0s9 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:j,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0s10 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:k,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0s11 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:l,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0s12 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:m,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0s13 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:n,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0s14 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:o,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0s15 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:p,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0p0 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:q,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0p1 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:r,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0p2 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:s,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0p3 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:t,raw
lrwxrwxrwx 1 root root 54 Apr 13 19:34 c0d0p4 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:u,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0s0 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:a,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0s1 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:b,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0s2 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:c,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0s3 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:d,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0s4 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:e,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0s5 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:f,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0s6 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:g,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0s7 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:h,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0s8 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:i,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0s9 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:j,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0s10 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:k,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0s11 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:l,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0s12 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:m,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0s13 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:n,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0s14 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:o,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0s15 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:p,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0p0 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:q,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0p1 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:r,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0p2 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:s,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0p3 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:t,raw
lrwxrwxrwx 1 root root 52 Apr 13 19:34 c1t0d0p4 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/sd@0,0:u,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1s0 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:a,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1s1 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:b,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1s2 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:c,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1s3 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:d,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1s4 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:e,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1s5 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:f,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1s6 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:g,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1s8 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:i,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1s9 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:j,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1s10 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:k,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1s11 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:l,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1s12 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:m,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1s13 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:n,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1s14 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:o,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1s15 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:p,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1p0 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:q,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1p1 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:r,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1p2 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:s,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1p3 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:t,raw
lrwxrwxrwx 1 root root 54 Apr 24 14:41 c0d1p4 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:u,raw
lrwxrwxrwx 1 oracle dba 55 May 6 13:19 c0d1 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:wd,raw
USE the DBCA to creat the ASM diskgroup!
SQL> startup
ASM instance started

Total System Global Area 83886080 bytes
Fixed Size 1278640 bytes
Variable Size 57441616 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-257054-1-1.html 上篇帖子: 使用expdp/impdp远程导入导出oracle数据 下篇帖子: 关于Oracle内部工作机制的一个疑惑
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表