chenqq 发表于 2016-4-13 09:30:33

ocfs2挂载问题,求助

# cd /etc/ocfs2
# mor *
-bash: mor: command not found
# clear
# more *
node:
        ip_port = 7777
        ip_address = 192.168.2.100
        number = 0
        name = node1
        cluster = ocfs2

node:
        ip_port = 7777
        ip_address = 192.168.2.200
        number = 1
        name = node2
        cluster = ocfs2

cluster:
        node_count = 2
        name = ocfs2

# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   IdSystem
/dev/sda1   *         1      1275    10241406   83Linux
/dev/sda2            1276      1912   5116702+83Linux
/dev/sda3            1913      2294   3068415   82Linux swap / Solaris
/dev/sda4            2295      3916    13028715    5Extended
/dev/sda5            2295      2421   1020096   83Linux

Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   IdSystem
/dev/sdb1               1      1217   9775521    5Extended
/dev/sdb5               1         609   4891729+83Linux
# cd /etc/init.d
# ./o2cb status
Driver for "configfs": Loaded
Filesystem "configfs": Mounted
Driver for "ocfs2_dlmfs": Loaded
Filesystem "ocfs2_dlmfs": Mounted
Checking O2CB cluster ocfs2: Online
Heartbeat dead threshold = 31
Network idle timeout: 30000
Network keepalive delay: 2000
Network reconnect delay: 2000
Checking O2CB heartbeat: Not active
# mount -o datavolume,nointr -t ocfs2 /dev/sdb5 /oradata
#





# cd /etc/ocfs2
# more *
node:
        ip_port = 7777
        ip_address = 192.168.2.100
        number = 0
        name = node1
        cluster = ocfs2

node:
        ip_port = 7777
        ip_address = 192.168.2.200
        number = 1
        name = node2
        cluster = ocfs2

cluster:
        node_count = 2
        name = ocfs2

# cd /etc/init.d
# ./o2cb status
Driver for "configfs": Loaded
Filesystem "configfs": Mounted
Driver for "ocfs2_dlmfs": Loaded
Filesystem "ocfs2_dlmfs": Mounted
Checking O2CB cluster ocfs2: Online
Heartbeat dead threshold = 31
Network idle timeout: 30000
Network keepalive delay: 2000
Network reconnect delay: 2000
Checking O2CB heartbeat: Not active
# mount -o datavolume,nointr -t ocfs2 /dev/sdb5 /oradata
mount.ocfs2: Bad magic number in superblock while opening device /dev/sdb5
#



在虚拟机上oracle11g+ocfs2,在node2挂载不上,在这有两个问题请教一下仙贝们:

1、ocfs2文件系统搭建的时候,需要两个节点都要有一个大小一样的分区吗?还是两个节点公用一个节点上的分区?如果公用一个分区的话,如何实现node2的加载?

2、我上述使用的是每个节点下都有一个自己的分区,然后格式化挂载(只在节点1格式化,节点2只写了一下),在节点2挂载的时候出现超级块的报错

{:soso__3110130392203091378_3:} 拜托

chenqq 发表于 2016-4-13 10:10:19

当把第二节点的磁盘格式化成ocfs2之后,可以挂在,但是文件不共享
# ./o2cb status
Driver for "configfs": Loaded
Filesystem "configfs": Mounted
Driver for "ocfs2_dlmfs": Loaded
Filesystem "ocfs2_dlmfs": Mounted
Checking O2CB cluster ocfs2: Online
Heartbeat dead threshold = 31
Network idle timeout: 30000
Network keepalive delay: 2000
Network reconnect delay: 2000
Checking O2CB heartbeat: Active
#
:o
页: [1]
查看完整版本: ocfs2挂载问题,求助