新增磁碟多連路磁碟併為ASM磁碟組擴容
1、先保留現有的多路徑配置
#/sbin/multipath -ll | grep 3PARdata>/tmp/out
2、安裝磁碟掃描外掛(如果不存在的話)
#yum install sg3_utils
3、執行磁碟重新掃描,獲取wwid(需要提前獲取新增加的磁碟連路條數是否符合)
#rescan-scsi-bus.sh -l -w -c
4、逐一掃描磁碟
#for i in `cat /proc/partitions | awk '{print $4}' | grep sd`; do echo "### $i: `scsi_id -g -u /dev/$i `"; done | sort -k 3 | awk '{print $NF}' | sort | uniq
5、對比兩個檔案差異即是新增的磁碟wwid
將新增的磁碟wwid新增到配置檔案multipath.conf中
#diff /etc/multipath.conf multipath.conf
6、建立ASM需要的裸盤
[root@cnhkpgs10 mapper]# oracleasm createdisk DATA_DISK07 /dev/mapper/data_lun07
Writing disk header: done
Instantiating disk: done
[root@cnhkpgs10 mapper]# oracleasm createdisk DATA_DISK08 /dev/mapper/data_lun08
Writing disk header: done
Instantiating disk: done
[root@cnhkpgs10 mapper]# oracleasm createdisk DATA_DISK09 /dev/mapper/data_lun09
Writing disk header: done
Instantiating disk: done
7、掃描新增磁碟
[root@cnhkpgs11 disks]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "DATA_DISK09"
Instantiating disk "DATA_DISK08"
Instantiating disk "DATA_DISK07"
[root@cnhkpgs10 mapper]# oracleasm listdisks
DATA_DISK01
DATA_DISK02
DATA_DISK03
DATA_DISK04
DATA_DISK05
DATA_DISK06
DATA_DISK07
DATA_DISK08
DATA_DISK09
OCRVD_DISK01
OCRVD_DISK02
OCRVD_DISK03
8、檢查新增磁碟及許可權
[root@cnhkpgs11 disks]# ls -lrt /dev/oracleasm/disks/
total 0
brw-rw---- 1 grid asmadmin 252, 11 Oct 25 17:03 DATA_DISK07
brw-rw---- 1 grid asmadmin 252, 9 Oct 25 17:04 DATA_DISK09
brw-rw---- 1 grid asmadmin 252, 10 Oct 25 17:04 DATA_DISK08
brw-rw---- 1 grid asmadmin 252, 7 Oct 25 17:06 DATA_DISK02
brw-rw---- 1 grid asmadmin 252, 0 Oct 25 17:06 OCRVD_DISK03
brw-rw---- 1 grid asmadmin 252, 1 Oct 25 17:06 OCRVD_DISK02
brw-rw---- 1 grid asmadmin 252, 2 Oct 25 17:06 OCRVD_DISK01
brw-rw---- 1 grid asmadmin 252, 5 Oct 25 17:06 DATA_DISK06
brw-rw---- 1 grid asmadmin 252, 4 Oct 25 17:06 DATA_DISK05
brw-rw---- 1 grid asmadmin 252, 3 Oct 25 17:06 DATA_DISK04
brw-rw---- 1 grid asmadmin 252, 8 Oct 25 17:06 DATA_DISK03
brw-rw---- 1 grid asmadmin 252, 6 Oct 25 17:06 DATA_DISK01
9、查詢Oracle資料庫中是否識別出新增的磁碟
SQL> select name,path,total_mb,free_mb,os_mb from v$asm_disk;
NAME PATH TOTAL_MB FREE_MB OS_MB
-------------------- ---------------------------------------- ---------- ---------- ----------
DATADG_0002 /dev/oracleasm/disks/DATA_DISK03 102400 14927 102400
DATADG_0001 /dev/oracleasm/disks/DATA_DISK02 102400 14923 102400
DATADG_0000 /dev/oracleasm/disks/DATA_DISK01 102400 14919 102400
DATADG_0005 /dev/oracleasm/disks/DATA_DISK06 102400 14927 102400
DATADG_0004 /dev/oracleasm/disks/DATA_DISK05 102400 14917 102400
DATADG_0003 /dev/oracleasm/disks/DATA_DISK04 102400 14924 102400
OCRDG_0000 /dev/oracleasm/disks/OCRVD_DISK01 5120 4811 5120
OCRDG_0001 /dev/oracleasm/disks/OCRVD_DISK02 5120 4812 5120
OCRDG_0002 /dev/oracleasm/disks/OCRVD_DISK03 5120 4811 5120
/dev/oracleasm/disks/DATA_DISK08 0 0 102400
/dev/oracleasm/disks/DATA_DISK09 0 0 102400
/dev/oracleasm/disks/DATA_DISK07 0 0 102400
12 rows selected.
10、將新增磁碟新增到ASM磁碟組中
SQL> select name,free_mb,total_mb from v$asm_diskgroup;
NAME FREE_MB TOTAL_MB
------------------------------ ---------- ----------
OCRDG 14434 15360
DATADG 89537 614400
SQL> select name,free_mb,total_mb^C
SQL> select name,path,failgroup from v$asm_disk;
NAME PATH FAILGROUP
------------------------------ ---------------------------------------- ------------------------------
/dev/oracleasm/disks/DATA_DISK07
/dev/oracleasm/disks/DATA_DISK09
/dev/oracleasm/disks/DATA_DISK08
DATADG_0002 /dev/oracleasm/disks/DATA_DISK03 DATADG_0002
DATADG_0001 /dev/oracleasm/disks/DATA_DISK02 DATADG_0001
DATADG_0000 /dev/oracleasm/disks/DATA_DISK01 DATADG_0000
DATADG_0005 /dev/oracleasm/disks/DATA_DISK06 DATADG_0005
DATADG_0004 /dev/oracleasm/disks/DATA_DISK05 DATADG_0004
DATADG_0003 /dev/oracleasm/disks/DATA_DISK04 DATADG_0003
OCRDG_0000 /dev/oracleasm/disks/OCRVD_DISK01 OCRDG_0000
OCRDG_0001 /dev/oracleasm/disks/OCRVD_DISK02 OCRDG_0001
OCRDG_0002 /dev/oracleasm/disks/OCRVD_DISK03 OCRDG_0002
12 rows selected.
SQL> alter diskgroup DATADG add disk '/dev/oracleasm/disks/DATA_DISK07';
Diskgroup altered.
SQL> alter diskgroup DATADG add disk '/dev/oracleasm/disks/DATA_DISK08';
Diskgroup altered.
SQL> alter diskgroup DATADG add disk '/dev/oracleasm/disks/DATA_DISK09';
Diskgroup altered.
SQL> select * from v$asm_operation;
GROUP_NUMBER OPERA STAT POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES ERROR_CODE
------------ ----- ---- ---------- ---------- ---------- ---------- ---------- ----------- --------------------------------------------
2 REBAL RUN 1 1 2238 170005 2999 55
SQL> select name,free_mb,total_mb from v$asm_diskgroup;
NAME FREE_MB TOTAL_MB
------------------------------ ---------- ----------
OCRDG 14434 15360
DATADG 396731 921600
SQL> select name,path,failgroup from v$asm_disk;
NAME PATH FAILGROUP
------------------------------ ---------------------------------------- ------------------------------
DATADG_0002 /dev/oracleasm/disks/DATA_DISK03 DATADG_0002
DATADG_0001 /dev/oracleasm/disks/DATA_DISK02 DATADG_0001
DATADG_0000 /dev/oracleasm/disks/DATA_DISK01 DATADG_0000
DATADG_0005 /dev/oracleasm/disks/DATA_DISK06 DATADG_0005
DATADG_0004 /dev/oracleasm/disks/DATA_DISK05 DATADG_0004
DATADG_0003 /dev/oracleasm/disks/DATA_DISK04 DATADG_0003
OCRDG_0000 /dev/oracleasm/disks/OCRVD_DISK01 OCRDG_0000
OCRDG_0001 /dev/oracleasm/disks/OCRVD_DISK02 OCRDG_0001
OCRDG_0002 /dev/oracleasm/disks/OCRVD_DISK03 OCRDG_0002
DATADG_0007 /dev/oracleasm/disks/DATA_DISK08 DATADG_0007
DATADG_0008 /dev/oracleasm/disks/DATA_DISK09 DATADG_0008
DATADG_0006 /dev/oracleasm/disks/DATA_DISK07 DATADG_0006
12 rows selected.
------------------------End TangYun[Tony.Tang]2016.10.26------------------------------------------------------
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30633755/viewspace-2127712/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ASM 磁碟組的建立及擴容ASM
- ASM磁碟組擴容操作文件ASM
- Oracle ASM磁碟組擴容(AIX7.1)OracleASMAI
- 虛擬機器磁碟不足,新增磁碟擴容虛擬機
- Oracle RAC環境下ASM磁碟組擴容OracleASM
- asm 磁碟組 增刪磁碟組ASM
- Oracle ASM新增磁碟組POWER OPTIONOracleASM
- 基於裸裝置的ASM磁碟組擴容方案ASM
- Oracle RAC ASM磁碟組擴容時遇到的VIP漂移OracleASM
- oracle 11g ASM 磁碟組線上擴容實驗:OracleASM
- 使用udev擴充套件ASM磁碟組dev套件ASM
- ASM磁碟組限制ASM
- Oracle RAC日常運維-ASM磁碟擴容Oracle運維ASM
- Oracle資料庫 ASM磁碟線上擴容Oracle資料庫ASM
- 11G RAC 為 ASM 磁碟組增加一個磁碟。(AIX)ASMAI
- asm新增刪除磁碟ASM
- 一次ASM新增新的磁碟組ASM
- 在Oracle10g 新增ASM磁碟組OracleASM
- RAC資料庫新增ASM磁碟組(1)資料庫ASM
- ASM的管理----刪除和新增磁碟組ASM
- 遷移ASM磁碟組ASM
- ASM磁碟組更換磁碟的操作方法ASM
- 在ASM磁碟組中刪除一個磁碟ASM
- asm新增和刪除磁碟ASM
- linux下新增ASM磁碟LinuxASM
- 【ASM】Oracle asm磁碟被格式化,如何掛載該磁碟組ASMOracle
- ORACLE RAC重建ASM磁碟組OracleASM
- ASM磁碟組修改重建操作ASM
- ASM磁碟組空間不足ASM
- Oracle asm磁碟中新加磁碟OracleASM
- asm磁碟組建立錯誤,用中轉儲存,重建磁碟組ASM
- Windows 下使用檔案模擬磁碟配置ASM磁碟組WindowsASM
- Ubuntu 磁碟擴容過程Ubuntu
- OracleRAC新增asm磁碟組並設定歸檔位置OracleASM
- 在Oracle10g RAC下新增ASM磁碟組OracleASM
- 新增磁碟並掛載磁碟
- 修改ASM磁碟組的屬性ASM
- ASM磁碟組刪除DISK操作ASM