lsdg中的Usable_file_MB 为什么是负值?

lsdg中的Usable_file_MB 为什么是负值?

Negative Values of USABLE_FILE_MB Due to the relationship between FREE_MB, REQUIRED_MIRROR_FREE_MB, and USABLE_FILE_MB, USABLE_FILE_MB can go negative. Although this is not necessarily a critical situation, it does mean that:

  • Depending on the value of FREE_MB, you may not be able to create new files.

  • The next failure may result in files with reduced redundancy.

If USABLE_FILE_MB becomes negative, it is strongly recommended that you add more space to the disk group as soon as possible.

[@more@]
  1. ASMCMD> lsdg
  2. State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name
  3. MOUNTED NORMAL Y 512 4096 1048576 144069764 10904234 13097251 -1096508 0 DATA1/

  4. SQL> select FAILGROUP,sum(total_mb-free_mb ),count(*)
  5. 2 from v$asm_disk
  6. 3 where name is not null
  7. 4 group by FAILGROUP;

  8. FAILGROUP |SUM(TOTAL_MB-FREE_MB)| COUNT(*)
  9. ------------------------------------------------------------|---------------------|----------
  10. DATA1_FG1 | 66713856| 124
  11. DATA1_FG2 | 66713824| 124
复制代码
由于做了两路镜像, 总的可用空间是(Total_MB - Req_mir_free_MB)/2 即
(144069764-13097251)/2=65486256MB

我们看到, v$asm_disk中显示两个failgroup都占用了约66713856 MB, 那么差值
66713856 - 65486256=1227600MB是从哪里多出来的呢?
会不会跟 Usable_file_MB有关系?

由于lsdg的信息同时也在v$asm_diskgroup中,我们看一下doc中对这个视图的解释
V$ASM_DISKGROUP displays one row for every ASM disk group discovered by the ASM instance on the node.
TOTAL_MB
Total capacity of the disk group (in megabytes)
FREE_MB
Unused capacity of the disk group (in megabytes)
REQUIRED_MIRROR_FREE_MB
Amount of space that is required to be available in a given disk group in order to restore redundancy after one or more disk failures. The amount of space displayed in this column takes mirroring effects into account.
USABLE_FILE_MB
Amount of free space that can be safely utilized taking mirroring into account and yet be able to restore redundancy after a disk failure


总结一下:
1) V$ASM_DISKGROUP.TOTAL_MB 对应到lsdg中的Total_MB
它不会考虑到镜像的因素, 是把所有failgroup中所有磁盘的总空间
2) V$ASM_DISKGROUP.FREE_MB 对应到lsdg中的 Free_MB
同理,它也不会考虑到mirror因素, 指目前总的可用空间

3) REQUIRED_MIRROR_FREE_MB 指为了使diskgroup能在一个或多个磁盘损坏后能够恢复冗余(redundancy),磁盘组中应该保留的剩余空间.

4) USABLE_FILE_MB 指能被"安全"利用的总空间, 即在考虑到磁盘损坏后能够恢复以前的冗余水平的前提下,可以使用的空间

我们看一个例子
ASMCMD> lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name
MOUNTED NORMAL N 512 4096 1048576 144069764 42723226 13097251 14812987 0 DATA1/
(144069764-13097251)/2

按上面解释可知
这个两路镜像的diskgroup中
可以使用的总空间(不考虑oracle所说的安全使用的情况)为 144069764/2=72034882MB
目前可以使用的总空间(不考虑到安全使用)为42723226/2=21361613MB
可以安全使用的总空间是 (144069764-13097251)/2=65486256.5 MB
目前可以安全使用的空间是(42723226-13097251)/2=14812987.5MB, 即Usable_file_MB 的值

如果这个值为负值,说明Free_MB < Req_mir_free_MB , 即磁盘组如果有一个磁盘失效,是不能有效恢复成redundancy的.
处在"不安全"的状态下.
在实际运营中,有磁盘失败时,一般都不是依赖于asm在现有online磁盘上基础上去恢复冗余,而是马上加新的存储(或者利用备用的设备),add disk之后再保证它达
到失败之前的冗余级别.
所以,Usable_file_MB 只是反映了当前"安全可利用的剩余空间", 只要free_mb为正,就没有问题.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/1933/viewspace-1054177/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/1933/viewspace-1054177/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值