在采用asmlib作为asm驱动时,此时,通过v$asm_disk视图无法确认具体物理磁盘:
SQL> select disk_number,path from v$asm_disk
2 where group_number=1;
DISK_NUMBER PATH
----------- ------------
0 ORCL:VOL12
1 ORCL:VOL13
可以通过如下的几种方法实现:
1、dd方法:
[root@rac1 ~]# dd if=/dev/sdb13 bs=1 count=45 |hexdump -c |more
45+0 records in
45+0 records out
45 bytes (45 B) copied, 9.4e-05 seconds, 479 kB/s
0000000 001 202 001 001 \0 \0 \0 \0 \0 \0 \0 200 253 243 245 371
0000010 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
0000020 O R C L D I S K V O L 1 2
000002d
这可以确定/dev/sdb13为VOL12。
2、通过major号确定:
[root@rac1 ~]# ls -l /dev/oracleasm/disks/VOL12
brw-rw---- 1 oracle oinstall 8, 29 May 15 22:02 /dev/oracleasm/disks/VOL12
[root@rac1 ~]# ls -l /dev/sd* |grep "8, 29"
brw-r----- 1 root disk 8, 29 May 15 22:02 /dev/sdb13
[grid@node2 ~]$ cd /dev/oracleasm/disks/
[grid@node2 disks]$ ll
total 0
brw-rw---- 1 grid oinstall 8, 33 Mar 10 12:04 ARCHDISK
brw-rw---- 1 grid oinstall 8, 49 Mar 10 12:04 DATADISK
brw-rw---- 1 grid oinstall 8, 65 Mar 10 12:04 OVDISK
[grid@node2 disks]$ ls -l /dev/sd* |grep "8, 33"
brw-rw---- 1 grid oinstall 8, 33 Mar 10 12:04 /dev/sdc1
[grid@node2 disks]$ ls -l /dev/sd* |grep "8, 49"
brw-r----- 1 root disk 8, 49 Mar 10 12:04 /dev/sdd1
[grid@node2 disks]$ ls -l /dev/sd* |grep "8, 65"
brw-rw---- 1 grid oinstall 8, 65 Mar 10 12:04 /dev/sde1
[grid@node2 disks]$