ocfs2 and configfs.ko

用户尝试在Fedora 3上配置OCFS2集群文件系统及RAC 10g,遇到OCFS2 Console配置失败与O2CB驱动加载configfs模块时出现问题。缺少必要的配置文件,并且尝试手动创建。加载configfs模块时提示找不到模块。

ocfs2 and configfs.ko

Mandar P Vengurlekar mandar.p.vengurlekar at gmail.com
Tue May 31 20:09:58 CDT 2005

 


Hi
I am new to linux and clustering, but I am trying to setup ocfs2 and rac10g on fedora 3 (Linux linux2 2.6.9-5.0.3.EL.orafw1smp #1 SMP Mon Mar 7 22:29:31 PST 2005 i686 i686 i386 GNU/Linux)
have a dell 4700 and dell 3000 both with 1 GB RAM and a 250G maxtor share drive...( build your own 10grac ..from technet.oracle.com)
=======================
# rpm -qa|grep -i ocfs2
ocfs2-2.6.9-5.0.5.EL-0.99.9-1
ocfs2-tools-0.99.8-1
ocfs2console-0.99.8-1
# rpm -qa|grep -i kernel
kernel-smp-devel-2.6.9-5.0.3.EL.orafw1
kernel-2.6.11-1.27_FC3
kernel-devel-2.6.9-5.0.3.EL.orafw1
kernel-utils-2.4-13.1.49_FC3
kernel-2.6.9-1.667
kernel-doc-2.6.11-1.27_FC3
kernel-smp-2.6.9-5.0.3.EL.orafw1

I installed the ocfs2 tools,console. However two things:
=======================
1.when i ran ocfs2console as per the doc, it did not allow me to configure any cluster definition.
no /etc/ocfs2/cluster.conf file existed. no /etc/ocfs2 existed.

  so i created the /etdc/ocfs2/cluster.conf file manually
# cat /etc/ocfs2/cluster.conf
cluster:
node_count = 2
name = CLUSTER1

node:
ip_port = 7777
ip_address = 192.168.2.10
number = 0
name = int-linux1
cluster = CLUSTER1

node:
ip_port = 7777
ip_address = 192.168.2.20
number = 1
name = int-linux2
cluster = CLUSTER1

2. the load for o2cb failed.
===========================
# /etc/init.d/o2cb configure
Configuring the O2CB driver.

This will configure the on-boot properties of the O2CB driver.
The following questions will determine whether the driver is loaded on
boot.  The current values will be shown in brackets ('[]').  Hitting
<ENTER> without typing an answer will keep that current value.  Ctrl-C
will abort.

Load O2CB driver on boot (y/n) [y]: y
Cluster to start on boot (Enter "none" to clear) [MANDARCLUSTER]:
Writing O2CB configuration: OK
Loading module "configfs": Unable to load module "configfs"
Failed
# /etc/init.d/o2cb load
Loading module "configfs": Unable to load module "configfs"
Failed
#
========================
messages in the /var/log/messages:
May 31 20:01:01 linux2 crond(pam_unix)[4637]: session closed for user root
May 31 20:02:03 linux2 modprobe: FATAL: Module configfs not found.
May 31 20:04:00 linux2 last message repeated 2 times
May 31 20:04:39 linux2 modprobe: FATAL: Module configfs not found.
May 31 20:05:01 linux2 crond(pam_unix)[5016]: session opened for user root by (uid=0)
May 31 20:05:02 linux2 crond(pam_unix)[5016]: session closed for user root
May 31 20:07:10 linux2 init: Trying to re-exec init
May 31 20:10:01 linux2 crond(pam_unix)[9805]: session opened for user root by (uid=0)
May 31 20:10:01 linux2 crond(pam_unix)[9804]: session opened for user root by (uid=0)
May 31 20:10:01 linux2 crond(pam_unix)[9804]: session closed for user root
May 31 20:10:02 linux2 crond(pam_unix)[9805]: session closed for user root
May 31 20:10:10 linux2 modprobe: FATAL: Module configfs not found.
May 31 20:10:21 linux2 modprobe: FATAL: Module configfs not found.
===================
location of configfs.ko
# cd /
# find . -name configfs* -print
./lib/modules/2.6.9-5.0.5.EL/kernel/fs/configfs
./lib/modules/2.6.9-5.0.5.EL/kernel/fs/configfs/configfs.ko
find: ./proc/9051/task: No such file or directory
==================>---so i copied the configfs and ocfs2 directory to /lib/modules/2.6.9-5.0.3.EL.orafw1smp/kernel/fs
#cd /
# ls -alR configfs
configfs:
total 412
drwxr-xr-x   2 root root   4096 May 27 15:06 .
drwxr-xr-x  23 root root   4096 May 31 20:44 ..
-rw-r--r--   1 root root 406287 May 19 21:32 configfs.ko
# pwd
/lib/modules/2.6.9-5.0.3.EL.orafw1smp/kernel/fs
# ls -alR ocfs2
ocfs2:
total 5692
drwxr-xr-x   2 root root    4096 May 27 15:06 .
drwxr-xr-x  23 root root    4096 May 31 20:44 ..
-rw-r--r--   1 root root  318365 May 19 21:32 ocfs2_dlmfs.ko
-rw-r--r--   1 root root 1429939 May 19 21:32 ocfs2_dlm.ko
-rw-r--r--   1 root root 3424866 May 19 21:32 ocfs2.ko
-rw-r--r--   1 root root  620469 May 19 21:32 ocfs2_nodemanager.ko
====================
# vi modules.dep
# vi modules.alias
# vi modules.dep
# modprobe configfs
FATAL: Error inserting configfs (/lib/modules/2.6.9-5.0.3.EL.orafw1smp/kernel/fs/configfs/configfs.ko): Invalid module format
======================
Is there a separate version of configfs.ko for 2.6.9-5.0.3.EL.orafw1smp?

Regards,
Mandar Vengurlekar
 
<think>好的,我现在需要帮助用户排查和解决OCFS2多设备进程处于D状态(不可中断睡眠状态)的问题。首先,我需要回忆一下OCFS2的相关知识以及进程处于D状态的常见原因。 根据用户提供的引用内容,特别是引用[3]中提到的OCFS2的写流程和buffer_head的管理,可能涉及到I/O操作的问题。进程进入D状态通常是因为它在等待某个不可中断的资源,比如磁盘I/O完成。如果是OCFS2的多设备进程出现这种情况,可能需要检查文件系统挂载、网络连接、存储设备状态等。 首先,我应该建议用户检查OCFS2集群的健康状态,包括各个节点的网络连接是否正常,因为OCFS2是集群文件系统,依赖网络通信。然后,检查存储设备是否正常,比如NFS挂载是否有效,是否有硬件故障。用户提到的引用[1]中有关于NFS挂载和防火墙状态的测试,这可能相关,需要确认这些服务是否正常运行。 另外,查看系统日志(如/var/log/messages或journalctl)可以帮助发现错误信息。用户可能需要检查是否有I/O错误或超时的情况。引用[3]中提到的buffer_head和块设备的关系,如果块设备响应缓慢或不可达,可能导致进程在等待I/O时卡在D状态。 还有,OCFS2的配置是否正确,比如o2cb服务是否在线,如引用[1]中的systemctl status o2cb.service,需要确保这些服务处于活跃状态。如果o2cb服务有问题,可能导致文件系统无法正常操作,进而引发进程挂起。 此外,检查多路径配置是否正确,引用[2]中提到了multipathd的调整,可能存储路径的问题导致I/O阻塞。需要确认多路径设备是否正常,是否有路径切换或故障的情况。 可能还需要检查文件系统的挂载选项,比如vers=4是否正确,是否有权限问题。用户示例中使用了NFSv4,如果版本不匹配可能导致问题。同时,防火墙和SELinux设置(如引用[1]中的firewalld和getenforce状态)也需要检查,确保没有阻止必要的通信。 总结步骤应该是:先检查集群服务和网络,再确认存储设备和多路径配置,查看系统日志,验证文件系统挂载和配置,最后考虑性能问题或内核bug。如果这些步骤无法解决,可能需要收集更多诊断信息或联系支持。</think>### OCFS2多设备进程D状态问题排查步骤 #### 1. 检查集群基础服务状态 - **确认OCFS2集群服务**: ```bash systemctl status o2cb.service # 检查集群基础服务状态 systemctl status ocfs2.service # 检查文件系统驱动状态 o2cb.init status # 查看集群组件详细状态 ``` 确保服务显示`active (online)`,若状态异常需重启服务[^1]。 - **验证网络通信**: ```bash ping 其他节点IP # 检查节点间连通性 traceroute 存储设备IP # 排查网络延迟或路由问题 ``` #### 2. 诊断存储设备与I/O路径 - **检查多路径设备状态**: ```bash multipath -ll # 查看多路径设备拓扑 multipathd -k # 进入交互式多路径调试 > resize map [设备ID] # 重新调整多路径映射[^2] ``` - **验证NFS/SAN存储连接**: ```bash mount | grep ocfs2 # 查看挂载参数是否正确 nfsstat -m # 检查NFS挂载点状态 cat /proc/fs/ocfs2/devices # 查看OCFS2关联的块设备 ``` #### 3. 分析进程堆栈与内核状态 - **定位D状态进程**: ```bash ps aux | grep ' D ' # 筛选D状态进程 cat /proc/[PID]/stack # 查看进程内核堆栈 ``` 若堆栈显示`__lock_buffer`或`wait_on_buffer`,表明进程在等待buffer_head I/O完成[^3]。 - **检查I/O阻塞点**: ```bash iostat -x 1 # 查看设备I/O延迟 dmesg | grep ocfs2 # 检索内核级错误日志 ``` #### 4. 文件系统一致性检查 - **强制卸载并修复**: ```bash umount -l /mnt/ocfs2 # 强制卸载(谨慎操作) fsck.ocfs2 -y /dev/sdX # 执行文件系统检查 ``` #### 5. 高级调试方法 - **内核事件跟踪**: ```bash echo 1 > /proc/sys/kernel/softlockup_panic # 触发内核panic捕获死锁 perf record -g -p [PID] # 采集进程性能数据 ``` #### 典型解决方案 1. **临时恢复**:重启`o2cb`服务或故障节点 ```bash systemctl restart o2cb.service ``` 2. **永久修复**:升级OCFS2驱动版本,已知旧版本(如1.6.x)存在元数据锁竞争问题 3. **配置优化**:在`/etc/ocfs2/cluster.conf`中减少`heartbeat_dead_threshold`值以加快故障检测 相关问题
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值