我们知道用下面的方法可创建 ASM 磁盘,然后再创建逻辑的ASM组
以 root 用户身份创建 ASM 磁盘。
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdc1
Marking disk "/dev/sdc1" as an ASM disk: [ OK ]
# /etc/init.d/oracleasm createdisk VOL2 /dev/sdd1
Marking disk "/dev/sdd1" as an ASM disk: [ OK ]
# /etc/init.d/oracleasm createdisk VOL3 /dev/sde1
Marking disk "/dev/sde1" as an ASM disk: [ OK ]
Verify that the ASM disks are visible from every node.
# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks: [ OK ]
# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
但是我问题是,如果通过ASM磁盘或是磁盘组找到ASM磁盘对应的物理磁盘呢?
也就是上面方法的反向查询,因为有些时候ASM磁盘是由以前管理员创建,新的管理员要对以前系统存储进行查询了解。
比如:现在知道ASM磁盘组+DATA由VOL1、VOL2组成,现在我想知道VOL1和VOL2分别是哪些物理磁盘(VOL1对应/dev/sdc1,VOL2对应VOL2 /dev/sdd1)组成的?
#/etc/init.d/oracleasm querydisk -d VOLDB
Disk "VOLDB" is a valid ASM disk on device [8, 33]#ll /dev/sd*1
brw-r----- 1 root disk 8, 1 Apr 12 16:38 /dev/sda1
brw-r----- 1 root disk 8, 17 Apr 12 16:39 /dev/sdb1
brw-r----- 1 root disk 8, 33 Apr 12 16:39 /dev/sdc1
brw-r----- 1 root disk 8, 49 Apr 12 16:39 /dev/sdd1
我的例子中8, 33是sdc1