WARNING: You are creating/reusing datafile

WARNING: You are creating/reusing datafile /dev/rlvvg01_undotbs1.

WARNING: Oracle recommends creating new datafiles on devices with zero offset. The command "/usr/sbin/mklv -y LVname -T O -w n -s n -r n VGname NumPPs" can be used. Please contact Oracle customer support for more details.



网上查了下资料,发现是由于数据库创建时,裸设备未使用-T O参数,一般情况下,AIX 的逻辑卷前 4k 用于存储 control block (LVCB),在 Oracle 9iR2 之前,Oracle 软件自动跳过这 4k 而不用。这带来了一个潜在的问题,当 Oracle 的 db_block_size 大于 4k 的时候,一个 Block 可能跨在两个 PV/LUN/磁盘上。这样当系统崩溃的时候,很有可能造成大量的 IO 不完整,一个 PV 上 IO 写入,另一边可能未完成,启动 Oracle 的时候将会看到 ORA-1578 错误,这几乎是致命的。

解决方式有2种:

方案A:
1.    修改VG为scarable vg
#smit chvg
2.    用以下命令把lv的整个数据向前移动4K:dd if=/dev/lvname of=/dev/lvname  seek=0 skip=1 bs=4k

如:

dd if=/dev/rR_ZLTOOLSTMP2 of=/dev/rR_ZLTOOLSTMP2  seek=0 skip=1 bs=4k

方案B:
1.修改VG为scarable vg
#smit chvg
 2.重建裸设备
oraclevg
mklv -y'rR_ZLTOOLSTMP2' -t ‘raw’ -T O oraclevg 8
.....

3.    属性修改(两个节点都要操作)
#cd /dev
chown oracle:dba /dev/rcv*
chmod 755 /dev/ rcv*
4.    重建库
#su – oracle
$dbca



AIX上裸设备WARNING: Oracle recommends creating new datafiles on devices with zero offset.

在ITPUB上看到有人提问:

创建lv的时候 mklv -T O,怎么还在alert log里看到warning  : Oracle recommends creating new datafiles on devices with zero offset.

下面红字是原贴的内容:

环境
             RAC(oracle 10G )+AIX+HA+裸设备
操作 追加数据文件 扩充表空间
              #mklv -y'rkk_data02' -T O -w'n' -s'n' -r'n' -t raw dzz 240 hdiskpower3 rkk_data02
               rkk_data02
             # pwd
权限在2个节点都改过

SQL> alter tablespace DATA add datafile '/dev/rrk_data02' size 25000m;
Tablespace altered.

# tail -f alert_kk1.log
Wed Feb 16 6:30:12 2011
alter tablespace DATA01 add datafile '/dev/rrkk_data02' size 25000m
Wed Feb 16 6:30:12 2011
WARNING: You are creating datafile /dev/rrkk_data02.
WARNING: Oracle recommends creating new datafiles on devices with zero offset. The command "/usr/sbin/mklv -y LVname -T O -w n -s n -r n VGname NumPPs" can be used. Please contact Oracle customer support for more details.
Wed Feb 16 6:35:12 2011
WARNING: You are creating/reusing datafile /dev/rrkk_data02.
WARNING: Oracle recommends creating new datafiles on devices with zero offset. The command "/usr/sbin/mklv -y LVname -T O -w n -s n -r n VGname NumPPs" can be used. Please contact Oracle customer support for more details.
Completed: alter tablespace DATA01 add datafile '/dev/rrkk_data02' size 25000m

其实揪其原因,还是文档没看到位.
在Oracle的官方文档里,创建lv之前,创建vg的命令是这样写的:

To create a volume group, enter a command similar to the following, or use SMIT (smit mkvg):

# /usr/sbin/mkvg -y VGname-B -s PPsize-V majornum-n \ -CPhysicalVolumes

可以看到,有-B参数,也就是要创建Big VG,如果不这样做会怎么样呢?下面引用AIX中mklv命令参数-T O的说明:

For big vg format volume groups, the -T O option indicates that the logical volume control block will not occupy the first block of the logical volume.Therefore, the space is available for application data. Applications can identify this type of logical volume with the IOC INFO ioctl. The logical volume has a device subtype of DS_LVZ. A logical volume created without this option has a device subtype of DS_LV. This option is ignored for old and scalable vg format volume groups.

说的很清楚了,这个-T O参数只对big vg起作用,对于old 和scalable vg参数会被忽略。

显然,光mklv加-T O是不够的,还要在创建VG的时候是Big VG。


重建vg  重建数据文件


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值