实战分享:如何在HP-UX上高效扩容Oracle 12c RAC ASM磁盘

文章目录

    • [Oracle 12c RAC ASM磁盘扩容 for HP-UX](#Oracle 12c RAC ASM磁盘扩容 for HP-UX)
      • 一、扩容原因
      • 二、扩容前信息
      • 三、扩容详细步骤
        • [3.1 存储划分LUN,映射到Oracle 12c RAC相关主机组](#3.1 存储划分LUN,映射到Oracle 12c RAC相关主机组)
        • [3.2 扫描查看磁盘](#3.2 扫描查看磁盘)
        • [3.3 检查两节点间的磁盘盘符是否一致](#3.3 检查两节点间的磁盘盘符是否一致)
        • [3.4 以一个节点为准同步磁盘盘符](#3.4 以一个节点为准同步磁盘盘符)
        • [3.5 更改磁盘属主、权限](#3.5 更改磁盘属主、权限)
        • [3.6 查看ASM磁盘组名称及路径(只需在节点1中操作即可)](#3.6 查看ASM磁盘组名称及路径(只需在节点1中操作即可))
        • [3.7 为DATA磁盘组新增ASM磁盘](#3.7 为DATA磁盘组新增ASM磁盘)
        • [3.8 查看新增ASM磁盘操作是否完成](#3.8 查看新增ASM磁盘操作是否完成)
        • [3.9 查看ASM磁盘组名称及路径(只需在节点1中操作即可)](#3.9 查看ASM磁盘组名称及路径(只需在节点1中操作即可))
        • [3.10 将DATA组的rebalance从10修改为1](#3.10 将DATA组的rebalance从10修改为1)
      • 四、扩容后信息查看确认

Oracle 12c RAC ASM磁盘扩容 for HP-UX

一、扩容原因

数据库存储空间不足。

二、扩容前信息

DATA磁盘组剩余0.28G

bash 复制代码
# su - grid
$ sqlplus / as sysasm
SQL> select group_number,name,total_mb,free_mb from v$asm_diskgroup;

三、扩容详细步骤

3.1 存储划分LUN,映射到Oracle 12c RAC相关主机组

略!

3.2 扫描查看磁盘
bash 复制代码
# ioscan -fCdisk
# ioscan -m dsf
3.3 检查两节点间的磁盘盘符是否一致
bash 复制代码
# scsimgr -p get_attr all_lun -a wwid -a device_file -a hw_path | sort -n|grep disk
0x60060e8005be45000000be4500000540:/dev/rdisk/disk116:64000/0xfa00/0x186
3.4 以一个节点为准同步磁盘盘符

​ 如果一致,跳过此步骤。

​ 以disk116更改成disk600为例:

bash 复制代码
# scsimgr -p get_attr all_lun -a wwid -a device_file -a hw_path | sort -n|grep disk|grep 0x60060e8005be45000000be4500000540|awk -F ":" '{print $NF"    disk    " NR+599}'>/tmp/infile

#cat /tmp/infile
64000/0xfa00/0x186    disk    600

# ioinit -f /tmp/infile

# ioscan -fCdisk
# ioscan -m dsf

问题现象:

bash 复制代码
ioinit: Instance number 350 already exists for class disk.
Input line 1:  64000/0xfa00/0x43 disk 350

解决办法:

bash 复制代码
其中procedure I比较简单,但并不总是好用,最彻底的还是procedureII。 另外,建议大家先做一个系统备份,这些方法还是有一点危险性的。

Procedure I
-----------
Default procedure, requires one reboot and works without additional tools.

1. Extract a configuration template from the current ioscan output.
Execute the following command:

# ioscan -f | grep -e INTERFACE -e DEVICE |
grep -v target |
awk '{print $3, $1, $2}' > /infile

2. Edit /infile and change the ext_bus and lan instances as desired.
No class is allowed to get more than one line for the same instance!

3. Bring down the system gracefully to run level 1.

# init 1

4. Apply the ioconfig change:

# /sbin/ioinit -f /infile -r

The system will reboot immediately if the change is successful.
Warnings like 'Input is identical to kernel' can be ignored.

If unsuccessful, the most likely error to happen is:
"ioinit: Instance number X already exists for class XXX"

The problem is that your desired instance assignment conflicts with
an existing instance number. If that instance is bound to hardware
that is no longer visible in ioscan, then you are in trouble and
need to perform. the Procedure II or III.

5. Once the system reboots, verify that all the instance numbers
were changed as expected. It may be necessary to re-import volume
groups to ensure that /etc/lvmtab contains the correct
entries. The lan configuration may need to be changed also.


Procedure II
------------
Reliable, requires two reboots and works without additional tools.

1. Extract a configuration template from the current ioscan output.
Execute the following command:

# ioscan -f | grep -e INTERFACE -e DEVICE |
grep -v target |
awk '{print $3, $1, $2}' > /infile

Make sure to store infile to the root file system!

2. Edit /infile and change the ext_bus and lan instances as desired.
No class is allowed to get more than one line for the same instance!

3. Move away the current ioconfig files and Shutdown/Reboot:

# mv /stand/ioconfig /stand/ioconfig.sav
# mv /etc/ioconfig /etc/ioconfig.sav
# shutdown -ry 0

4. Due to the missing ioconfig files the system will come to an
ioinitrc prompt. Now recreate new ioconfig files from scratch.
This prevents you from running into possible assignment conflicts.

(in ioinitrc)# /sbin/ioinit -c

5. Apply the ioconfig change with your prepared infile:

(in ioinitrc)# /sbin/ioinit -f /infile -r

The system will reboot again now if the change was successful.
Warnings like 'Input is identical to kernel' can be ignored.

6. Once the system reboots, verify that all the instance numbers
were changed as expected. It may be necessary to re-import volume
groups to ensure that /etc/lvmtab contains the correct
entries. The lan configuration may need to be changed also.


Procedure III
-------------
Reliable, requires one reboot and needs the unsupported ioconfig2infile tool.
Since the infile is directly extracted from the current ioconfig you get all
mappings, even for hardware that is not longer visible in ioscan.

1. Extract a configuration template using ioconfig2infile:

# ioconfig2infile /etc/ioconfig >/infile

2. Edit /infile and change the ext_bus and lan instances as desired.
No class is allowed to get more than one line for the same instance!

3. Bring down the system gracefully to run level 1.

# init 1

4. Apply the ioconfig change:

# /sbin/ioinit -f /infile -r

The system will reboot immediately if the change is successful.
Warnings like 'Input is identical to kernel' can be ignored.

5. Once the system reboots, verify that all the instance numbers
were changed as expected. It may be necessary to re-import volume
groups to ensure that /etc/lvmtab contains the correct
entries. The lan configuration may need to be changed also.
3.5 更改磁盘属主、权限
sql 复制代码
# chown grid:asmadmin /dev/rdisk/disk600
# chmod 660 /dev/rdisk/disk600
3.6 查看ASM磁盘组名称及路径(只需在节点1中操作即可)
sql 复制代码
# su - grid
$ sqlplus / as sysasm
SQL> col name for a15
SQL> col path for a30
SQL> select name,path from v$asm_disk;
3.7 为DATA磁盘组新增ASM磁盘

为DATA磁盘组新增ASM磁盘disk600,并将DATA组的rebalance修改为10(只需在节点1中操作即可):

sqlite 复制代码
# su - grid
$ sqlplus / as sysasm
SQL> alter diskgroup DATA add disk '/dev/rdisk/disk600' rebalance power 10;

**备注:**此处必须以sysasm身份操作,否则会提示ORA-15032和ORA-15260错误。

3.8 查看新增ASM磁盘操作是否完成
sql 复制代码
SQL> select operation,est_minutes from v$asm_operation;

备注:全部为0时表示操作完成

3.9 查看ASM磁盘组名称及路径(只需在节点1中操作即可)
sql 复制代码
# su - grid
$ sqlplus / as sysasm
SQL> col name for a15
SQL> col path for a30
SQL> select name,path from v$asm_disk;
3.10 将DATA组的rebalance从10修改为1
sql 复制代码
SQL> alter diskgroup DATA rebalance power 1;

四、扩容后信息查看确认

sql 复制代码
# su - grid
$ sqlplus / as sysasm
SQL> select group_number,name,total_mb,free_mb from v$asm_diskgroup;

原文链接:https://mp.weixin.qq.com/s?__biz=MzkxNzI1OTE3Mw==\&mid=2247493614\&idx=1\&sn=9cda31f4bf5e188e2902acb3a0ef4a00\&chksm=c141f124f63678322f8b72744712560380341db64177ee37e53b44773020ce432aad7b55758f#rd

👍 点赞,你的认可是我创作的动力!

⭐️ 收藏,你的青睐是我努力的方向!

✏️ 评论,你的意见是我进步的财富!

相关推荐
TDengine (老段)18 分钟前
TDengine 时间函数 TODAY() 用户手册
大数据·数据库·物联网·oracle·时序数据库·tdengine·涛思数据
码界奇点27 分钟前
KingbaseES一体化架构与多层防护体系如何保障企业级数据库的持续稳定与弹性扩展
数据库·架构·可用性测试
悟乙己1 小时前
数据科学家如何更好地展示自己的能力
大数据·数据库·数据科学家
皆过客,揽星河1 小时前
mysql进阶语法(视图)
数据库·sql·mysql·mysql基础语法·mysql进阶语法·视图创建修改删除
tuokuac2 小时前
Redis 的相关文件作用
数据库·redis·缓存
鹧鸪云光伏与储能软件开发3 小时前
投资储能项目能赚多少钱?小程序帮你测算
运维·数据库·小程序·光伏·光伏设计软件·光伏设计
2301_779503764 小时前
MySQL主从同步--主从复制进阶
数据库·mysql
beijingliushao4 小时前
58-正则表达式
数据库·python·mysql·正则表达式
诗句藏于尽头5 小时前
DJANGO后端服务启动报错及解决
数据库·笔记·django
手握风云-5 小时前
MySQL数据库精研之旅第十五期:索引的 “潜规则”(下)
数据库