In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Environment description:
ORACLE Version:11.2.0.3.0
RHEL6.4+ASMlib
Because shared storage needs to be upgraded, all ASM disks need to be migrated online.
1. Collect information
Su-grid
Export ORACLE_SID=+ASM1
Sqlplus / as sysasm
Col NAME for a10
Col LABEL for a20
Col STATE for a10
Col FAILGROUP for a10
Col PATH for a20
Set line 150
SELECT GROUP_NUMBER, DISK_NUMBER, LABEL, STATE, FAILGROUP, NAME, PATH, TOTAL_MB, FREE_MB FROM V$ASM_DISK
GROUP_NUMBER DISK_NUMBER LABEL STATE FAILGROUP NAME PATH TOTAL_MB FREE_MB
1 0 DATA01 NORMAL DATA01 DATA01 ORCL:DATA01 20479 16773
1 1 DATA02 NORMAL DATA02 DATA02 ORCL:DATA02 20479 16773
2 0 FRA01 NORMAL FRA01 FRA01 ORCL:FRA01 30719 28906
3 0 OCR01 NORMAL OCR01 OCR01 ORCL:OCR01 2046 1921
3 1 OCR02 NORMAL OCR02 OCR02 ORCL:OCR02 2046 1952
3 2 OCR03 NORMAL OCR03 OCR03 ORCL:OCR03 2046 1954
3 3 OCR04 NORMAL OCR04 OCR04 ORCL:OCR04 2046 1955
two。 Back up the entire library and OCR disk group
Export ORACLE_SID=JSTDB1
Rman target /
Crosscheck archivelog all
Delete expired archivelog all
Backup format'/ u01According to rman _ percent _
Su-root
Ocrconfig-export / u01/rman/ocr.bak
3. Map a new disk to the operating system
Disk / dev/sdi: 21.5 GB
Disk / dev/sdk: 32.2 GB
Disk / dev/sdl: 2147 MB
Disk / dev/sdj: 21.5 GB
Disk / dev/sdm: 2147 MB
Disk / dev/sdn: 2147 MB
4. Identified as ASM disk
/ etc/init.d/oracleasm createdisk NEW_DATA01 / dev/sdi1
/ etc/init.d/oracleasm createdisk NEW_DATA02 / dev/sdj1
/ etc/init.d/oracleasm createdisk NEW_FRA01 / dev/sdk1
/ etc/init.d/oracleasm createdisk NEW_OCR01 / dev/sdl1
/ etc/init.d/oracleasm createdisk NEW_OCR02 / dev/sdm1
/ etc/init.d/oracleasm createdisk NEW_OCR03 / dev/sdn1
/ etc/init.d/oracleasm scandisks
/ etc/init.d/oracleasm listdisks
Col NAME for a10
Col LABEL for a20
Col STATE for a10
Col FAILGROUP for a10
Col PATH for a20
Set line 150
SELECT GROUP_NUMBER, DISK_NUMBER, LABEL, STATE, FAILGROUP, NAME, PATH, TOTAL_MB, FREE_MB FROM V$ASM_DISK
GROUP_NUMBER DISK_NUMBER LABEL STATE FAILGROUP NAME PATH TOTAL_MB FREE_MB
00 NEW_DATA01 NORMAL ORCL:NEW_DATA01 00
0 1 NEW_DATA02 NORMAL ORCL:NEW_DATA02 00
0 2 NEW_FRA01 NORMAL ORCL:NEW_FRA01 00
0 3 NEW_OCR01 NORMAL ORCL:NEW_OCR01 00
0 4 NEW_OCR02 NORMAL ORCL:NEW_OCR02 00
0 5 NEW_OCR03 NORMAL ORCL:NEW_OCR03 00
1 0 DATA01 NORMAL DATA01 DATA01 ORCL:DATA01 20479 16773
1 1 DATA02 NORMAL DATA02 DATA02 ORCL:DATA02 20479 16773
2 0 FRA01 NORMAL FRA01 FRA01 ORCL:FRA01 30719 30142
3 0 OCR01 NORMAL OCR01 OCR01 ORCL:OCR01 2046 1921
3 1 OCR02 NORMAL OCR02 OCR02 ORCL:OCR02 2046 1952
3 2 OCR03 NORMAL OCR03 OCR03 ORCL:OCR03 2046 1954
3 3 OCR04 NORMAL OCR04 OCR04 ORCL:OCR04 2046 1955
14 rows selected.
5. Add disks to the ASM disk group
ALTER DISKGROUP DATA ADD DISK 'ORCL:NEW_DATA01'
ALTER DISKGROUP DATA ADD DISK 'ORCL:NEW_DATA02'
ALTER DISKGROUP FRA ADD DISK 'ORCL:NEW_FRA01'
ALTER DISKGROUP OCR ADD DISK 'ORCL:NEW_OCR01'
ALTER DISKGROUP OCR ADD DISK 'ORCL:NEW_OCR02'
ALTER DISKGROUP OCR ADD DISK 'ORCL:NEW_OCR03'
Or use the asmca graphical interface to add
6. Delete disk
ALTER DISKGROUP DATA DROP DISK DATA01
ALTER DISKGROUP DATA DROP DISK DATA02
ALTER DISKGROUP FRA DROP DISK FRA01
ALTER DISKGROUP OCR DROP DISK OCR01
ALTER DISKGROUP OCR DROP DISK OCR02
ALTER DISKGROUP OCR DROP DISK OCR03
ALTER DISKGROUP OCR DROP DISK OCR04
View the status after deletion
Col NAME for a10
Col LABEL for a20
Col STATE for a10
Col FAILGROUP for a10
Col PATH for a20
Set line 150
SELECT GROUP_NUMBER, DISK_NUMBER, LABEL, STATE, FAILGROUP, NAME, PATH, TOTAL_MB, FREE_MB FROM V$ASM_DISK
GROUP_NUMBER DISK_NUMBER LABEL STATE FAILGROUP NAME PATH TOTAL_MB FREE_MB
0 2 NEW_FRA01 NORMAL ORCL:NEW_FRA01 00
0 3 NEW_OCR01 NORMAL ORCL:NEW_OCR01 00
0 4 NEW_OCR02 NORMAL ORCL:NEW_OCR02 00
0 5 NEW_OCR03 NORMAL ORCL:NEW_OCR03 00
1 0 DATA01 DROPPING DATA01 DATA01 ORCL:DATA01 20479 20240
1 1 DATA02 NORMAL DATA02 DATA02 ORCL:DATA02 20479 18089
2 0 FRA01 NORMAL FRA01 FRA01 ORCL:FRA01 30719 30142
3 0 OCR01 NORMAL OCR01 OCR01 ORCL:OCR01 2046 1921
3 1 OCR02 NORMAL OCR02 OCR02 ORCL:OCR02 2046 1952
3 2 OCR03 NORMAL OCR03 OCR03 ORCL:OCR03 2046 1954
3 3 OCR04 NORMAL OCR04 OCR04 ORCL:OCR04 2046 1955
1 2 NEW_DATA01 NORMAL NEW_DATA01 NEW_DATA01 ORCL:NEW_DATA01 20479 18085
1 3 NEW_DATA02 NORMAL NEW_DATA02 NEW_DATA02 ORCL:NEW_DATA02 20479 18086
14 rows selected.
Or use the asmca graphical interface to delete
7. View the status of reblance
COL ERROR_CODE FOR A10
Select * from v$asm_operation
GROUP_NUMBER OPERATION STATE POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES ERROR_CODE
--
1 REBAL RUN 1 1 1359 2480 1800 0
Select * from v$asm_operation
GROUP_NUMBER OPERATION STATE POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES ERROR_CODE
--
3 REBAL REAP 1 1 130148 1390 0
Select * from v$asm_operation
GROUP_NUMBER OPERATION STATE POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES ERROR_CODE
--
3 REBAL WAIT 1
You can see the status of deletion: RUN- > REAP- > WAIT- > end
Adjust the speed of reblance
Alter diskgroup DATA rebalance power 8
Select * from v$asm_operation
GROUP_NUMBER OPERATION STATE POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES ERROR_CODE
--
1 REBAL RUN 8 8 120 4006 1440 2
Reblance succeeded
Select * from v$asm_operation
No rows selected
9. View the status of RAC
Crsctl status res-t
NAME TARGET STATE SERVER STATE_DETAILS
Local Resources
Ora.DATA.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
Ora.FRA.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
Ora.LISTENER.lsnr
ONLINE ONLINE rac1
ONLINE ONLINE rac2
Ora.OCR.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
Ora.asm
ONLINE ONLINE rac1 Started
ONLINE ONLINE rac2 Started
Ora.gsd
ONLINE OFFLINE rac1
ONLINE OFFLINE rac2
Ora.net1.network
ONLINE ONLINE rac1
ONLINE ONLINE rac2
Ora.ons
ONLINE ONLINE rac1
ONLINE ONLINE rac2
Cluster Resources
Ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac2
Ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE rac2
Ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE rac2
Ora.cvu
1 ONLINE ONLINE rac2
Ora.jstdb.db
1 ONLINE ONLINE rac1 Open
2 ONLINE ONLINE rac2 Open
Ora.paydb.db
1 ONLINE ONLINE rac1 Open
2 ONLINE ONLINE rac2 Open
Ora.oc4j
1 ONLINE ONLINE rac2
Ora.rac1.vip
1 ONLINE ONLINE rac1
Ora.rac2.vip
1 ONLINE ONLINE rac2
Ora.scan1.vip
1 ONLINE ONLINE rac2
Ora.scan2.vip
1 ONLINE ONLINE rac2
Ora.scan3.vip
1 ONLINE ONLINE rac2
10. Unmap the disk after drop from the storage system
11. Restart the server (please do this carefully in the production system) Test RAC status is normal
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.