7.3.1 Recommended Tools for Debugging

To you want to capture an oops trace, it is recommended that you set up netconsole on the nodes.

If you want to capture the DLM's network traffic between the nodes, you can use tcpdump. For example, to capture TCP traffic on port 7777 for the private network interface eth1, you could use a command such as the following:

# tcpdump -i eth1 -C 10 -W 15 -s 10000 -Sw /tmp/`hostname -s`_tcpdump.log \
  -ttt 'port 7777' &

You can use the debugfs.ocfs2 command, which is similar in behavior to the debugfs command for the ext3 file system, and allows you to trace events in the OCFS2 driver, determine lock statuses, walk directory structures, examine inodes, and so on.

For more information, see the debugfs.ocfs2(8) manual page.

The o2image command saves an OCFS2 file system's metadata (including information about inodes, file names, and directory names) to an image file on another file system. As the image file contains only metadata, it is much smaller than the original file system. You can use debugfs.ocfs2 to open the image file, and analyze the file system layout to determine the cause of a file system corruption or performance problem.

For example, the following command creates the image /tmp/sda2.img from the OCFS2 file system on the device /dev/sda2:

# o2image /dev/sda2 /tmp/sda2.img

For more information, see the o2image(8) manual page.