Oracle 11g ASM之--ACFS创建案例

前端之家收集整理的这篇文章主要介绍了Oracle 11g ASM之--ACFS创建案例前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Oracle 11g ASM之--ACFS创建案例
系统环境:
操作系统:RedHat EL5(32)
Oracle: Oracle 11g (11.2.0.1.0)
Grid Infrastructure: 11.2.0.1.0

1、查看ASM DISKGROUP兼容性参数版本
sql> select name,STATE,ALLOCATION_UNIT_SIZE,BLOCK_SIZE,SECTOR_SIZE,COMPATIBILITY from v$asm_diskgroup;

NAME STATE ALLOCATION_UNIT_SIZE BLOCK_SIZE SECTOR_SIZE COMPATIBILITY
------------------------------ ----------- -------------------- ---------- ----------- ------------------------------------------------------------
DATA MOUNTED 1048576 4096 51211.2.0.0.0
DG1 MOUNTED 1048576 4096 51211.2.0.0.0
RCY MOUNTED 1048576 4096 51211.2.0.0.0

2、创建动态卷
sql> ALTER DISKGROUP dg1 ADD VOLUME ACFSARCVOL SIZE 5g;
ALTER DISKGROUP dg1 ADD VOLUME ACFSARCVOL SIZE 5g
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15477: cannot communicate with the volume driver

通过ASMCA无法创建动态卷和ACFS:


3、启动ACFS服务
[grid@ocm1 ~]$ su -
Password:
[root@ocm1 ~]# /u01/11.2.0/grid/bin/acfsroot install
ACFS-9300: ADVM/ACFS distribution files found.
ACFS-9312: Existing ADVM/ACFS installation detected.
ACFS-9314: Removing prevIoUs ADVM/ACFS installation.
ACFS-9315: PrevIoUs ADVM/ACFS components successfully removed.
ACFS-9307: Installing requested ADVM/ACFS software.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9321: Creating udev for ADVM/ACFS.
ACFS-9323: Creating module dependencies - this may take some time.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9309: ADVM/ACFS installation correctness verified.
[root@ocm1 ~]# /u01/11.2.0/grid/bin/acfsload start
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9322: done.
[root@ocm1 ~]# /u01/11.2.0/grid/bin/acfsload start -s
[root@ocm1 ~]# lsmod |grep oracle
oracleacfs 787460 0
oracleadvm 177792 0
oracleoks 226656 2 oracleacfs,oracleadvm
oracleasm 46356 1
[root@ocm1 ~]# cat /etc/init.d/acfsload
#!/bin/bash
# chkconfig: 2345 30 21
# description: Load Oracle ASM Volume driver on system startup
export ORACLE_HOME=/u01/11.2.0/grid
$ORACLE_HOME/bin/acfsload start -s

编写ACFS service启动脚本
[root@ocm1 ~]# chmod 755 /etc/init.d/acfsload
[root@ocm1 ~]# chkconfig --add acfsload
[root@ocm1 ~]# chkconfig --list acfsload

acfsload 0:off 1:off 2:on 3:on 4:on 5:on 6:off

建立ACFS文件系统:

通过ASMCA可以创建动态卷和ACFS:

1、创建动态卷
sql> alter diskgroup dg1 add volume acfsvol size 2G;
Diskgroup altered.

2、建立ACFS文件系统
[grid@ocm1 ~]$ ls /dev/asm
acfsvol-48
[grid@ocm1 ~]$ /sbin/mkfs -t acfs -n ACFSVOL1 /dev/asm/acfsvol-48
mkfs.acfs: version = 11.2.0.1.0.0
mkfs.acfs: on-disk version = 39.0
mkfs.acfs: volume = /dev/asm/acfsvol-48
mkfs.acfs: volume size = 2147483648
mkfs.acfs: Format complete.
[grid@ocm1 ~]$ /sbin/acfsutil registry -a -f /dev/asm/acfsvol-48 /sharedisk/
acfsutil registry: mount point /sharedisk successfully added to Oracle Registry

通过ASMCA创建ACFS:
[root@ocm1 ~]# mkdir /sharedisk
[root@ocm1 ~]# chown grid:oinstall /sharedisk
[root@ocm1 ~]# mount.acfs -o all
[root@ocm1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
59G 20G 36G 36% /
/dev/sda1 99M 12M 82M 13% /boot
tmpfs 1.2G 478M 731M 40% /dev/shm
/dev/asm/acfsvol-48 2.0G 41M 2.0G 2% /sharedisk




----- 至此,ACFS创建成功 !

猜你在找的Oracle相关文章