使用udev擴充套件ASM磁碟組
環境:linux6.5 Oracle RAC叢集兩節點,Oracle版本11.2.0.4
1.1.1 檢視相關內容:
(1 )磁碟情況:
[root@db1 ~]# fdisk -l
Disk /dev/sda: 85.9 GB, 85899345920 bytes 255 heads, 63 sectors/track, 10443 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000d2f26 Device Boot Start End Blocks Id System /dev/sda1 * 1 64 512000 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 64 10444 83373056 8e Linux LVM Disk /dev/sdb: 53.7 GB, 53687091200 bytes 255 heads, 63 sectors/track, 6527 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/sdd: 1073 MB, 1073741824 bytes 255 heads, 63 sectors/track, 130 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/sdc: 53.7 GB, 53687091200 bytes 255 heads, 63 sectors/track, 6527 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/sde: 1073 MB, 1073741824 bytes 255 heads, 63 sectors/track, 130 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/sdf: 1073 MB, 1073741824 bytes 255 heads, 63 sectors/track, 130 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/sdg: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/sdh: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/mapper/vg_db1-lv_root: 53.7 GB, 53687091200 bytes 255 heads, 63 sectors/track, 6527 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/mapper/vg_db1-lv_swap: 8405 MB, 8405385216 bytes 255 heads, 63 sectors/track, 1021 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/mapper/vg_db1-lv_home: 23.3 GB, 23278387200 bytes 255 heads, 63 sectors/track, 2830 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000
(2 )ASM 磁碟情況:
SQL> select GROUP_NUMBER,DISK_NUMBER,MOUNT_STATUS,STATE,TOTAL_MB,PATH,NAME from v$asm_disk order by GROUP_NUMBER,DISK_NUMBER;
GROUP_NUMBER DISK_NUMBER MOUNT_S STATE TOTAL_MB PATH NAME ------------ ----------- ------- -------- ---------- -------------------- -------------------- 1 0 CACHED NORMAL 51200 /dev/asmdiske DATA_0000 1 1 CACHED NORMAL 51200 /dev/asmdiskf DATA_0001 2 0 CACHED NORMAL 20480 /dev/asmdiskg ARCH_0000 3 0 CACHED NORMAL 1024 /dev/asmdiskb OCR_0000 3 1 CACHED NORMAL 1024 /dev/asmdiskc OCR_0001 3 2 CACHED NORMAL 1024 /dev/asmdiskd OCR_0002 6 rows selected.
結論:ASM 掛了6 塊磁碟,透過容量可能看到有一塊21.5G 的未掛載進來,也新盤還未使用,檢視21.5G 的磁碟,我們發現有 /dev/sdg 和 /dev/sdh 。
(3 )ASM 磁碟對應物理盤:
[root@db1 rules.d]# pwd
/etc/udev/rules.d
[root@db1 rules.d]# more 99-x-asmdisk_new.rules
KERNEL=="sd?", ENV{ID_SERIAL}=="36000c29c5362298e7a9898225a9f8ed6", SYMLINK+="asmdiskb", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd?", ENV{ID_SERIAL}=="36000c2963776a39f75310d2f2bd98287", SYMLINK+="asmdiskc", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd?", ENV{ID_SERIAL}=="36000c29dd4c14aa6a5e4f77f40427565", SYMLINK+="asmdiskd", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd?", ENV{ID_SERIAL}=="36000c292b56645878eb55e7811673ae2", SYMLINK+="asmdiske", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd?", ENV{ID_SERIAL}=="36000c29ec780367d4c1f845c880f7f0e", SYMLINK+="asmdiskf", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd?", ENV{ID_SERIAL}=="36000c297777b8958d4d4dd5cd7ddbc47", SYMLINK+="asmdiskg", OWNER="grid", GROUP="asmadmin", MODE="0660"
[root@db1 rules.d]#
(4 )確認下是哪塊磁碟未使用,檢視磁碟ID ,與上面99-x-asmdisk_new.rules 內容對比後發現:
[root@db1 rules.d]# /lib/udev/scsi_id -g -u /dev/sdg --- 該塊磁碟是新盤,未使用
36000c293ef0d560ff854306446331b79
[root@db1 rules.d]# /lib/udev/scsi_id -g -u /dev/sdh
36000c297777b8958d4d4dd5cd7ddbc47
1.1.2 將未使用磁碟進行掛載
目標:/dev/sdg 到ASM 磁碟組2 即ARCH 當中
(1 )首先修改檔案99-x-asmdisk_new.rules ,修改完後如下內容:
[root@db1 rules.d]# more 99-x-asmdisk_new.rules
KERNEL=="sd?", ENV{ID_SERIAL}=="36000c29c5362298e7a9898225a9f8ed6", SYMLINK+="asmdiskb", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd?", ENV{ID_SERIAL}=="36000c2963776a39f75310d2f2bd98287", SYMLINK+="asmdiskc", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd?", ENV{ID_SERIAL}=="36000c29dd4c14aa6a5e4f77f40427565", SYMLINK+="asmdiskd", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd?", ENV{ID_SERIAL}=="36000c292b56645878eb55e7811673ae2", SYMLINK+="asmdiske", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd?", ENV{ID_SERIAL}=="36000c29ec780367d4c1f845c880f7f0e", SYMLINK+="asmdiskf", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd?", ENV{ID_SERIAL}=="36000c297777b8958d4d4dd5cd7ddbc47", SYMLINK+="asmdiskg", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd?", ENV{ID_SERIAL}=="36000c293ef0d560ff854306446331b79", SYMLINK+="asmdiskh", OWNER="grid", GROUP="asmadmin", MODE="0660" ----增加新行
(2 )重新載入udev 檔案內容並啟動
[root@db1 rules.d]# udevadm control --reload-rules
[root@db1 rules.d]# start_udev
Starting udev: [ OK ]
啟動完之後可看到新加的磁碟 /dev/asmdiskh -> sdg
[root@db1 rules.d]# ls -l /dev/asm
total 0
[root@db1 rules.d]# ls -l /dev/asm*
lrwxrwxrwx 1 root root 3 May 19 15:13 /dev/asmdiskb -> sdf
lrwxrwxrwx 1 root root 3 May 19 15:13 /dev/asmdiskc -> sde
lrwxrwxrwx 1 root root 3 May 19 15:13 /dev/asmdiskd -> sdd
lrwxrwxrwx 1 root root 3 May 19 15:13 /dev/asmdiske -> sdb
lrwxrwxrwx 1 root root 3 May 19 15:13 /dev/asmdiskf -> sdc
lrwxrwxrwx 1 root root 3 May 19 15:13 /dev/asmdiskg -> sdh
lrwxrwxrwx 1 root root 3 May 19 15:13 /dev/asmdiskh -> sdg
(3 )另一個節點做同樣的處理
[root@db2 rules.d]# vi 99-x-asmdisk_new.rules
[root@db2 rules.d]# udevadm control --reload-rules
[root@db2 rules.d]# start udev
start: Unknown job: udev
[root@db2 rules.d]# start_udev
Starting udev: [ OK ]
[root@db2 rules.d]# ls -l /dev/asm*
lrwxrwxrwx 1 root root 3 May 19 15:17 /dev/asmdiskb -> sdf
lrwxrwxrwx 1 root root 3 May 19 15:17 /dev/asmdiskc -> sde
lrwxrwxrwx 1 root root 3 May 19 15:17 /dev/asmdiskd -> sdd
lrwxrwxrwx 1 root root 3 May 19 15:17 /dev/asmdiske -> sdb
lrwxrwxrwx 1 root root 3 May 19 15:17 /dev/asmdiskf -> sdc
lrwxrwxrwx 1 root root 3 May 19 15:17 /dev/asmdiskg -> sdh
lrwxrwxrwx 1 root root 3 May 19 15:17 /dev/asmdiskh -> sdg
/dev/asm:
total 0
1.1.3 在ASM 環境中將磁碟加入到磁碟組中:
(1 )使用GRID 使用者進入ASM 例項中,查詢ASM 磁碟已經能看到該磁碟情況:
SQL> select GROUP_NUMBER,DISK_NUMBER,MOUNT_STATUS,STATE,TOTAL_MB,PATH,NAME from v$asm_disk order by GROUP_NUMBER,DISK_NUMBER; GROUP_NUMBER DISK_NUMBER MOUNT_S STATE TOTAL_MB PATH NAME ------------ ----------- ------- -------- ---------- -------------------- -------------------- 0 0 CLOSED NORMAL 0 /dev/asmdiskh 1 0 CACHED NORMAL 51200 /dev/asmdiske DATA_0000 1 1 CACHED NORMAL 51200 /dev/asmdiskf DATA_0001 2 0 CACHED NORMAL 20480 /dev/asmdiskg ARCH_0000 3 0 CACHED NORMAL 1024 /dev/asmdiskb OCR_0000 3 1 CACHED NORMAL 1024 /dev/asmdiskc OCR_0001 3 2 CACHED NORMAL 1024 /dev/asmdiskd OCR_0002 7 rows selected.
(2 )使用命令將磁碟加入到組ARCH 中。
使用 sqlplus ‘/as sysasm’ 登入
SQL> alter diskgroup ARCH ADD DISK '/dev/asmdiskh';
檢視磁碟組容量已經增加
SQL> select NAME,FREE_MB,TOTAL_MB FROM V$ASM_DISKGROUP; NAME FREE_MB TOTAL_MB ------------------------------ ---------- ---------- DATA 99315 102400 ARCH 39294 40960 OCR 2787 3072
確認另一個節點情況:
SQL> select GROUP_NUMBER,DISK_NUMBER,MOUNT_STATUS,STATE,TOTAL_MB,PATH,NAME from v$asm_disk order by GROUP_NUMBER,DISK_NUMBER; GROUP_NUMBER DISK_NUMBER MOUNT_S STATE TOTAL_MB PATH NAME ------------ ----------- ------- -------- ---------- -------------------- -------------------- 1 0 CACHED NORMAL 51200 /dev/asmdiske DATA_0000 1 1 CACHED NORMAL 51200 /dev/asmdiskf DATA_0001 2 0 CACHED NORMAL 20480 /dev/asmdiskg ARCH_0000 2 1 CACHED NORMAL 20480 /dev/asmdiskh ARCH_0001 3 0 CACHED NORMAL 1024 /dev/asmdiskb OCR_0000 3 1 CACHED NORMAL 1024 /dev/asmdiskc OCR_0001 3 2 CACHED NORMAL 1024 /dev/asmdiskd OCR_0002 7 rows selected.
至此,磁碟ASM 擴充套件完畢。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/681781/viewspace-2693002/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ASM 磁碟組的建立及擴容ASM
- ASM磁碟組擴容操作文件ASM
- ubuntu 擴充套件磁碟空間Ubuntu套件
- windows系統磁碟擴容/擴充套件Windows套件
- Oracle ASM磁碟組擴容(AIX7.1)OracleASMAI
- Oracle RAC環境下ASM磁碟組擴容OracleASM
- Linux虛擬機器擴充套件磁碟Linux虛擬機套件
- ASM磁碟組限制ASM
- 【IDL】 DICOM擴充套件模組套件
- 使用Kotlin擴充套件函式擴充套件Spring Data案例Kotlin套件函式Spring
- Linux 擴充套件磁碟分割槽(命令列操作)Linux套件命令列
- 【PHP】Mcrypt 擴充套件模組安裝及使用PHP套件
- Oracle RAC ASM磁碟組擴容時遇到的VIP漂移OracleASM
- 基於裸裝置的ASM磁碟組擴容方案ASM
- 遷移ASM磁碟組ASM
- kotlin 擴充套件(擴充套件函式和擴充套件屬性)Kotlin套件函式
- linux建立新分割槽擴充套件磁碟空間Linux套件
- 如何檢視Oracle RAC的asm磁碟的udev對應關係OracleASMdev
- python使用ctypes呼叫擴充套件模組的例項方法Python套件
- Source insight擴充套件宏使用套件
- 使用ctypes來擴充套件Python套件Python
- 使用cython擴充套件python庫套件Python
- 【ASM】Oracle asm磁碟被格式化,如何掛載該磁碟組ASMOracle
- 【ASM】Oracle asm刪除磁碟組注意事項ASMOracle
- 有未分配的磁碟卻不能擴充套件卷怎麼解決 有未分配的磁碟卻不能擴充套件卷解決方法套件
- 【Kotlin】擴充套件屬性、擴充套件函式Kotlin套件函式
- Solon詳解(六)- Solon的校驗擴充套件框架使用與擴充套件套件框架
- ASM磁碟組更換磁碟的操作方法ASM
- vm exsi 擴充套件windows虛擬機器磁碟空間套件Windows虛擬機
- 表單驗證使用擴充套件套件
- tonyenc加密擴充套件使用方法加密套件
- 12C__單機安裝Grid+Oracle的方法,ASM使用UDEV進行磁碟繫結OracleASMdev
- 擴充套件工具套件
- Sanic 擴充套件套件
- Mybatis擴充套件MyBatis套件
- SpringMVC 擴充套件SpringMVC套件
- ORACLE 擴充套件Oracle套件
- Oracle RAC日常運維-ASM磁碟擴容Oracle運維ASM