当前位置:网站首页>ASM外部冗余是否可以替换磁盘
ASM外部冗余是否可以替换磁盘
2022-07-31 12:19:00 【文档搬运工】
RDBMS:11.2.0.4
当ASM的磁盘冗余为external的时候,是否可以换掉一块盘。
经过测试,是可以的。前提条件是,磁盘要有较大的空余空间,因为要把换掉的磁盘上的extent ,reblance到其他的盘上。
如果空间不够,可能会失败,这次进行的测试,所占用空间比较小,剩余空间比较大。测试成功。
参考文档:
https://docs.oracle.com/cd/E11882_01/server.112/e18951/asmdiskgrps.htm#OSTMG10071
To drop disks from a disk group, use the DROP DISK clause of the ALTER DISKGROUP statement. You can also drop all of the disks in specified failure groups using the DROP DISKS IN FAILGROUP clause.
When a disk is dropped, the disk group is rebalanced by moving all of the file extents from the dropped disk to other disks in the disk group. A drop disk operation might fail if not enough space is available on the other disks. The best approach is to perform both the add and drop operation with the same ALTER DISKGROUP statement. This has the benefit of rebalancing data extents only one time and ensuring that there is enough space for the rebalance operation to succeed.
-- 创建测试用的表空间test, 放在磁盘组+test上 ,创建用户test,默认的表空间是test 。创建表,数据存放在表空间test上。
[email protected]>create tablespace test datafile '+test' size 100M autoextend on;
Tablespace created.
[email protected]>create user test identified by oracle;
User created.
[email protected]>alter user test default tablespace test;
User altered.
[email protected]>grant dba to test;
Grant succeeded.
[email protected]>
[email protected]>conn test/oracle
Connected.
[email protected]>create table test as select * from dba_tables;
Table created.
[email protected]>-- 通过dbms_rowid来查看表test中的数据,发现对应的file_id是7,查看file_id为7的数据文件,发现是存放在磁盘组+test上的
select rowid,
dbms_rowid.rowid_object(rowid) object_id,
dbms_rowid.rowid_relative_fno(rowid) file_id,
dbms_rowid.rowid_block_number(rowid) block_id,
dbms_rowid.rowid_row_number(rowid) num
from test;
ROWID OBJECT_ID FILE_ID BLOCK_ID NUM
------------------ ---------- ---------- ---------- ----------
AAAVt3AAHAAAADtAAC 88951 7 237 2
AAAVt3AAHAAAADtAAD 88951 7 237 3
AAAVt3AAHAAAADtAAE 88951 7 237 4
AAAVt3AAHAAAADtAAF 88951 7 237 5
AAAVt3AAHAAAADtAAG 88951 7 237 6
AAAVt3AAHAAAADtAAH 88951 7 237 7
AAAVt3AAHAAAADtAAI 88951 7 237 8
AAAVt3AAHAAAADtAAJ 88951 7 237 9
2879 rows selected.
[email protected]>
[email protected]>select file_name from dba_data_files where file_id = 7;
FILE_NAME
--------------------------------------------------------------------------------
+TEST/test/datafile/test.256.1111411155
[email protected]> -- 查看磁盘组信息,test磁盘组是external冗余 ,两块盘,asm-test1和asm-test2 ,drop掉其中一块盘后,还剩余一块盘。数据正常,2879条。
[email protected]+ASM2>select group_number,name from v$asm_diskgroup;
GROUP_NUMBER NAME
------------ ------------------------------
1 DATA
2 OCR
3 TEST
[email protected]+ASM2>select group_number,name,type from v$asm_diskgroup;
GROUP_NUMBER NAME TYPE
------------ ------------------------------ ------
1 DATA EXTERN
2 OCR NORMAL
3 TEST EXTERN
[email protected]+ASM2>
[email protected]+ASM2>select path from v$asm_disk where GROUP_NUMBER = 3;
PATH
--------------------------------------------------------------------------------
/dev/asm-test1
/dev/asm-test2
[email protected]+ASM2>
[email protected]+ASM2>select name,path from v$asm_disk where GROUP_NUMBER = 3;
NAME PATH
-------------------- ----------------------------------------
TEST_0000 /dev/asm-test1
TEST_0001 /dev/asm-test2
[email protected]+ASM2>
alter diskgroup TEST drop disk 'TEST_0000';
[email protected]+ASM2>alter diskgroup TEST drop disk 'TEST_0000';
Diskgroup altered.
[email protected]+ASM2>select name,path from v$asm_disk where GROUP_NUMBER = 3;
NAME PATH
-------------------- ----------------------------------------
TEST_0001 /dev/asm-test2
[email protected]+ASM2>
[email protected]>select count(*) from test.test;
COUNT(*)
----------
2879
[email protected]>
[email protected]+ASM2>select name,path from v$asm_disk where GROUP_NUMBER = 3;
NAME PATH
-------------------- ----------------------------------------
TEST_0001 /dev/asm-test2
[email protected]+ASM2>-- 再次将drop掉的磁盘添加上。
[email protected]+ASM2>ALTER DISKGROUP TEST ADD DISK '/dev/asm-test1' NAME TEST_0000;
Diskgroup altered.
[email protected]+ASM2>select * from V$ASM_OPERATION;
no rows selected
[email protected]+ASM2>select name,path from v$asm_disk where GROUP_NUMBER = 3;
NAME PATH
-------------------- ----------------------------------------
TEST_0000 /dev/asm-test1
TEST_0001 /dev/asm-test2
[email protected]+ASM2>-- alrt log 中,可以看到reblance 。
SQL> alter diskgroup TEST drop disk 'TEST_0000'
NOTE: GroupBlock outside rolling migration privileged region
NOTE: requesting all-instance membership refresh for group=3
Sat Jul 30 14:47:47 2022
NOTE: membership refresh pending for group 3/0xfab86ef8 (TEST)
Sat Jul 30 14:47:50 2022
GMON querying group 3 at 16 for pid 18, osid 3765
SUCCESS: refreshed membership for 3/0xfab86ef8 (TEST)
SUCCESS: alter diskgroup TEST drop disk 'TEST_0000'
NOTE: starting rebalance of group 3/0xfab86ef8 (TEST) at power 1
Starting background process ARB0
Sat Jul 30 14:47:51 2022
ARB0 started with pid=34, OS id=15309
NOTE: assigning ARB0 to group 3/0xfab86ef8 (TEST) with 1 parallel I/O
cellip.ora not found.
NOTE: F1X0 copy 1 relocating from 0:2 to 1:80 for diskgroup 3 (TEST)
NOTE: Attempting voting file refresh on diskgroup TEST
NOTE: Refresh completed on diskgroup TEST. No voting file found.
NOTE: stopping process ARB0
SUCCESS: rebalance completed for group 3/0xfab86ef8 (TEST)
Sat Jul 30 14:47:57 2022
NOTE: GroupBlock outside rolling migration privileged region
NOTE: requesting all-instance membership refresh for group=3
GMON updating for reconfiguration, group 3 at 17 for pid 34, osid 15335
NOTE: group 3 PST updated.
SUCCESS: grp 3 disk TEST_0000 emptied
SUCCESS: ALTER DISKGROUP TEST ADD DISK '/dev/asm-test1' NAME TEST_0000
NOTE: starting rebalance of group 3/0xfab86ef8 (TEST) at power 1
Starting background process ARB0
Sat Jul 30 14:55:10 2022
ARB0 started with pid=35, OS id=16572
NOTE: assigning ARB0 to group 3/0xfab86ef8 (TEST) with 1 parallel I/O
cellip.ora not found.
NOTE: Attempting voting file refresh on diskgroup TEST
NOTE: Refresh completed on diskgroup TEST. No voting file found.
NOTE: stopping process ARB0
SUCCESS: rebalance completed for group 3/0xfab86ef8 (TEST)
Sat Jul 30 14:55:16 2022
NOTE: GroupBlock outside rolling migration privileged region
NOTE: requesting all-instance membership refresh for group=3
Sat Jul 30 14:55:19 2022
NOTE: membership refresh pending for group 3/0xfab86ef8 (TEST)
Sat Jul 30 14:55:22 2022
GMON querying group 3 at 37 for pid 18, osid 3765
SUCCESS: refreshed membership for 3/0xfab86ef8 (TEST)
NOTE: Attempting voting file refresh on diskgroup TEST
NOTE: Refresh completed on diskgroup TEST. No voting file found.
END END
边栏推荐
- PAT exam summary (exam experience)
- dosbox基础使用[通俗易懂]
- Encapsulation of conversion between Json and objects (Gson)
- After Effects 教程,如何在 After Effects 中修复曝光不足的镜头?
- Character Functions and String Functions
- deeplab implements its own remote sensing geological segmentation dataset
- Full GC (Ergonomics)排查分析
- 使用docker搭建mysql主从
- ASM module in SAP Ecommerce Cloud Spartacus UI and Accelerator UI
- 手撕Verilog PWM呼吸灯
猜你喜欢

MySQL百万数据优化总结 一

How does the SAP ABAP OData service support the $filter (filter) operation trial version

Use docker to build mysql master-slave
给你一个大厂面试的机会,你能面试上吗?进来看看!

After Effects 教程,如何在 After Effects 中修复曝光不足的镜头?

WebGL给Unity传递参数问题1: Cannot read properties of undefined (reading ‘SendMessage‘)

SAP ABAP OData 服务如何支持 $filter (过滤)操作试读版

JVS设置不同应用的登录时效时间

imx6ull看门狗使用

TOGAF10标准读书会第2场活动精彩继续,高光时刻回顾!
随机推荐
立一个flag
最近两个月谷歌 ad 掉的厉害
连续变量离散化教程
Docker practical experience: Deploy mysql8 master-slave replication on Docker
Qt鼠标穿透
B/S架构模式的一个整体执行流程
认知—运动康复医疗机器人应用设计
快速学完数据库管理
「R」使用ggpolar绘制生存关联网络图
MySQL日志中“binlog”的三种格式玩起来真爽
A40i/T3 uboot启动时对PMU部分初始化
Docker installs canal and mysql for simple testing and achieves cache consistency between redis and mysql
函数的参数
MySQL百万数据优化总结 一
dosbox基础使用[通俗易懂]
Comparison of ipv4 and ipv6 (IPV4)
Is the working process of the belt you know the story - actionreducerstore
关于==和equals的区别和联系,面试这么回答就可以
kernel syscore
生信周刊第38期