In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the ASM disk group how to delete DISK operation, the article is very detailed, has a certain reference value, interested friends must read it!
ASM has been in contact for a long time, and it is the first time that a disk has been removed from a disk group.
Did not expect such a simple operation, due to unfamiliarity also encountered two small problems.
[oracle@dbserver1 ~] $sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Tue Aug 9 10:08:06 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0-64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
And Real Application Testing options
SQL > set pages 100 lines 120
SQL > select group_number, name, state, type, total_mb, free_mb
2 from v$asm_diskgroup
GROUP_NUMBER NAME STATE TYPE TOTAL_MB FREE_MB
1 DATA_AU1M CONNECTED EXTERN 1953124 7430
2 DATA_AU2M CONNECTED EXTERN 1953124 7384
3 DATA_AU4M CONNECTED EXTERN 1953124 7304
4 DATA CONNECTED EXTERN 3906248 3898966
SQL > col path format A30
SQL > col name format A30
SQL > select disk_number, path, name, total_mb, free_mb
2 from v$asm_disk
3 where group_number = 4
DISK_NUMBER PATH NAME TOTAL_MB FREE_MB
--
1 / dev/asm-disk5 DATA_0001 1953124 1949486
0 / dev/asm-disk4 DATA_0000 1953124 1949480
SQL > alter diskgroup data drop disk'/ dev/asm-disk5'
Alter diskgroup data drop disk'/ dev/asm-disk5'
*
ERROR at line 1:
ORA-15000: command disallowed by current instance type
SQL > exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0-64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
And Real Application Testing options
Since you are currently connected to a database, it is obvious that you cannot operate on the disk group in the ASM instance. Connect the ASM instance below:
[oracle@dbserver1 ~] $su-grid
Password:
[grid@dbserver1 ~] $sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Tue Aug 9 10:12:39 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0-64bit Production
With the Automatic Storage Management option
SQL > set pages 100 lines 120
SQL > select instance_number, instance_name from v$instance
INSTANCE_NUMBER INSTANCE_NAME
--
1 + ASM
SQL > alter diskgroup data drop disk'/ dev/asm-disk5'
Alter diskgroup data drop disk'/ dev/asm-disk5'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15260: permission denied on ASM disk group
SQL > alter diskgroup data drop disk data_0001
Alter diskgroup data drop disk data_0001
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15260: permission denied on ASM disk group
At the beginning of seeing this mistake, I really wondered how it was possible to have no authority. There is no problem with the permission to check the disk on the operating system.
After checking the error message of the Oracle document, it is found that due to being accustomed to being handled by sysdba, the ASM, which is currently 11g, is ignored and should be logged in with sysasm:
SQL > conn / as sysasm
Connected.
SQL > alter diskgroup data drop disk data_0001
Diskgroup altered.
SQL > select disk_number, state, name, total_mb, free_mb from v$asm_disk where group_number = 4
DISK_NUMBER STATE NAME TOTAL_MB FREE_MB
-
1 DROPPING DATA_0001 1953124 1950842
0 NORMAL DATA_0000 1953124 1948124
SQL > select disk_number, state, name, total_mb, free_mb from v$asm_disk where group_number = 4
DISK_NUMBER STATE NAME TOTAL_MB FREE_MB
-
1 DROPPING DATA_0001 1953124 1951434
0 NORMAL DATA_0000 1953124 1947532
SQL > select disk_number, state, name, total_mb, free_mb from v$asm_disk where group_number = 4
DISK_NUMBER STATE NAME TOTAL_MB FREE_MB
-
1 DROPPING DATA_0001 1953124 1952556
0 NORMAL DATA_0000 1953124 1946410
SQL > select disk_number, state, name, total_mb, free_mb from v$asm_disk where group_number = 4
DISK_NUMBER STATE NAME TOTAL_MB FREE_MB
-
1 DROPPING DATA_0001 1953124 1953096
0 NORMAL DATA_0000 1953124 1945870
SQL > select disk_number, state, name, total_mb, free_mb from v$asm_disk where group_number = 4
DISK_NUMBER STATE NAME TOTAL_MB FREE_MB
-
0 NORMAL DATA_0000 1953124 1945854
SQL > select group_number, disk_number, path, name, state, total_mb, free_mb
2 from v$asm_disk
3 where path ='/ dev/asm-disk5'
GROUP_NUMBER DISK_NUMBER PATH NAME STATE TOTAL_MB FREE_MB
0 1 / dev/asm-disk5 NORMAL 0 0
As you can see, although the deletion operation is complete, the disk is not really deleted. ASM attempts to move the data on the disk to another available disk in the background, and the status of the disk is DROPPING.
When the background data synchronization operation is completed, the group information of the disk is cleared and the disk returns to the STATE state. At this point, the disk is completely deleted from ASM.
The above is all the contents of the article "how to delete DISK operations for ASM disk groups". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.