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 upto 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>. To generate a lockname for  a  given
98       object, use the encode command.
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       encode filespec
157              Display the lockname for the filespec.
158
159
160       extent block#
161              Display the contents of the extent structure at block#.
162
163
164       findpath [<lockname>|<inode#>]
165              Display the pathname for the  inode  specified  by  lockname  or
166              inode#.  This command does not display all the hard-linked paths
167              for the inode.
168
169
170       fs_locks [-f <file>] [-l] [-B] [<lockname(s)>]...
171              Display the status of all locks known by the file  system.  This
172              command expects the debugfs filesystem to be mounted as mount -t
173              debugfs debugfs /sys/kernel/debug.  Use lockname(s) to limit the
174              output  to  the  given lock resources, -B to limit the output to
175              only the busy locks, -l to include contents of  the  lock  value
176              block  and  -f  <file>  to  specify  a  saved  copy of /sys/ker‐
177              nel/debug/ocfs2/<UUID>/locking_state.
178
179
180       group block#
181              Display the contents of the group descriptor at block#.
182
183
184       hb     Display the contents of the heartbeat system file.
185
186
187       help, ?
188              Print the list of commands understood by debugfs.ocfs2.
189
190
191       icheck block# ...
192              Display the inodes that use the one or more blocks specified  on
193              the  command line.  If the inode is a regular file, also display
194              the corresponding logical block offset.
195
196
197       lcd directory
198              Change  the  current  working  directory  of  the  debugfs.ocfs2
199              process to the directory on the native filesystem.
200
201
202       locate [<lockname>|<inode#>] ...
203              Display all pathnames for the inode(s) specified by locknames or
204              inode#s.
205
206
207       logdump node#
208              Display the contents of the journal for node node#.
209
210
211       ls [-l] filespec
212              Print the listing  of the files in the directory  filespec.  The
213              -l flag will list files in the long format.
214
215
216       ncheck [<lockname>|<inode#>] ...
217              See locate.
218
219
220       open device
221              Open the filesystem on device.
222
223
224       quit, q
225              Quit debugfs.ocfs2.
226
227
228       rdump [-v] filespec outdir
229              Recursively   dump  directory  filespec  and  all  its  contents
230              (including regular files, symbolic links and other  directories)
231              into  the  outdir  which  should be an existing directory on the
232              native filesystem.
233
234
235       slotmap
236              Display the contents of the slotmap system file.
237
238
239       stat filespec
240              Display the contents of the inode structure for the filespec.
241
242
243       stats [-h] [-s backup-number]
244              Display the contents of the superblock. Use -s to display a spe‐
245              cific backup superblock. Use -h to hide the inode.
246
247
248       xattr [-v] <filespec>
249              Display extended attributes associated with the given filespec.
250
251

ACKNOWLEDGEMENT

253       This tool has been modelled after debugfs, a debugging tool for ext2.
254
255

SEE ALSO

257       mkfs.ocfs2(8)  fsck.ocfs2(8) tunefs.ocfs2(8) mounted.ocfs2(8) ocfs2con‐
258       sole(8) o2image(8) o2cb(7)
259
260

AUTHOR

262       Oracle Corporation
263
264
266       Copyright © 2004, 2009 Oracle. All rights reserved.
267
268
269
270Version 1.4.3                     April 2009                  debugfs.ocfs2(8)
Impressum