Recommended Debugging Tools and Practices
Use the following tools to troubleshoot OCFS2 issues:
-
Install netconsole on the nodes to capture an
oops
trace. -
Use the tcpdump command to capture the DLM's network traffic between nodes. For example, to capture TCP traffic on port 7777 for the private network interface
em2
, you could use the following command:sudo tcpdump -i em2 -C 10 -W 15 -s 10000 -Sw /tmp/`hostname -s`_tcpdump.log \ -ttt 'port 7777' &
-
Use the debugfs.ocfs2 command to trace events in the OCFS2 driver, view the status of locks, walk directory structures, examine inodes, and so on. This command is similar in behavior to the debugfs command that's used for the
ext3
file system.For more information, see the
debugfs.ocfs2(8)
manual page. -
Use the o2image command to save an OCFS2 file system's metadata, including information about inodes, file names, and directory names, to an image file on another file system. Because the image file contains only metadata, it's much smaller than the original file system. You can use the debugfs.ocfs2 command to open the image file and analyze the file system layout to discover the cause of a file system corruption or performance problem.
For example, to create the image
/tmp/sda2.img
from the OCFS2 file system on the device/dev/sda2
, you would use the following command:sudo o2image /dev/sda2 /tmp/sda2.img
For more information, see the
o2image(8)
manual page.