为了账号安全,请及时绑定邮箱和手机立即绑定

Oracle 11.2.0.4 x64 RAC扩展存储空间

标签:
Oracle


1. 数据库信息 

操作系统版本  : OEL6.5 x64   

数据库版本    : Oracle 11.2.0.4 x64 RAC     

本文针对oracle 11.2.0.4 x64 RAC for OEL6.5上添加存一块存储磁盘,并入原ASM卷组用于扩展存储空间。详细修改过程如下。 

2. 添加存储磁盘 

给两节点node1,node2 10GB磁盘空间,添加过程略。确认两节点磁盘识别。 

[root@node1 ~]# fdisk -l 

Disk /dev/sda: 32.2 GB, 32212254720 bytes   

255 heads, 63 sectors/track, 3916 cylinders    

Units = cylinders of 16065 * 512 = 8225280 bytes    

Sector size (logical/physical): 512 bytes / 512 bytes    

I/O size (minimum/optimal): 512 bytes / 512 bytes    

Disk identifier: 0x0008c7f6 

   Device Boot      Start         End      Blocks   Id  System   

/dev/sda1   *           1          64      512000   83  Linux    

Partition 1 does not end on cylinder boundary.    

/dev/sda2              64        3917    30944256   8e  Linux LVM 

Disk /dev/mapper/vg_node1-LogVol01: 27.4 GB, 27388805120 bytes   

255 heads, 63 sectors/track, 3329 cylinders    

Units = cylinders of 16065 * 512 = 8225280 bytes    

Sector size (logical/physical): 512 bytes / 512 bytes    

I/O size (minimum/optimal): 512 bytes / 512 bytes    

Disk identifier: 0x00000000 

Disk /dev/mapper/vg_node1-swap: 4294 MB, 4294967296 bytes   

255 heads, 63 sectors/track, 522 cylinders    

Units = cylinders of 16065 * 512 = 8225280 bytes    

Sector size (logical/physical): 512 bytes / 512 bytes    

I/O size (minimum/optimal): 512 bytes / 512 bytes    

Disk identifier: 0x00000000 

Disk /dev/sdb: 2147 MB, 2147483648 bytes   

67 heads, 62 sectors/track, 1009 cylinders    

Units = cylinders of 4154 * 512 = 2126848 bytes    

Sector size (logical/physical): 512 bytes / 512 bytes    

I/O size (minimum/optimal): 512 bytes / 512 bytes    

Disk identifier: 0x00000000 

Disk /dev/sdc: 2147 MB, 2147483648 bytes   

67 heads, 62 sectors/track, 1009 cylinders    

Units = cylinders of 4154 * 512 = 2126848 bytes    

Sector size (logical/physical): 512 bytes / 512 bytes    

I/O size (minimum/optimal): 512 bytes / 512 bytes    

Disk identifier: 0x00000000 

Disk /dev/sdd: 2147 MB, 2147483648 bytes   

67 heads, 62 sectors/track, 1009 cylinders    

Units = cylinders of 4154 * 512 = 2126848 bytes    

Sector size (logical/physical): 512 bytes / 512 bytes    

I/O size (minimum/optimal): 512 bytes / 512 bytes    

Disk identifier: 0x00000000 

Disk /dev/sde: 2147 MB, 2147483648 bytes   

67 heads, 62 sectors/track, 1009 cylinders    

Units = cylinders of 4154 * 512 = 2126848 bytes    

Sector size (logical/physical): 512 bytes / 512 bytes    

I/O size (minimum/optimal): 512 bytes / 512 bytes    

Disk identifier: 0x00000000 

Disk /dev/sdf: 2147 MB, 2147483648 bytes   

67 heads, 62 sectors/track, 1009 cylinders    

Units = cylinders of 4154 * 512 = 2126848 bytes    

Sector size (logical/physical): 512 bytes / 512 bytes    

I/O size (minimum/optimal): 512 bytes / 512 bytes    

Disk identifier: 0x00000000 

Disk /dev/sdg: 21.5 GB, 21474836480 bytes   

64 heads, 32 sectors/track, 20480 cylinders    

Units = cylinders of 2048 * 512 = 1048576 bytes    

Sector size (logical/physical): 512 bytes / 512 bytes    

I/O size (minimum/optimal): 512 bytes / 512 bytes    

Disk identifier: 0x00000000 

Disk /dev/sdh: 21.5 GB, 21474836480 bytes   

64 heads, 32 sectors/track, 20480 cylinders    

Units = cylinders of 2048 * 512 = 1048576 bytes    

Sector size (logical/physical): 512 bytes / 512 bytes    

I/O size (minimum/optimal): 512 bytes / 512 bytes    

Disk identifier: 0x00000000 

Disk /dev/sdj: 10.7 GB, 10737418240 bytes

64 heads, 32 sectors/track, 10240 cylinders    

Units = cylinders of 2048 * 512 = 1048576 bytes    

Sector size (logical/physical): 512 bytes / 512 bytes    

I/O size (minimum/optimal): 512 bytes / 512 bytes    

Disk identifier: 0x00000000 

Disk /dev/sdi: 21.5 GB, 21474836480 bytes   

64 heads, 32 sectors/track, 20480 cylinders    

Units = cylinders of 2048 * 512 = 1048576 bytes    

Sector size (logical/physical): 512 bytes / 512 bytes    

I/O size (minimum/optimal): 512 bytes / 512 bytes    

Disk identifier: 0x00000000 

[root@node1 ~]# 

3. udev识别出新增加的磁盘

(1) udev设备生成脚本,用于识别出新增加的脚本

for i in b c d e f g h i j;

do

echo "KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", RESULT==\"`/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\""

done

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c4552395a55706766

2d52366a5a2d684a5445", NAME="asm-diskj", OWNER="grid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c45523768705a5241

2d46576d6a2d6a424f52", NAME="asm-diskb", OWNER="grid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c45524944414b6731

2d7433474f2d4c424553", NAME="asm-diskc", OWNER="grid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c4552496b55307865

2d306747442d64755064", NAME="asm-diskd", OWNER="grid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c4552564759334841

2d69635a682d784f6e57", NAME="asm-diske", OWNER="grid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c45523647627a3946

2d494d4c472d4b687276", NAME="asm-diskf", OWNER="grid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c4552756354627076

2d426a4c5a2d64753163", NAME="asm-diskg", OWNER="grid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c4552436b35585371

2d324e646c2d75386f45", NAME="asm-diskh", OWNER="grid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c4552577651593537

2d6b644c592d6c326c39", NAME="asm-diski", OWNER="grid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c4552395a55706766

2d52366a5a2d684a5445", NAME="asm-diskj", OWNER="grid", GROUP="asmadmin", MODE="0660"

(2) 将以上内容asm-diskj一行增加到以下文件中,在node1,node2上同时增加。

# vi /etc/udev/rules.d/99-oracle-asmdevices.rules 

clip_p_w_picpath002[5]

clip_p_w_picpath002

4. 查看并添加集群ASM磁盘卷组

(1) 查看卷组情况

[root@node1 ~]# su - grid   

[grid@node1 ~]$ sqlplus / as sysasm  

SQL> set pagesize 999;    

SQL> set linesize 200;    

SQL> col name format a20;    

SQL> select group_number,name,TOTAL_MB, FREE_MB from v$asm_diskgroup;

clip_p_w_picpath002[8]

(2) node1上查看udev设备,并查看新增加的磁盘被识别到了没有。两边都需要确认。

SQL> col name format a20;   

SQL> col path format a20;    

SQL> select name,path,mode_status,state,disk_number,failgroup from v$asm_disk;  

clip_p_w_picpath002[10]

(3) node2上查看udev设备,并查看新增加的磁盘被识别到了没有.

clip_p_w_picpath002[12]

(4) 增加新的磁盘到DATA asm卷组。

SQL>    

SQL> alter diskgroup DATA add disk '/dev/asm-diskj' rebalance power 1; 

Diskgroup altered. 

SQL> 

(5) 查看ASM卷组平衡过程,平衡完后,该内容为空。

clip_p_w_picpath002[16]

(6) 确认磁盘添加情况

SQL> select name,path,mode_status,state,disk_number,failgroup from v$asm_disk;  

NAME                 PATH                 MODE_STATUS           STATE                    DISK_NUMBER FAILGROUP   

-------------------- -------------------- --------------------- ------------------------ ----------- --------------    

CRS_0003             /dev/asm-diske       ONLINE                NORMAL                             3 CRS_0003    

RECOVERY_0000        /dev/asm-diski       ONLINE                NORMAL                             0 RECOVERY_0000    

CRS_0000             /dev/asm-diskb       ONLINE                NORMAL                             0 CRS_0000    

CRS_0004             /dev/asm-diskf       ONLINE                NORMAL                             4 CRS_0004    

CRS_0002             /dev/asm-diskd       ONLINE                NORMAL                             2 CRS_0002    

CRS_0001             /dev/asm-diskc       ONLINE                NORMAL                             1 CRS_0001    

DATA_0001            /dev/asm-diskh       ONLINE                NORMAL                             1 DATA_0001    

DATA_0000            /dev/asm-diskg       ONLINE                NORMAL                             0 DATA_0000    

DATA_0002            /dev/asm-diskj       ONLINE                NORMAL                             2 DATA_0002

磁盘容量有增加

p_w_picpath

5. 查看集群添加后磁盘状态

发现两节点监点不正常,下面正常启动一下。

clip_p_w_picpath002[24]

通过crs_stat查看监听全名称,通过下面的方式重启。

clip_p_w_picpath002[20]

clip_p_w_picpath002[22]

clip_p_w_picpath002[26]

集群正常。

©著作权归作者所有:来自51CTO博客作者koumm的原创作品,如需转载,请注明出处,否则将追究法律责任

oracleracoracle racRAC/DG/OGG


点击查看更多内容
TA 点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
  • 推荐
  • 评论
  • 收藏
  • 共同学习,写下你的评论
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消