其他
ASM 翻译系列第二十四弹:ASM Internal ASM files number 10 and 11
原作者:Bane Radulovic
译者: 郭旭瑞
审核: 魏兴华
DBGeeK社群联合出品
uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1020(asmadmin),1021(asmdba),1031(dba)
$ id oracle
uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1021(asmdba),1031(dba)
$ id oracle1
uid=1102(oracle1) gid=1033(dba1) groups=1033(dba1)
$ id oracle2
uid=1103(oracle2) gid=1034(dba2) groups=1034(dba2)
u.os_id "OS ID",
u.os_name "OS user",
u.user_number "ASM user#",
g.usergroup_number "ASM group#",
g.name "ASM user group"
FROM v$asm_user u, v$asm_usergroup g, v$asm_usergroup_member m
WHERE u.group_number=g.group_number and u.group_number=m.group_number
and u.user_number=m.member_number
and g.usergroup_number=m.usergroup_number
ORDER BY 1, 2;
Disk group# OS ID OS user ASM user# ASM group# ASM user group
----------- ----- ------- --------- ---------- --------------
1 1100 grid 1 3 GRIDTEAM
1101 oracle 2 1 DBATEAM1
1102 oracle1 3 2 DBATEAM2
1103 oracle2 4 2 DBATEAM2
2 1101 oracle 2 1 DBATEAM1
x.disk_kffxp "Disk#",
x.xnum_kffxp "Extent",
x.au_kffxp "AU",
d.name "Disk name"
FROM x$kffxp x, v$asm_disk_stat d
WHERE x.group_kffxp=d.group_number
and x.disk_kffxp=d.disk_number
and d.group_number=1
and x.number_kffxp in (10, 11)
ORDER BY 1, 2;
File# Disk# Extent AU Disk name
---------- ---------- ---------- ---------- ------------------------------
10 0 0 2139 ASMDISK5
1 0 2139 ASMDISK6
11 0 0 2140 ASMDISK5
1 0 2140 ASMDISK6
kfbh.endian: 1 ; 0x000: 0x01
kfbh.hard: 130 ; 0x001: 0x82
kfbh.type: 24 ; 0x002: KFBTYP_USERDIR
...
kfzude.user: 1100 ; 0x038: length=4
...
$ while (( $b <= 4 ))
do
kfed read /dev/oracleasm/disks/ASMDISK5 aun=2139 blkn=$b | grep kfzude.user
let b=b+1
done
kfzude.user: 1100 ; 0x038: length=4
kfzude.user: 1101 ; 0x038: length=4
kfzude.user: 1102 ; 0x038: length=4
kfzude.user: 1103 ; 0x038: length=4
$ while (( $b <= 3 ))
do
kfed read /dev/oracleasm/disks/ASMDISK5 aun=2140 blkn=$b | grep kfzgde.name
let b=b+1
done
kfzgde.name: DBATEAM1 ; 0x03c: length=8
kfzgde.name: DBATEAM2 ; 0x03c: length=8
kfzgde.name: GRIDTEAM ; 0x03c: length=8
郭旭瑞,沃趣科技产品交付部经理,负责QData Cloud高性能数据库云平台、QBackup数据库秒级备份恢复云平台等产品的整体交付管理与技术支持、维保服务工作。个人网站:www.dbalex.com
点击“原文阅读”,即可获取【Oracle ASM翻译系列】前二十三期翻译文章
↓↓↓