Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

附录 C. GFS2 跟踪点和 debug glock 文件

本附录论述了 glock debugfs 界面和 GFS2 跟踪点。主要面向熟悉文件系统内部,并想要了解更多 GFS2 设计及如何 debug GFS2 具体问题的高级用户。

C.1. GFS2 跟踪点类型

There are currently three types of GFS2 tracepoints: glock (pronounced "gee-lock") tracepoints, bmap tracepoints and log tracepoints. These can be used to monitor a running GFS2 file system and give additional information to that which can be obtained with the debugging options supported in previous releases of Red Hat Enterprise Linux. Tracepoints are particularly useful when a problem, such as a hang or performance issue, is reproducible and thus the tracepoint output can be obtained during the problematic operation. In GFS2, glocks are the primary cache control mechanism and they are the key to understanding the performance of the core of GFS2. The bmap (block map) tracepoints can be used to monitor block allocations and block mapping (lookup of already allocated blocks in the on-disk metadata tree) as they happen and check for any issues relating to locality of access. The log tracepoints keep track of the data being written to and released from the journal and can provide useful information on that part of GFS2.
跟踪点的设计是尽量通用,就是说在使用 Red Hat Enterprise Linux 6 的过程中不需要更改 API。另一方面,这个界面的用户应了解这是一个 debug 界面,而且不是常规 Red Hat Enterprise Linux 6 API 组件的一部分,同时因为 Red Hat 不保证不会更改 GFS2 中的跟踪点界面。
跟踪点是 Red Hat Enterprise Linux 6 的通用特性,且可完全适用于 GFS2。特别是可将其用于 blktrace 架构部署,同时 blktrace 跟踪点还可与 GFS2 合用获得系统性能的更全面信息。根据跟踪点所处级别,它们可在很短时间内产生大量数据。其设计旨在启用它们时在系统中添加最小负载,但也不可避免地有一些影响。使用各种方法进行的过滤可帮助减少数据,并帮助集中获得对了解具体情况有帮助的信息。