The general operation method for adding hard disks in RAC is to directly add the hard disks identified by multi-path to the disk group. However, the operation of the original RAC disk group was incorrect when deploying, and partitioned the disk and added the partition to the disk group, which caused interference and misunderstandings about the administrator's operation and maintenance. Therefore, all disk partitions need to be deleted and the disk group is re-submitted in the form of disks.
Added a temporary transfer hard drive to the original DG
Then kick out an old hard drive
Rename the old hard disk, sort it out and add it to the disk group
Repeat the above until all old hard disks in the original disk group have been updated
Finally kick out the temporary turntable
How to operate
Change DGSYSTEM
Add disk tmplun
su - grid sqlplus / as sysasm alter diskgroup DGSYSTEM add disk '/dev/mapper/tmplun' rebalance power 5;
Confirm that the automatic balance addition is completed
select * from gv$asm_operation;
No results are found in the query, no rows selected, automatic balance is completed
Query the ASM disk status and check the tmplun you just added
col path for a30 col name for a16 set lines 320 select group_number,name,mode_status,state,path,os_mb,free_mb,header_status from v$asm_disk where path='/dev/mapper/tmplun';
Name is DGSYSTEM_0008, status is MEMBER, GROUP_NUMBER is 3
Record the next disk information to be deleted
select group_number,name,mode_status,state,path,os_mb,free_mb,header_status from v$asm_disk;
The name is DGSYSTEM_0000, the disk path is /dev/mapper/mpathc1, the status is MEMBER, and the GROUP_NUMBER is 3
3 DGSYSTEM_0000 ONLINE NORMAL /dev/mapper/mpathc1 511999 144060 MEMBER
Delete DGSYSTEM_0000
alter diskgroup DGSYSTEM drop disk DGSYSTEM_0000 rebalance power 5;
Confirm that the automatic balance is completed after deleting the disk
select * from gv$asm_operation;
Query the ASM disk status and check the DGSYSTEM_0000 that just deleted
select group_number,name,mode_status,state,path,os_mb,free_mb,header_status from v$asm_disk where path='/dev/mapper/mpathc1';
The display name is empty, the status is CANDIDATE, and the GROUP_NUMBER is 0
Delete partition mpathc1 on disk mpathc1 from operating system
fdisk -l /dev/mapper/mpathc fdisk /dev/mapper/mpathc
Change the multipath name on both hosts respectively
vi /etc/
Change mpathc to mpathsys00
(The disk in DGRECOVERY can be changed to mpathrec00)
Reload multipath configuration
multipath -r
Check the multipath result of mpathsys00
multipath -ll | grep mpathsys00
Check whether the renamed disk mpathsys00 exists
ls -l /dev/mapper/mpathsys00
Confirm whether the permissions to change the name disk are correct
ls -l /dev/dm-xx
Query the ASM disk status and check the newly renamed disk mpathsys00
select group_number,name,mode_status,state,path,os_mb,free_mb,header_status from v$asm_disk where path='/dev/mapper/mpathsys00';
The display name is empty, the status is CANDIDATE, GROUP_NUMBER is 0, the disk is idle, and can be reused
Add the newly renamed idle disk to the original DGSYSTEM (start repeated execution from step 1)
Repeat the above steps until all DGSYSTEM original disks are corrected
After DGSYSTEM is completed, drop tmplun
alter diskgroup DGSYSTEM drop disk DGSYSTEM_0008 rebalance power 5;
DGSYSTEM change is completed
After all ASM disk group changes, drop tmplun, unconfiguration of files, unmap storage, and reload multipath
Extensions:
SQL> select GROUP_NUMBER,NAME,TYPE,TOTAL_MB,FREE_MB from v$asm_diskgroup;
GROUP_NUMBER NAME TYPE TOTAL_MB FREE_MB
1 DGGRID NORMAL 81904 20100
3 DGSYSTEM EXTERN 5144544 1449120
2 DGRECOVERY EXTERN 1023992 948976
By querying the disk group status, we can see that the DGGRID type is NORMAL, and the other disk group format is EXTERN
NORMAL type is managed by ASM for redundancy in mirroring, and two copies of data are retained. It is quite special. It is necessary to add multiple disks of the same size at one time to transfer data.
EXTERN means external storage. ASM does not manage data redundancy, and only retains one piece of data. Data security is guaranteed by itself (for example, storage uses RAID method)
If there is a HIGH type, it means that the data is managed redundantly by ASM and retains three copies of the data.
This is the article about the operation method of adding and replacing hard disks for Oracle rac. For more related content on Oracle rac hard disk replacement, please search for my previous articles or continue browsing the related articles below. I hope everyone will support me in the future!