In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains the "asm add and delete disk methods", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "asm add and delete disk methods" bar!
I. ASM_POWER_LIMIT parameters
This parameter ASM_POWER_LIMIT controls the number of ARBx in the ASM background process. The ARBx process is used for ASM disk data redistribution and fragmentation. ASM_POWER_LIMIT values range from 0 to 11 (it is said that it can be set to 0 from 10gR2). When a new disk is added or deleted, ASM launches ARBx for IO dispersion operation. The higher the value of this parameter, the greater the io. This is a very resource-consuming action, so be sure to do it when the system is idle.
Official description of ASM_POWER_LIMIT parameters:
ASM_POWER_LIMIT specifies the maximum power on an Automatic Storage Management instance for disk rebalancing. The higher the limit, the faster rebalancing will complete. Lower values will take longer, but consume fewer processing and I/O resources.
If the POWER clause of a rebalance operation is not specified, then the default power will be the value of ASM_POWER_LIMIT.
According to the number of logical cpu and the load, the asm_power_limit parameters are determined.
1.1 View the number of logical cpu
$cat / proc/cpuinfo | grep "processor" | wc-l
forty-eight
1.2 grid user login, setting asm_power_limit parameters
$sqlplus / as sysasm
SQL > show parameter asm_power_limit
NAME TYPE VALUE
-
Asm_power_limit integer 1
1.3 modify asm_power_limit parameters
SQL > alter system set asm_power_limit=20 sid='* 'scope=both
1.4 add or remove asm disks
1.5 restore asm_power_limit default values
SQL > alter system set asm_power_limit=1 sid='* 'scope=both
2. Add disk members of the disk group (it is best to ensure that the size size of the added disk members is the same as the size size of other members of the disk group, otherwise the maximum available space is wasted)
1.grid users enter asm environment
Node1- > sqlplus / as sysasm
two。 View information about the current environment
SQL >
Col name for a35
Select a.grouproomnumberreb. Namere.path from v$asm_disk a where a.group_number=b.group_number vandalism asmwritten diskgroup b where a.group_number=b.group_number
3. Add an asm disk, then do the rebalance operation on the disk
SQL > ALTER DISKGROUP DATA ADD DISK'/ dev/asm-data02'
Diskgroup altered.
-- if there is a result from the query, the disk data migration has not been completed. If the query ends and the output is no rows selected, the disk data migration is over.
SQL > select OPERATION,POWER,EST_RATE,EST_MINUTES,STATE from v$asm_operation
GROUP_NUMBER OPERATION STATE POWER ACTUAL SOFAR
--
EST_WORK EST_RATE EST_MINUTES
ERROR_CODE
3 REBAL RUN 1 1 195
300 782 0
4. Query disk condition
SQL >
Col name for a40
Select group_number, name, TOTAL_MB, FREE_MB from V$asm_disk_stat
GROUP_NUMBER NAME TOTAL_MB FREE_MB
-
3 DATA_0000 43008 40913
2 FLASH_0000 15360 14211
1 GRIDDG_0000 1024 830
1 GRIDDG_0001 1024 863
3 DATA_0001 6144 5842
SQL > select OPERATION,POWER,EST_RATE,EST_MINUTES,STATE from v$asm_operation
No rows selected > disk rebalance operation ends
Delete disk members of a disk group
Query disk information and keep the drive letter path path (delete a disk member of the disk group, but make sure that after deleting the disk member, other members of the disk group have enough space for rebalance)
SQL >
Col path for a30
Select group_number,disk_number,path from v$asm_disk order by group_number,disk_number
GROUP_NUMBER DISK_NUMBER PATH
1 0 / dev/asm-ocr
1 1 / dev/asm-vd
2 0 / dev/asm-date
2 1 / dev/asm-date02
3 0 / dev/asm-flash
SQL > col name for A40
SQL > select group_number, name, TOTAL_MB, FREE_MB from V$asm_disk_stat
GROUP_NUMBER NAME TOTAL_MB FREE_MB
-
3 DATA_0000 43008 40913
2 FLASH_0000 15360 14211
1 GRIDDG_0000 1024 830
1 GRIDDG_0001 1024 863
3 DATA_0001 6144 5842
3.1start deleting disk DATA_0001 and performing rebalance operation on disk.
SQL > alter diskgroup DATA drop disk DATA_0001
Diskgroup altered.
3.2 View the disk condition
SQL >
Col name for a45
Select group_number, name, TOTAL_MB, FREE_MB from V$asm_disk_stat
GROUP_NUMBER NAME TOTAL_MB FREE_MB
--
3 DATA_0000 43008 40613
2 FLASH_0000 15360 14211
1 GRIDDG_0000 1024 830
1 GRIDDG_0001 1024 863
Description: once all allocation units are re-adjusted and deleted, the disk is removed from the disk group.
Check whether the disk rebalance operation ends. If the query output is no rows selected, it means that the rebalance has ended.
SQL > select OPERATION,POWER,EST_RATE,EST_MINUTES,STATE from v$asm_operation
No rows selected
SQL >
Col state for a10
Col path for a20
SQL > select path,group_number, disk_number,mount_status,state from v$asm_disk
PATH GROUP_NUMBER DISK_NUMBER MOUNT_STATUS STATE
--
/ dev/asm-data02 0 0 CLOSED NORMAL
/ dev/asm-date 3 0 CACHED NORMAL
/ dev/asm-flash 2 0 CACHED NORMAL
/ dev/asm-ocr 1 0 CACHED NORMAL
/ dev/asm-vd 1 1 CACHED NORMAL
Description: after the member is kicked out of the disk, GROUP_NUMBER,DISK_NUMBER is displayed as 0,0
Supplement: disk processing scheme
SQL >
Col name for a20
Select group_number,disk_number,name,TOTAL_MB,FREE_MB,TOTAL_MB-FREE_MB used_size from V$asm_disk_stat order by group_number,disk_number
GROUP_NUMBER NAME TOTAL_MB FREE_MB USED_SIZE
--
1 OCRVOTDG_0001 4096 3914 182
1 OCRVOTDG_0000 4096 3880 216
2 DATADG01_0004 284672 188576 96096
2 DATADG01_0000 284672 188648 96024
2 DATADG01_0005 284672 188632 96040
2 DATADG01_0006 284672 188616 96056
2 DATADG01_0007 284672 188664 96008
2 DATADG01_0001 284672 188584 96088
2 DATADG01_0002 284672 188560 96112
2 DATADG01_0003 284672 188584 96088
3 DATADG02_0004 284672 200504 84168
GROUP_NUMBER NAME TOTAL_MB FREE_MB USED_SIZE
--
3 DATADG02_0003 284672 200424 84248
3 DATADG02_0002 284672 200440 84232
3 DATADG02_0001 284672 200480 84192
3 DATADG02_0000 284672 200472 84200
3 DATADG02_0007 284672 200496 84176
3 DATADG02_0005 284672 200432 84240
3 DATADG02_0006 284672 200424 84248
4 DATADG03_0002 284672 273664 11008
4 DATADG03_0000 284672 273664 11008
4 DATADG03_0001 284672 273656 11016
5 ARCHDG_0000 284672 82672 202000
22 rows selected.
SQL > select sum (total_mb-free_mb) T_size from v$asm_disk
T_SIZE
-
1677646
SQL > select sum (total_mb) T_size from v$asm_disk
T_SIZE
-
5701632
SQL > select sum (free_mb) T_size from v$asm_disk
T_SIZE
-
4023986
Disk handling description:
SQL > select group_number,sum (total_mb) total_M,sum (total_mb-free_mb) used_size_M, sum (free_mb) free_M from v$asm_disk group by group_number order by group_number
GROUP_NUMBER TOTAL_M USED_SIZE_M FREE_M
--
1 8192 398 7794 (not moving)
2 2277376 768512 1508864
3 2277376 673704 1603672
4 854016 33032 820984
5 284672 202000 82672 (not moving)
SQL > select sum (total_mb) total_M,sum (total_mb-free_mb) used_size_M, sum (free_mb) free_M from v$asm_disk where group_number in
TOTAL_M USED_SIZE_M FREE_M
5408768 1475248 3933520
Plan: 1677646 M has been used, 2.7T has been retained 2831155 M, and 2870477 M has been kicked out.
5701632-2831155 = 2870477 M
2870477MB 284672 = 10.0834539
Actual implementation:
Group 2 kicks out 4 disks, DATADG01_0007~DATADG01_0004.
Group 3 kicks out 4 disks, DATADG02_0007~DATADG02_0004.
Group 4 kicks out 2 disks, DATADG03_0002,DATADG03_0001.
Actual kick out space: 284672mm 1026720Universe 1024Universe 1024 = 2.71484375 T
Actual reserved space: 5408768-2846720mm 2562048Universe 1024Universe 1024 = 2.44335938 T
Storage after implementation:
GROUP_NUMBER TOTAL_M USED_SIZE_M FREE_M
--
1 8192 398 7794
2 1138688 768512 370176
3 1138688 673704 464984
4 284672 33032 251640
5 284672 202000 82672
Thank you for reading, the above is the content of "asm add and delete disks", after the study of this article, I believe you have a deeper understanding of the method of adding and deleting disks to asm, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.