1debugfs.ocfs2(8)              OCFS2 Manual Pages              debugfs.ocfs2(8)
2
3
4

NAME

6       debugfs.ocfs2 - OCFS2 file system debugger.
7

SYNOPSIS

9       debugfs.ocfs2 [-f cmdfile] [-R command] [-s backup] [-nwV?] [device]
10
11       debugfs.ocfs2 -l [tracebit ... [allow|off|deny]] ...
12
13       debugfs.ocfs2 -d, --decode lockname
14
15       debugfs.ocfs2 -e, --encode lock_type block_num [generation | parent]
16
17

DESCRIPTION

19       The debugfs.ocfs2 program is an interactive file system debugger useful
20       in displaying on-disk OCFS2  filesystem  structures  on  the  specified
21       device.
22
23

OPTIONS

25       -d, --decode lockname
26              Display the information encoded in the lockname.
27
28
29       -e, --encode lock_type block_num [generation | parent]
30              Display  the  lockname  obtained  by encoding the arguments pro‐
31              vided.
32
33
34       -f, --file cmdfile
35              Executes the debugfs commands in cmdfile.
36
37
38       -i, --image
39              Specifies device is an o2image file created by o2image tool.
40
41
42       -l [tracebit ... [allow|off|deny]] ...
43              Control OCFS2 filesystem tracing by enabling and disabling trace
44              bits.  Do debugfs.ocfs2 -l to get the list of all trace bits.
45
46
47       -n, --noprompt
48              Hide prompt.
49
50
51       -R, --request command
52              Executes a single debugfs command.
53
54
55       -s, --superblock backup-number
56              mkfs.ocfs2 makes up to 6 backup copies of the superblock at off‐
57              sets 1G, 4G, 16G, 64G, 256G and 1T depending on the size of  the
58              volume.  Use this option to specify the backup, 1 thru 6, to use
59              to open the volume.
60
61
62       -w, --write
63              Opens the filesystem in RW mode. By default  the  filesystem  is
64              opened in RO mode.
65
66
67       -V, --version
68              Display version and exit.
69
70
71       -?, --help
72              Displays help and exit.
73
74

SPECIFYING FILES

76       Many  debugfs.ocfs2  commands take a filespec as an argument to specify
77       an inode (as opposed to a pathname) in the  filesystem  which  is  cur‐
78       rently  opened by debugfs.ocfs2. The filespec argument may be specified
79       in two forms. The first form is an inode number or lockname  surrounded
80       by  angle  brackets,  e.g., <32>. The second form is a pathname; if the
81       pathname is prefixed by a forward slash ('/'), then it  is  interpreted
82       relative  to  the  root  of the filesystem which is currently opened by
83       debugfs.ocfs2. If not, the path is interpreted relative to the  current
84       working directory as maintained by debugfs.ocfs2, which can be modified
85       using the command cd. If the pathname is prefixed by a  double  forward
86       slash ('//'), then it is interpreted relative to the root of the system
87       directory of the filesystem opened by debugfs.ocfs2.
88
89

LOCKNAMES

91       Locknames are specially formatted strings used by the  file  system  to
92       uniquely  identify  objects  in  the filesystem. Most locknames used by
93       OCFS2 are generated using the inode number and  its  generation  number
94       and  can  be decoded using the decode command or used directly in place
95       of an inode number in commands requiring a filespec.  Like  inode  num‐
96       bers,   locknames   need  to  be  enclosed  in  angle  brackets,  e.g.,
97       <M000000000000000040c40c044069cf>. Use the encode command  to  generate
98       all possible locknames for an object.
99
100

COMMANDS

102       This is a list of the commands which debugfs.ocfs2 supports.
103
104
105       bmap filespec logical_block
106              Display  the  physical block number corresponding to the logical
107              block number logical_block in the inode filespec.
108
109
110       cat filespec
111              Dump the contents of inode filespec to stdout.
112
113
114       cd filespec
115              Change the current working directory to filespec.
116
117
118       chroot filespec
119              Change the root directory to be the directory filespec.
120
121
122       close  Close the currently opened filesystem.
123
124
125       controld dump
126              Display information obtained from ocfs2_controld.
127
128
129       curdev Show the currently open device.
130
131
132       decode <lockname>
133              Display the inode number encoded in the lockname.
134
135
136       dirblocks <filespec>
137              Display the directory blocks associated with the given filespec.
138
139
140       dlm_locks [-f <file>] [-l] [<lockname(s)>]...
141              Display the status of all lock resources  in  the  o2dlm  domain
142              that  the  file  system is a member of. This command expects the
143              debugfs filesystem to be mounted as  mount  -t  debugfs  debugfs
144              /sys/kernel/debug.  Use  lockname(s)  to limit the output to the
145              given lock resources, -l to include contents of the  lock  value
146              block  and  -f  <file>  to  specify  a  saved  copy of /sys/ker‐
147              nel/debug/o2dlm/<DOMAIN>/locking_state.
148
149
150       dump [-p] filespec outfile
151              Dump the contents of the inode filespec to the output file  out‐
152              file.  If  the -p is given, set the owner, group, timestamps and
153              permissions information on outfile to match those of filespec.
154
155
156       dx_dump filespec
157              Display the indexed directory information for the  given  direc‐
158              tory.
159
160
161       dx_leaf <block#>
162              Display the contents of the given indexed directory leaf block.
163
164
165       dx_root <block#>
166              Display the contents of the given indexed directory root block.
167
168
169       dx_space filespec
170              Display the directory free space list.
171
172
173       encode filespec
174              Display the lockname for the filespec.
175
176
177       extent <block#>
178              Display the contents of the extent structure at block#.
179
180
181       findpath [<lockname>|<inode#>]
182              Display  the  pathname  for  the  inode specified by lockname or
183              inode#. This command does not display all the hard-linked  paths
184              for the inode.
185
186
187       frag filespec
188              Display the inode's number of extents to clusters ratio.
189
190
191       fs_locks [-f <file>] [-l] [-B] [<lockname(s)>]...
192              Display  the  status of all locks known by the file system. This
193              command expects the debugfs filesystem to be mounted as mount -t
194              debugfs debugfs /sys/kernel/debug.  Use lockname(s) to limit the
195              output to the given lock resources, -B to limit  the  output  to
196              only  the  busy  locks, -l to include contents of the lock value
197              block and -f  <file>  to  specify  a  saved  copy  of  /sys/ker‐
198              nel/debug/ocfs2/<UUID>/locking_state.
199
200
201       group <block#>
202              Display the contents of the group descriptor at block#.
203
204
205       grpextents <block#>
206              Display free extents in the chain group.
207
208
209       hb     Display the contents of the heartbeat system file.
210
211
212       help, ?
213              Print the list of commands understood by debugfs.ocfs2.
214
215
216       icheck block# ...
217              Display  the inodes that use the one or more blocks specified on
218              the command line.  If the inode is a regular file, also  display
219              the corresponding logical block offset.
220
221
222       lcd directory
223              Change  the  current  working  directory  of  the  debugfs.ocfs2
224              process to the directory on the native filesystem.
225
226
227       locate [<lockname>|<inode#>] ...
228              Display all pathnames for the inode(s) specified by locknames or
229              inode#s.
230
231
232       logdump [-T] slot#
233              Display  the  contents  of the journal for slot slot#. Use -T to
234              limit the output to just the summary of the inodes in the  jour‐
235              nal.
236
237
238       ls [-l] filespec
239              Print  the  listing  of the files in the directory filespec. The
240              -l flag will list files in the long format.
241
242
243       net_stats [-f <file>] [interval [count]]
244              Display the net statistics. This  command  expects  the  debugfs
245              filesystem  to  be mounted at /sys/kernel/debug. The interval is
246              in seconds. Use the -f parameter to  specify  a  saved  copy  of
247              /sys/kernel/debug/o2net/stats.
248
249
250       ncheck [<lockname>|<inode#>] ...
251              See locate.
252
253
254       open device
255              Open the filesystem on device.
256
257
258       quit, q
259              Quit debugfs.ocfs2.
260
261
262       rdump [-v] filespec outdir
263              Recursively   dump  directory  filespec  and  all  its  contents
264              (including regular files, symbolic links and other  directories)
265              into  the  outdir  which  should be an existing directory on the
266              native filesystem.
267
268
269       refcount [-e] filespec
270              Display the refcount block, and  optionally  its  tree,  of  the
271              specified inode.
272
273
274       slotmap
275              Display the contents of the slotmap system file.
276
277
278       stat [-t|-T] filespec
279              Display  the  contents  of the inode structure for the filespec.
280              The -t ("traverse") option  selects  traversal  of  the  inode's
281              metadata.   The extent tree, chain list, or other extra metadata
282              will be dumped.  This is the default.  The -T option  turns  off
283              traversal  to  reduce the I/O required when basic inode informa‐
284              tion is needed.
285
286
287       stat_sysdir
288              Display the contents of all objects in the system directory.
289
290
291       stats [-h] [-s backup-number]
292              Display the contents of the superblock. Use -s to display a spe‐
293              cific backup superblock. Use -h to hide the inode.
294
295
296       xattr [-v] <filespec>
297              Display extended attributes associated with the given filespec.
298
299

ACKNOWLEDGEMENT

301       This tool has been modelled after debugfs, a debugging tool for ext2.
302
303

SEE ALSO

305       fsck.ocfs2(8)    fsck.ocfs2.checks(8)    mkfs.ocfs2(8)   mount.ocfs2(8)
306       mounted.ocfs2(8)    o2cluster(8)    o2image(8)    o2info(1)    ocfs2(7)
307       tunefs.ocfs2(8)
308
309

AUTHOR

311       Oracle Corporation
312
313
315       Copyright © 2004, 2012 Oracle. All rights reserved.
316
317
318
319Version 1.8.6                    January 2012                 debugfs.ocfs2(8)
Impressum