oracle sql/plus asm ocfs

[root@rac01 sysconfig]# su - oracle
[oracle@rac01 ~]$ sqlplus / as sysdba
SQL> select group_number,disk_number,name,path from v$asm_disk;
SQL> select username,sid,serial# from v$session;
[oracle@rac02 ~]$ asmcmd
Connected to an idle instance.
ASMCMD> ?

查看光纤卡连接的存储
cd /proc/mpp/DS_3524
cat virtualLun0        50G    1_file_data    /dev/sdb1
Lun WWN:        60080e5000364d6c000010f25253578b    linux主机上的这个号对应存储上的这个号     
Logical Drive ID:    60:08:0e:50:00:36:4d:6c:00:00:10:f2:52:53:57:8b
cat virtualLun1        5G    2_ora_crs
Lun WWN:        60080e5000364ef200000cf0525355eb    
Logical Drive ID:    60:08:0e:50:00:36:4e:f2:00:00:0c:f0:52:53:55:eb
cat virtualLun2        100G    2_ora_flash
Lun WWN:        60080e5000364d6c000010f5525357c7
Logical Drive ID:    60:08:0e:50:00:36:4d:6c:00:00:10:f5:52:53:57:c7
cat virtualLun3        100G    2_ora_arch
Lun WWN:        60080e5000364ef200000cf25253562a
Logical Drive ID:    60:08:0e:50:00:36:4e:f2:00:00:0c:f2:52:53:56:2a
cat virtualLun4        1.4T    2_ora_data    /dev/sdf1
Lun WWN:        60080e5000364d6c000010f752535806
Logical Drive ID:    60:08:0e:50:00:36:4d:6c:00:00:10:f7:52:53:58:06
scsi_cmnd[0]::cmd=0x28::sn=947535456::addr=0xffff8101689de080::st=DISPATCHED ::in=QD

oracle ASM     安装这三个包
[root@rac01 /]# rpm -qa|grep oracl
oracleasm-2.6.18-308.el5-2.0.5-1.el5
oracleasm-support-2.1.8-1.el5
oracleasmlib-2.0.4-1.el5

[root@rac01 /]# find / -name oracleasm
/sys/module/oracleasm
/lib/modules/2.6.18-308.el5/kernel/drivers/addon/oracleasm
/proc/fs/oracleasm
/usr/lib/oracleasm
/usr/sbin/oracleasm
/etc/rc.d/init.d/oracleasm
/etc/sysconfig/oracleasm
/dev/oracleasm
/var/log/oracleasm

配置ASMlib,再使用ASMlib之前,必须运行配置脚本准备驱动程序:
/etc/init.d/oracleasm configure
/etc/init.d/oracleasm enable
配置ASM磁盘:
[root@yft 1234]# fdisk /dev/sdf
[root@yft 1234]# partprobe
[root@yft 1234]# /etc/init.d/oracleasm createdisk vol1 /dev/sdf1
检查驱动加载情况:
[root@rac01 dev]# lsmod | grep oracleasm
检查oracleasmfs文件系统:
[root@rac01 ~]# df -a |head -1;df -a | grep oracleasm
[root@rac01 ~]# oracleasm --help
[root@rac01 ~]# oracleasm createdisk ARCHVOL1 /dev/sde1
[root@rac01 ~]# oracleasm createdisk CRSVOL1 /dev/sdc1
[root@rac01 ~]# oracleasm createdisk DATAVOL1 /dev/sdf1
[root@rac01 ~]# oracleasm createdisk FLASHVOL1 /dev/sdd1
asm disk创建成功后,会在/dev/oracleasm/disks目录下有相应的文件:
[root@rac01 ~]# cat /var/log/oracleasm 及时查看日志
[root@rac01 ~]# oracleasm  scandisks
[root@rac01 ~]# oracleasm  listdisks
ARCHVOL1
CRSVOL1
DATAVOL1
FLASHVOL1
[root@rac02 ~]# oracleasm  querydisk -p ARCHVOL1
Disk "ARCHVOL1" is a valid ASM disk
/dev/sde1: LABEL="ARCHVOL1" TYPE="oracleasm"
[root@rac01 ~]# oracleasm  querydisk -d ARCHVOL1
Disk "ARCHVOL1" is a valid ASM disk on device /dev/sde1[8,65]
[root@rac01 ~]# oracleasm  querydisk -d CRSVOL1
Disk "CRSVOL1" is a valid ASM disk on device /dev/sdc1[8,33]
[root@rac01 ~]# oracleasm  querydisk -d DATAVOL1
Disk "DATAVOL1" is a valid ASM disk on device /dev/sdf1[8,81]
[root@rac01 ~]# oracleasm  querydisk -d FLASHVOL1
Disk "FLASHVOL1" is a valid ASM disk on device /dev/sdd1[8,49]

创建需要的用户和用户组:
使用root用户执行:
/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
/usr/sbin/groupadd -g 504 asmadmin
/usr/sbin/groupadd -g 505 asmoper
/usr/sbin/groupadd -g 506 asmdba
/usr/sbin/useradd -g oinstall -G dba,asmdba,oper oracle
/usr/sbin/useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
mkdir -p /u01/app/oracle/product/11.2.0/dbhome_1
mkdir -p /u01/app/oracle/grid/product/11.2.0/grid
chown -R oracle:oinstall /u01/app/
chown -R grid:oinstall /u01/app/grid
chomod -R 775 /u01

oracle sql/plus asm ocfs,古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。