关闭

向ASM中添加磁盘

359人阅读 评论(0) 收藏 举报
分类:

1.1.1向ASM中添加磁盘(下面数据库操作均为asm实例)

1.1.1.1   登陆asm实例

 [grid@rac3 ~]$ sqlplus / as sysasm

 

SQL*Plus: Release 11.2.0.3.0 Production on Fri Jul10 01:13:37 2015

 

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

 

 

Connected to:

Oracle Database 11g Enterprise Edition Release11.2.0.3.0 - 64bit Production

With the Real Application Clusters and AutomaticStorage Management options

1.1.1.2   查看磁盘组剩余空间

 

SQL> select name,total_mb,free_mb from v$asm_diskgroup;

 

NAME                             TOTAL_MB    FREE_MB

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

DATA0                              102398      97660

DATA                                40958      14083

 

1.1.1.3   检查磁盘对应关系

[root@rac4 disks]# oracleasm querydisk -p CRS_DISK01

Disk "CRS_DISK01" is avalid ASM disk

/dev/sdd1:LABEL="CRS_DISK01" TYPE="oracleasm"

/dev/sde1:LABEL="CRS_DISK01" TYPE="oracleasm"

[root@rac4 disks]# oracleasmquerydisk -p CRS_DISK02

Disk "CRS_DISK02" is avalid ASM disk

/dev/sdg1:LABEL="CRS_DISK02" TYPE="oracleasm"

/dev/sdf1:LABEL="CRS_DISK02" TYPE="oracleasm"

[root@rac4 disks]# oracleasmquerydisk -p CRS_DISK03

Disk "CRS_DISK03" is avalid ASM disk

/dev/sdb1:LABEL="CRS_DISK03" TYPE="oracleasm"

/dev/sdc1:LABEL="CRS_DISK03" TYPE="oracleasm"

[root@rac4 disks]# oracleasmquerydisk -p CRS_DISK04

Disk "CRS_DISK04" is avalid ASM disk

/dev/sdj1:LABEL="CRS_DISK04" TYPE="oracleasm"

/dev/sdk1:LABEL="CRS_DISK04" TYPE="oracleasm"

1.1.1.4   将磁盘做成asm能识别的磁盘

[root@rac3 ~]# oracleasm createdisk CRS_DISK5 /dev/sdb1

Writing disk header: done

Instantiating disk: done

1.1.1.5   将ASM磁盘重命名(因为刚才弄错名字了)改名很危险

[root@rac3 ~]# oracleasm renamedisk -f CRS_DISK5 CRS_DISK05

Instantiating disk"CRS_DISK05": done

Writing disk header: done

Removing old ASM disk"CRS_DISK5": done

1.1.1.6   B节点同样的操作,添加磁盘

[root@rac4 ~]# iscsiadm --mode discoverydb --type sendtargets--portal 172.16.6.10 --discover

172.16.6.10:3260,1 iqn.20150709

10.22.19.55:3260,1 iqn.20150709

172.16.6.10:3260,1 iqn.201405012

10.22.19.55:3260,1 iqn.201405012

172.16.6.10:3260,1 iqn.201405011

10.22.19.55:3260,1 iqn.201405011

172.16.6.10:3260,1 iqn.20140509

10.22.19.55:3260,1 iqn.20140509

172.16.6.10:3260,1 iqn.20140507

10.22.19.55:3260,1 iqn.20140507

172.16.6.10:3260,1 iqn.20131203

10.22.19.55:3260,1 iqn.20131203

[root@rac4 ~]# iscsiadm --mode node --targetname iqn.20150709--portal 172.16.6.10:3260 --login

Logging in to [iface: default,target: iqn.20150709, portal: 172.16.6.10,3260] (multiple)

Login to [iface: default, target:iqn.20150709, portal: 172.16.6.10,3260] successful.

1.1.1.7   扫描ASM磁盘

[root@rac4 ~]# oracleasm scandisks

Reloading disk partitions: done

Cleaning any stale ASM disks...

Scanning system for ASM disks...

Instantiating disk"CRS_DISK05"

1.1.1.8   查看ASM存放磁盘的位置

 

SQL> show parameter asm_diskstring;

 

NAME                                 TYPE        VALUE

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

asm_diskstring                       string

1.1.1.9   设置ASM存放磁盘的位置

SQL> alter system setasm_diskstring='/dev/oracleasm/disks/*' scope=spfile;

 

System altered.

 

1.1.1.10 向ASM中添加磁盘

SQL> alter diskgroup DATA add disk'/dev/oracleasm/disks/CRS_DISK05' rebalance power 5;

 

Diskgroup altered.

1.1.1.11 再次查看ASM磁盘组空间

SQL> selectname,total_mb,free_mb from v$asm_diskgroup;

 

NAME                             TOTAL_MB    FREE_MB

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

DATA0                              102398      97660

DATA                                92157      63552

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:109831次
    • 积分:2428
    • 等级:
    • 排名:第15234名
    • 原创:135篇
    • 转载:25篇
    • 译文:0篇
    • 评论:5条
    最新评论