Oracle rac 添加磁盘到磁盘组(官方文档)

本文提供了在不影响生产环境的情况下,验证并添加磁盘到Oracle RAC磁盘组的步骤。包括使用OracleASM扫描和列出磁盘,通过dd命令检查I/O,使用kfed读取磁盘,创建临时磁盘组进行测试,最后成功后将磁盘添加到生产磁盘组。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

GOAL

Before you add the disk(s) to your production diskgroup, you can use the next steps to validate whether the candidate disk(s) is/are in good shape and can be accessed from each node (without harm the existing production diskgroups), as follow:

 

SOLUTION

1) As Oracle or Grid OS user, run the next commands on each node (if ASMLIB API is used):

# /etc/init.d/oracleasm  scandisks  #(only this command needs to be executed as root user)

$> id

$> /etc/init.d/oracleasm  listdisks

$> /etc/init.d/oracleasm  querydisk <each disk from previous output>

Note: All the disks must be visible from each node.

 

2) Confirm the disks are visible (I/O) at OS level (as oracle or grid OS user) from each node:

$> id

$> ls -l  <disk name>

$> dd if=<raw/character or block partition device in  question> of=/dev/null count=100 bs=8192

 

Example:

$> dd if=/dev/raw/raw1 of=/dev/null count=100 bs=8192  # raw device

$> dd if=/dev/oracleasm/disks/PRODA07 of=/dev/null count=100 bs=8192  # ASMLIB device

$> dd if=/dev/rdsk/c1t3d0s6 of=/dev/null count=100 bs=8192 # raw device

 

3) Verify that kfed can read on the candidate disk(s) at OS level (as oracle or grid OS user) from each node:

$> kfed read  <raw/character or block partition device in question>

 

Example:

$> kfed read /dev/raw/raw1

$> kfed read /dev/oracleasm/disks/PRODA07

$> kfed read /dev/rdsk/c1t3d0s6

Note: If the disk is not a FORMER disk, then kfed on new disks will return:    kfbh.type: 0 ; 0x002: KFBTYP_INVALID and that is expected.

 

4) Create a new temporary diskgroup:

SQL> CREATE DISKGROUP TEST EXTERNAL REDUNDANCY DISK '<YOUR CANDIDATE DISK>';

 

5) Check if the diskgroup is created and mounted:

SQL> SELECT STATE, NAME FROM V$ASM_DISKGROUP;

 

6) If so, then manually mount it on the other ASM instance(s):

SQL> ALTER DISKGROUP TEST MOUNT;

SQL> SELECT STATE, NAME FROM V$ASM_DISKGROUP;

 

7) If the previous steps had success and the TEST diskgroup can be successfully mounted (on each ASM instance), then drop the TEST diskgroup as follow:

SQL> alter diskgroup test dismount; --(from all the ASM instances, except from one).

SQL> DROP DISKGROUP TEST; --(from the ASM instance, which the diskgroup is still mounted).

 

8) Then the candidate disk is ready to be added to the desired diskgroup:

SQL> ALTER DISKGROUP <my production diskgroup> ADD DISK '<your candidate disk>';

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

大碗刀削面

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值