oracle rac 时,ocfs2 仲裁磁盘无法加载

oracle rac 时,有第二个节点的,ocfs2 仲裁磁盘无法加载 
 在第一个节点上,该仲裁磁盘可以正常的加载

[root@guolinuxorcl1 ocfs2]# mount -t ocfs2 -o datavolume,nointr /dev/sdb1 /u02/oradata/orcl
[root@guolinuxorcl1 ocfs2]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
none on
/proc type proc (rw)
none on
/sys type sysfs (rw)
none on
/dev/pts type devpts (rw,gid=5,mode=620)
usbfs on
/proc/bus/usb type usbfs (rw)
/dev/sda1 on /boot type ext3 (rw)
none on
/dev/shm type tmpfs (rw)
none on
/proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on
/var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
configfs on
/config type configfs (rw)
ocfs2_dlmfs on
/dlm type ocfs2_dlmfs (rw)
/dev/sdb1 on /u02/oradata/orcl type ocfs2 (rw,_netdev,datavolume,nointr,heartbeat=local)

但是在第二个节点上却无法加载

[root@guolinuxorcl2 ~]# mounted.ocfs2 -d
Device FS UUID Label
/dev/sdb1 ocfs2 004883a4-f8b7-41be-b8b3-7954d02bfc64 oracrsfiles
[root@guolinuxorcl2 ~]# mounted.ocfs2
-f
Device FS Nodes
/dev/sdb1 ocfs2 Unknown: Bad magic number in inode

每次加载都报错

ocfs2_hb_ctl: Bad magic number in inode while reading uuid mount.ocfs2: Error when attempting to run /sbin/ocfs2_hb_ctl: "Operation not permitted"

解决办法如下

1、先重已加载的节点卸载掉该硬盘。

2、在无法加载的节点格式化该盘。

 记住用dd格式化,而不是fdisk,如果只是用fdisk删除分区和格式化,第二个节点上始终记录这个盘处于 bad magic状态

可以看到dd以后,sdb1 在ocfs2 的状态立刻改变了,但如果是只是fdisk 掉 sdb1,状态是不会变的,先dd,然后用fdisk重新分区。

[root@guolinuxorcl2 ~]# dd if=/dev/zero of=/dev/sdb1 bs=8192 count=2560
2560+0 records in
2560+0 records out
[root@guolinuxorcl2 ~]# mounted.ocfs2
-d
Device FS UUID Label
[root@guolinuxorcl2 ~]# fdisk
/dev/sdb

Command (m
for help): d
Selected partition
1

Command (m
for help): 1
1: unknown command
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d
delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition
's system id
u change display/entry units
v verify the partition table
w
write table to disk and exit
x extra functionality (experts only)

Command (m
for help): d
No partition
is defined yet!

Command (m
for help): w
The partition table has been altered!

Calling ioctl()
to re-read partition table.

WARNING: Re
-reading the partition table failed with error 16: Device or resource busy.
The kernel still
uses the old table.
The new table will be used at the next reboot.
Syncing disks.

3、在节点二上对该硬盘mount。

4、在节点一上对该硬盘mount。

总结:如果仲裁盘是新安装的系统,可以用该方法试着解决该错误。把仲裁盘dd格式化,然后重新加载。

posted @ 2011-05-16 01:35  疯狂的毛豆  阅读(1396)  评论(0编辑  收藏  举报