日期:2014-05-16 浏览次数:20615 次
今天有朋友问11g中asm 的au size不为1m的情况下,datafile的au 分布是怎么样的?通过10g的方式去kfed read,
发现不对了,原帖地址:~~【高手请进】在oracle11g中通过kfed找到ASM AU空间分布信息?
下午花了一点时间研究了一下,其中还有些没有明白,不过基本上搞清楚了,下面是简单的实验过程:
开始我也没明白其中的关系,首先尝试用strace 去跟踪amdu的过程,我们知道amdu是可以直接抽取datafile的,开始
我是这样想的:既然amdu在读取asm disk的时候,可以直接将文件读取出来,那么也就比如需要现在知道该datafile的
au 分布情况,于是我使用strace 进行跟踪,完全没有搞明白,如下:
命令如下:strace -o amdu.log amdu -dis ‘/dev/sdb’ -extract data2.256
其中产生的部分log信息如下:
stat64("/dev/sdb", {st_mode=S_IFBLK|0777, st_rdev=makedev(8, 16), ...}) = 0 access("/dev/sdb", F_OK) = 0 statfs("/dev/sdb", {f_type=0x1021994, f_bsize=4096, f_blocks=129388, f_bfree=129358, f_bavail=129358, f_files=129388, f_ffree=128781, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0 open("/dev/sdb", O_RDWR|O_LARGEFILE) = 7 mmap2(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb759d000 --257 _llseek(7, 0, [0], SEEK_SET) = 0 read(7, "\1\202\1\1\0\0\0\0\0\0\0\200\2519\325\222\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1048576) = 1048576 _llseek(7, 1048576, [1048576], SEEK_SET) = 0 --256 read(7, "\1\202\3\1\0\1\0\0\0\0\0\200\241?\303\257\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1048576) = 1048576 _llseek(7, 2097152, [2097152], SEEK_SET) = 0 --512 read(7, "\1\202\3\1\0\2\0\0\0\0\0\200\241\374\301\257\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1048576) = 1048576 _llseek(7, 3145728, [3145728], SEEK_SET) = 0 --768 read(7, "\1\202\3\1\0\3\0\0\0\0\0\200\241\275\307\257\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1048576) = 1048576 stat64("/dev/sdb", {st_mode=S_IFBLK|0777, st_rdev=makedev(8, 16), ...}) = 0 access("/dev/sdb", F_OK) = 0 statfs("/dev/sdb", {f_type=0x1021994, f_bsize=4096, f_blocks=129388, f_bfree=129358, f_bavail=129358, f_files=129388, f_ffree=128781, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0 open("/dev/sdb", O_RDWR|O_LARGEFILE) = 8 _llseek(8, 8384512, [8384512], SEEK_SET) = 0 ---2047 read(8, "\1\202\23\1\377\7\0\0\0\0\0\200_\204\324\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096 open("/home/ora11g/11.2/grid/rdbms/mesg/amduus.msb", O_RDONLY) = 9 fcntl64(9, F_SETFD, FD_CLOEXEC) = 0 lseek(9, 0, SEEK_SET) = 0 read(9, "\25\23\"\1\23\3\t\t\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 256) = 256 lseek(9, 512, SEEK_SET) = 512 read(9, "Z\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512 lseek(9, 1024, SEEK_SET) = 1024 read(9, "\311\0\323\0/\1\223\1Z\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512 lseek(9, 2048, SEEK_SET) = 2048 read(9, "\n\0\312\0\1\0D\0\313\0\1\0\\\0\314\0\1\0\200\0\315\0\1\0\257\0\316\0\2\0\333\0"..., 512) = 512 lseek(9, 512, SEEK_SET) = 512 read(9, "Z\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512 lseek(9, 1024, SEEK_SET) = 1024 read(9, "\311\0\323\0/\1\223\1Z\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512 lseek(9, 1536, SEEK_SET) = 1536 read(9, "\f\0d\0\0\0P\0e\0\1\0q\0f\0\1\0\244\0g\0\1\0\315\0h\0\2\0\334\0"..., 512) = 512 write(2, "AMDU-00204: Disk N0001 is in cur"..., 63) = 63 write(2, "AMDU-00201: Disk N0001: '/dev/sd"..., 35) = 35 write(4, "AMDU-00204: Disk N0001 is in cur"..., 63) = 63 write(4, "AMDU-00201: Disk N0001: '/dev/sd"..., 35) = 35 write(4, "** HEARTBEAT DETECTED **\n", 25) = 25 munmap(0xb759d000, 1052672) = 0 close(7) = 0 close(8) = 0 wr