码迷,mamicode.com
首页 > 数据库 > 详细

Oracle asm lib存储扩容及测试

时间:2020-05-09 23:28:30      阅读:106      评论:0      收藏:0      [点我收藏+]

标签:spec   update   span   font   文件系统   方便   arch   process   split   

 

由于客户使用redhat6.9 acfs文件系统,并且/u01/ogg目录才100g,空间不足,需要扩容。

因此测试环境进行测试,后续生产环境进行扩容。

一、测试

Oracle ACFS测试

参考
https://www.dbform.com/2010/08/12/how-to-create-asm-filesystem-on-oracle-11gr2/
ACFS Support On OS Platforms (Certification Matrix). (Doc ID 1369107.1)    
https://blog.51cto.com/candon123/469004                  ACFS 配置
https://blog.csdn.net/lqx0405/article/details/48829357   ACFS 配置 
Customer RecommendedHow To Resize An ACFS Filesystem/ASM Volume (ADVM) (Doc ID 1173978.1)    
https://www.modb.pro/db/6663

1.创建卷组
[grid@wsgw2 ~]$ crs_stat -t -v ora.registry.acfs  
Name           Type           R/RA   F/FT   Target    State     Host        
----------------------------------------------------------------------
ora....ry.acfs ora....fs.type 0/5    0/     ONLINE    ONLINE    wsgw1  

[root@wsgw1 /]# mkdir ogg
[root@wsgw1 /]# chown -R oracle:oinstall ogg

[root@wsgw2 ~]# /u01/app/11.2.0/grid/bin/acfsload start 
Cant exec "/usr/bin/lsb_release": No such file or directory at /u01/app/11.2.0/grid/lib/osds_acfslib.pm line 542.
Use of uninitialized value $LSB_RELEASE in split at /u01/app/11.2.0/grid/lib/osds_acfslib.pm line 547.
ACFS-9391: Checking for existing ADVM/ACFS installation.
ACFS-9392: Validating ADVM/ACFS installation files for operating system.
ACFS-9393: Verifying ASM Administrator setup.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9156: Detecting control device /dev/asm/.asm_ctl_spec.
ACFS-9156: Detecting control device /dev/ofsctl.
ACFS-9322: completed


ASMCMD> volcreate -h
usage: volcreate -G diskgroup -s size [ --column number ] [ --width stripe_width ] [--redundancy {high|mirror|unprotected} ]
[--primary {hot|cold}] [--secondary {hot|cold}] volume ASMCMD> volcreate -G ARCH -s 2g v01 ORA-15032: not all alterations performed ORA-15221: ASM operation requires compatible.asm of 11.2.0.0.0 or higher (DBD ERROR: OCIStmtExecute) SQL> select name,total_mb/1024 total_g,state,type,COMPATIBILITY ,DATABASE_COMPATIBILITY from v$asm_diskgroup; NAME TOTAL_G STATE TYPE COMPATIBILITY DATABASE_COMPATIBILI ---------- ---------- --------------- ------ -------------------- -------------------- ARCH 9.98828125 MOUNTED EXTERN 10.1.0.0.0 10.1.0.0.0 OCR 19.9931641 MOUNTED EXTERN 11.2.0.0.0 10.1.0.0.0 SQL>alter diskgroup ARCH set attribute compatible.asm=11.2; SQL>alter diskgroup ARCH set attribute compatible.rdbms=11.2; Tue May 05 12:03:00 2020 SQL> alter diskgroup ARCH set attribute compatible.asm=11.2 NOTE: Created Used Space Directory for 2 threads NOTE: Advancing ASM compatibility to 11.2.0.0.0 for grp 1 NOTE: initiating PST update: grp = 1 Tue May 05 12:03:04 2020 GMON updating group 1 at 13 for pid 28, osid 48447 NOTE: Advancing compatible.asm on grp 1 disk ARCH_0000 NOTE: Advancing compatible.asm on grp 1 disk ARCH_0001 NOTE: PST update grp = 1 completed successfully SUCCESS: Advanced compatible.asm to 11.2.0.0.0 for grp 1 Tue May 05 12:03:04 2020 NOTE: Instance updated compatible.asm to 11.2.0.0.0 for grp 1 SUCCESS: alter diskgroup ARCH set attribute compatible.asm=11.2 Tue May 05 12:03:13 2020 NOTE: setting 11.2 start ABA for group ARCH thread 2 to 3.188 Tue May 05 12:03:36 2020 SQL> alter diskgroup ARCH set attribute compatible.rdbms=11.2 NOTE: Advancing RDBMS compatibility to 11.2.0.0.0 for grp 1 Tue May 05 12:03:40 2020 GMON querying group 1 at 15 for pid 28, osid 48447 SUCCESS: Advanced compatible.rdbms to 11.2.0.0.0 for grp 1 SUCCESS: alter diskgroup ARCH set attribute compatible.rdbms=11.2 SQL> select name,total_mb/1024 total_g,state,type,COMPATIBILITY ,DATABASE_COMPATIBILITY from v$asm_diskgroup; NAME TOTAL_G STATE TYPE COMPATIBILITY DATABASE_COMPATIBILI ---------- ---------- --------------- ------ -------------------- -------------------- ARCH 9.98828125 MOUNTED EXTERN 11.2.0.0.0 11.2.0.0.0 OCR 19.9931641 MOUNTED EXTERN 11.2.0.0.0 10.1.0.0.0 ASMCMD> volcreate -G ARCH -s 2g v01 SUCCESS: /* ASMCMD */alter diskgroup ARCH add volume v01 size 2g SQL> select VOLUME_NAME,SIZE_MB,REDUNDANCY,STATE,VOLUME_DEVICE from v$asm_volume; VOLUME_NAM SIZE_MB REDUND STATE VOLUME_DEVICE ---------- ---------- ------ --------------- -------------------- V01 2048 UNPROT ENABLED /dev/asm/v01-317 SQL> host ls -lrt /dev/asm/v01-317 brwxrwx--- 1 root asmadmin 252, 162305 May 5 12:04 /dev/asm/v01-317 ASMCMD> volinfo -G ARCH v01 Diskgroup Name: ARCH Volume Name: V01 Volume Device: /dev/asm/v01-317 State: ENABLED Size (MB): 2048 Resize Unit (MB): 32 Redundancy: UNPROT Stripe Columns: 4 Stripe Width (K): 128 Usage: Mountpath: 格式化v01 [root@wsgw2 ~]# mkfs -t acfs /dev/asm/v01-317 mkfs.acfs: version = 11.2.0.4.0 mkfs.acfs: on-disk version = 39.0 mkfs.acfs: volume = /dev/asm/v01-317 mkfs.acfs: volume size = 2147483648 mkfs.acfs: Format complete. 注册acfs [grid@wsgw1 /]$ acfsutil registry -a /dev/asm/v01-317 /ogg acfsutil registry: mount point /ogg successfully added to Oracle Registry Tue May 05 12:12:01 2020 Starting background process VDBG Tue May 05 12:12:01 2020 VDBG started with pid=28, OS id=49816 NOTE: client +ASM1:asmvol registered, osid 49816, mbr 0x2 Starting background process VMB0 Tue May 05 12:12:01 2020 VMB0 started with pid=34, OS id=49819 Starting background process VBG1 Starting background process VBG2 Tue May 05 12:12:02 2020 VBG1 started with pid=36, OS id=49825 NOTE: client +ASM1:asmvol deregistered Tue May 05 12:12:03 2020 VBG2 started with pid=37, OS id=49827 NOTE: client +ASM1:asmvol registered, osid 49816, mbr 0x2 [grid@wsgw1 /]$ df -h|grep ogg /dev/asm/v01-317 2.0G 81M 2.0G 4% /ogg #mount -t acfs /dev/asm/v01-317 /ogg grid$acfsutil size 4G /ogg acfsutil size: new file system size: 4294967296 (4096MB) [root@wsgw2 ogg]# df -h|grep -v sd|grep -v tmp Filesystem Size Used Avail Use% Mounted on /dev/asm/v01-317 4.0G 149M 3.9G 4% /ogg SQL> select VOLUME_NAME,SIZE_MB,REDUNDANCY,STATE,VOLUME_DEVICE from v$asm_volume; VOLUME_NAM SIZE_MB REDUND STATE VOLUME_DEVICE ---------- ---------- ------ --------------- -------------------- V01 4096 UNPROT ENABLED /dev/asm/v01-317 ASMCMD> volinfo -G ARCH v01 Diskgroup Name: ARCH Volume Name: V01 Volume Device: /dev/asm/v01-317 State: ENABLED Size (MB): 4096 Resize Unit (MB): 32 Redundancy: UNPROT Stripe Columns: 4 Stripe Width (K): 128 Usage: ACFS Mountpath: /ogg [root@wsgw1 /]# acfsutil info fs /ogg ACFS Version: 11.2.0.4.0 flags: MountPoint,Available mount time: Tue May 5 12:12:04 2020 volumes: 1 total size: 4294967296 total free: 4139364352 primary volume: /dev/asm/v01-317 label: flags: Primary,Available,ADVM on-disk version: 39.0 allocation unit: 4096 major, minor: 252, 162305 size: 4294967296 free: 4139364352 ADVM diskgroup ARCH ADVM resize increment: 33554432 ADVM redundancy: unprotected ADVM stripe columns: 4 ADVM stripe width: 131072 number of snapshots: 0 snapshot space usage: 0 replication status: DISABLED

 

二、生产环境扩容

 

SQL> select VOLUME_NAME,SIZE_MB,REDUNDANCY,STATE,VOLUME_DEVICE from v$asm_volume;
VOLUME_NAM SIZE_MB REDUND STATE VOLUME_DEVICE
---------- ---------- ------ --------------- --------------------
V02 102400 UNPROT ENABLED /dev/asm/v02-111

ASMCMD> volinfo -G ARCH v02
Diskgroup Name: ARCH
Volume Name: V02
Volume Device: /dev/asm/v02-111
State: ENABLED
······
Usage: ACFS
Mountpath: /u01/ogg

[root@wsgw1 /]# acfsutil info fs
/u01/ogg
ACFS Version: 11.2.0.4.0
flags: MountPoint,Available
······
primary volume: /dev/asm/v02-111
······

实际上确认acfs挂载目录,以及确认存储空间足够,直接size 即可,非常方便。

本次上面有ogg进程,先stop *,stop mgr 关闭ogg进程后进行操作,扩容200g,1分钟不到。

grid$acfsutil size 300G /U01/ogg

 

Oracle asm lib存储扩容及测试

标签:spec   update   span   font   文件系统   方便   arch   process   split   

原文地址:https://www.cnblogs.com/lvcha001/p/12860347.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!