In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how to solve the problem of failed asm disk addition in oracle. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Production environment storage and multipath aggregation, due to unfamiliar experience forgot the need to configure udev.
When adding a disk to diskgroup, the database does not have enough permission to report an error. It is simply assumed that the permission of the corresponding character device is caused by root:disk that cannot be added to diskgroup.
Therefore, after trying to use the chown command to modify the permission of the character device to grid:oinstall in two nodes, due to the internal mechanism problem of the udev of the suse system, during the process of adding the character device to diskgroup, the permission of the character device was automatically changed from grid:oinstall to root:disk, resulting in the failure of adding disk. At this point, the disk head has written some information, and the HEADER_STATUS is NUMBER, so that it cannot be re-added to the diskgroup or kicked out of the disk group, so it is in a dilemma.
Because it is a production environment, do not dare to operate at will, so simulate the problem and solve it in the test environment.
The problem reappears:
1 confirm that the HEADER_STATUS of / dev/raw/raw6 is in the CANDIDATE state, indicating that it can be added to the asm disk group.
SQL > select PATH,NAME,DISK_NUMBER,GROUP_NUMBER,STATE,MOUNT_STATUS,HEADER_STATUS,MODE_STATUS from v$asm_disk
PATH NAME DISK_NUMBER GROUP_NUMBER STATE MOUNT_STATUS HEADER_STATUS MODE_STATUS
--
/ dev/raw/raw6 0 0 NORMAL CLOSED CANDIDATE ONLINE
/ dev/raw/raw1 DATA_0000 0 2 NORMAL CACHED MEMBER ONLINE
/ dev/raw/raw3 DATA_0002 2 2 NORMAL CACHED MEMBER ONLINE
/ dev/raw/raw4 DATA1_0000 0 1 NORMAL CACHED MEMBER ONLINE
/ dev/raw/raw5 DATA1_0001 1 1 NORMAL CACHED MEMBER ONLINE
/ dev/raw/raw2 DATA_0001 1 2 NORMAL CACHED MEMBER ONLINE
2 look at the disk group and simulate adding / dev/raw/raw6 to the disk group DATA.
SQL > select GROUP_NUMBER,NAME from v$asm_diskgroup
GROUP_NUMBER NAME
--
1 DATA1
2 DATA
3 during the process of adding / dev/raw/raw6 to disk group DATA (wait about 3 seconds), open another window and change the permission of / dev/raw/raw6 from grid:asmadmin to root:disk. The error is as follows:
SQL > alter diskgroup DATA add disk'/ dev/raw/raw6'
Alter diskgroup DATA add disk'/ dev/raw/raw6'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15075: disk (s) are not visible cluster-wide
4 restart udev (that is, change the / dev/raw/raw6 permission to grid:asmadmin) and query again.
SQL > select PATH,NAME,DISK_NUMBER,GROUP_NUMBER,STATE,MOUNT_STATUS,HEADER_STATUS,MODE_STATUS from v$asm_disk
PATH NAME DISK_NUMBER GROUP_NUMBER STATE MOUNT_STATUS HEADER_STATUS MODE_STATUS
--
/ dev/raw/raw6 0 0 NORMAL CLOSED MEMBER ONLINE
/ dev/raw/raw1 DATA_0000 0 2 NORMAL CACHED MEMBER ONLINE
/ dev/raw/raw3 DATA_0002 2 2 NORMAL CACHED MEMBER ONLINE
/ dev/raw/raw4 DATA1_0000 0 1 NORMAL CACHED MEMBER ONLINE
/ dev/raw/raw5 DATA1_0001 1 1 NORMAL CACHED MEMBER ONLINE
/ dev/raw/raw2 DATA_0001 1 2 NORMAL CACHED MEMBER ONLINE
5 at this time, you try to add / dev/raw/raw6 to the DATA again, an error occurs and the simulation fault is successful.
SQL > alter diskgroup DATA add disk'/ dev/raw/raw6'
Alter diskgroup DATA add disk'/ dev/raw/raw6'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15033: disk'/ dev/raw/raw6' belongs to diskgroup "DATA"
Solution:
Check the oracle official documentation and provide the following three solutions (1453285.1):
Method 1:
1 backup the problem disk
Dd if=/dev/oracleasm/disks/EMCORA43 of=/tmp/EMCORA43.txt bs=1M count=10
2 modify disk permissions
Chmod 000 / dev/oracleasm/disks/EMCORA47
3. If you re-mount diskgroup and confirm that diskgroup can be mounted normally, you can use the dd command to clear the disk header information and add the disk again.
Dd if=/dev/zero of=/dev/oracleasm/disks/EMCORA43 bs=1M count=1
Method 2:
Delete a disk using oracleasm
/ etc/init.d/oracleasm deletedisk EMCORA43
Method 3:
Use the force option to force the disk to be remounted.
Alter diskgroup XXXX add disk'/ dev/oracleasm/disks/EMCORA43' force
The third method is adopted in this experiment.
The details are as follows:
SQL > select NAME, TOTAL_MB, FREE_MB, (TOTAL_MB-FREE_MB) USED_MB, to_char ((TOTAL_MB-FREE_MB) * 100 / TOTAL_MB,'99.99') | |'% 'USED_PRECENT from v$asm_diskgroup
NAME TOTAL_MB FREE_MB USED_MB USED_PRECENT
--
DATA1 1998 1901 97 4.85%
DATA 2997 630 2367 78.98%
SQL > select PATH,NAME,DISK_NUMBER,GROUP_NUMBER,STATE,MOUNT_STATUS,HEADER_STATUS,MODE_STATUS from v$asm_disk
PATH NAME DISK_NUMBER GROUP_NUMBER STATE MOUNT_STATUS HEADER_STATUS MODE_STATUS
--
/ dev/raw/raw6 0 0 NORMAL CLOSED MEMBER ONLINE
/ dev/raw/raw1 DATA_0000 0 2 NORMAL CACHED MEMBER ONLINE
/ dev/raw/raw3 DATA_0002 2 2 NORMAL CACHED MEMBER ONLINE
/ dev/raw/raw4 DATA1_0000 0 1 NORMAL CACHED MEMBER ONLINE
/ dev/raw/raw5 DATA1_0001 1 1 NORMAL CACHED MEMBER ONLINE
/ dev/raw/raw2 DATA_0001 1 2 NORMAL CACHED MEMBER ONLINE
6 rows selected.
SQL > alter diskgroup DATA add disk'/ dev/raw/raw6'
Alter diskgroup DATA add disk'/ dev/raw/raw6'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15033: disk'/ dev/raw/raw6' belongs to diskgroup "DATA"
SQL > alter diskgroup DATA add disk'/ dev/raw/raw6' force
Diskgroup altered.
SQL > select PATH,NAME,DISK_NUMBER,GROUP_NUMBER,STATE,MOUNT_STATUS,HEADER_STATUS,MODE_STATUS from v$asm_disk
PATH NAME DISK_NUMBER GROUP_NUMBER STATE MOUNT_STATUS HEADER_STATUS MODE_STATUS
--
/ dev/raw/raw1 DATA_0000 0 2 NORMAL CACHED MEMBER ONLINE
/ dev/raw/raw3 DATA_0002 2 2 NORMAL CACHED MEMBER ONLINE
/ dev/raw/raw4 DATA1_0000 0 1 NORMAL CACHED MEMBER ONLINE
/ dev/raw/raw5 DATA1_0001 1 1 NORMAL CACHED MEMBER ONLINE
/ dev/raw/raw2 DATA_0001 1 2 NORMAL CACHED MEMBER ONLINE
/ dev/raw/raw6 DATA_0005 5 2 NORMAL CACHED MEMBER ONLINE
6 rows selected.
SQL > select NAME, TOTAL_MB, FREE_MB, (TOTAL_MB-FREE_MB) USED_MB, to_char ((TOTAL_MB-FREE_MB) * 100 / TOTAL_MB,'99.99') | |'% 'USED_PRECENT from v$asm_diskgroup
NAME TOTAL_MB FREE_MB USED_MB USED_PRECENT
--
DATA1 1998 1901 97 4.85%
DATA 3497 1128 2369 67.74%
In actual testing, both the first and third methods are feasible (the second is not tested because oracleasm is not used in this test environment).
Because the first method is relatively safe, the first method is chosen to repair the problem in the production environment.
Follow-up:
1. A few days later, the first method was successfully used in the production environment pboss2-rdb1/2 Jiangsu library. But it leads to a problem: there are some differences between suse system and rhel system in udev. After rhel modifies the rules file under / etc/udev/rules.d/, start udev by command start_udev. However, suse requires the following operation / etc/init.d/boot.udev restart to restart the udev configuration, and then simulate and unplug udevadm test / sys/block/xxx for the settings to take effect. This difference was not found at that time and can only take effect by rebooting the system.
2. After asmdisk is added to diskgroup, two methods are used to change asmdisk permissions in the process of rebalance. One is to directly operate the system chown command to change the asmdisk of the two nodes, and it is found that the rebalance is normal and the diskgroup is not affected. The other is to use udev to change the asmdisk attribute, restart udev to make it take effect, and find diskgroup exception, direct unmount, database instance down. After modifying the asmdisk permission, and re-alter diskgroup xxx mount, it is found that the rebalance continues, and the database restarts normally.
This is the end of this article on "how to solve the problem of failed asm disk addition in oracle". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.