当前位置:数据库 > Oracle >>

All about Oracle ACFS

All about Oracle ACFS
 
1) Create the new ACFS diskgroup:
 
[grid@asmlnx2 ~]$ sqlplus "/as sysasm"
SQL*Plus: Release 11.2.0.3.0 Production on Fri Apr 6 17:38:38 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Automatic Storage Management option
 
SQL> CREATE DISKGROUP ACFSDG EXTERNAL REDUNDANCY DISK 
'ORCL:ASMDISKNEW10' SIZE 14653 M 
ATTRIBUTE 'compatible.rdbms' = '11.2', 'compatible.asm' = '11.2', 'compatible.advm' = '11.2'; 2 3 
Diskgroup created.
 
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Automatic Storage Management option
[grid@asmlnx2 ~]$
 
2) Create the ADVM volume in the new diskgroup:
[grid@asmlnx2 ~]$ sqlplus "/as sysasm"
SQL*Plus: Release 11.2.0.3.0 Production on Fri Apr 6 17:41:09 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Automatic Storage Management option
 
SQL> ALTER DISKGROUP ACFSDG ADD VOLUME EBERNALVOL SIZE 14G;
Diskgroup altered.
 
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Automatic Storage Management option
 
3) Create the mount point as root OS user:
[root@asmlnx2 ~]# mkdir /u03acfs
[root@asmlnx2 ~]# chown grid:oinstall /u03acfs
[root@asmlnx2 ~]# ls -ld /u03acfs
drwxr-xr-x 2 grid oinstall 4096 Apr 6 17:45 /u03acfs
 
4) As grid user create the ACFS filesystem:
[grid@asmlnx2 ~]$ id
uid=1100(grid) gid=501(oinstall) groups=500(dba),501(oinstall),1100(asmadmin),1300(asmdba),1301(asmoper)
[grid@asmlnx2 ~]$ /sbin/mkfs -t acfs -b 4k /dev/asm/ebernalvol-168
mkfs.acfs: version = 11.2.0.3.0
mkfs.acfs: on-disk version = 39.0
mkfs.acfs: volume = /dev/asm/ebernalvol-168
mkfs.acfs: volume size = 15032385536
mkfs.acfs: Format complete.
[grid@asmlnx2 ~]$
 
5) As grid user register the ACFS filesystem & ADVM volume:
[grid@asmlnx2 ~]$ /sbin/acfsutil registry -f -a /dev/asm/ebernalvol-168 /u03acfs
acfsutil registry: ACFS-05062: cannot query CRS resource
[grid@asmlnx2 ~]$
 
 
SQL> /* ASMCMD */alter diskgroup oggacfs drop volume 'oggvol1'
2013-05-16 14:29:28.669000 +08:00
SUCCESS: /* ASMCMD */alter diskgroup oggacfs drop volume 'oggvol1'
 
SQL> alter diskgroup oggacfs resize volume oggvol1 size 90G 
ORA-15032: not all alterations performed
ORA-15476: ACFS volumes must be resized with the 'acfsutil size' operating system command.
ERROR: alter diskgroup oggacfs resize volume oggvol1 size 90G
 
-- 可以增减文件系统大小
$ acfsutil size -10G /ogg,多个节点都会变化。
acfsutil size: new file system size: 95563022336 (91136MB)
$ hostname
zehdb2
$ df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           2.00      1.62   20%    11728     3% /
/dev/hd2           4.00      1.28   69%    56972    16% /usr
/dev/hd9var        4.00      3.39   16%     8604     2% /var
/dev/hd3           8.00      6.42   20%    13653     1% /tmp
/dev/hd1           2.00      2.00    1%       51     1% /home
/dev/hd11admin      0.25      0.25    1%       5     1% /admin
/proc                 -         -    -         -     -  /proc
/dev/hd10opt       4.00      3.32   17%    12042     2% /opt
/dev/livedump      0.25      0.25    1%        4     1% /var/adm/ras/livedump
/dev/fslv00       30.00     23.34   23%     1791     1% /ftp
/dev/fslv01       30.00      8.78   71%   155524     7% /u01
/dev/asm/oggvol1-31     89.00     88.74    1%   542984     1% /ogg
 
# hostname
zehdb1
# df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           2.00      1.60   21%    11729     4% /
/dev/hd2           4.00      1.28   69%    56976    16% /usr
/dev/hd9var        4.00      3.40   16%     8651     2% /var
/dev/hd3           8.00      6.85   15%    11478     1% /tmp
/dev/hd1           2.00      2.00    1%       66     1% /home
/dev/hd11admin      0.25      0.25   1%        5     1% /admin
/proc                 -         -    -         -     -  /proc
/dev/hd10opt       4.00      3.32   17%    12042     2% /opt
/dev/livedump      0.25      0.25    1%        4     1% /var/adm/ras/livedump
/dev/fslv00       10.00      3.38   67%     6238     1% /ftp
/dev/fslv01       30.00      7.16   77%   265813    12% /u01
/dev/asm/oggvol1-31     89.00     88.74    1%   542984     1% /ogg
 
execute with root user
$ /sbin/helpers/acfs/mount /dev/asm/oggvol1-31 /ogg
$ /sbin/helpers/acfs/mount -o all
 
一:查看acfs相关的服务是否正常
[grid@rac1 ~]$ crs_stat -t -v ora.registry.acfs  
Name           Type           R/RA   F/FT   Target    State     Host          
---------------------------------------------------
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,