debugfs.ocfs2
Section: OCFS2 Manual Pages (8)
Updated: February 2007
Index
NAME
debugfs.ocfs2 - OCFS2 file system debugger.
SYNOPSIS
debugfs.ocfs2 [-f cmdfile] [-R command] [-s backup] [-nwV?] [device]
- debugfs.ocfs2 -l [tracebit ... [allow|off|deny]] ...
-
- debugfs.ocfs2 -d, --decode lockname
-
- debugfs.ocfs2 -e, --encode lock_type inode_num generation
-
DESCRIPTION
The debugfs.ocfs2 program is an interactive file system debugger useful
in displaying on-disk OCFS2 filesystem structures on the specified device.
OPTIONS
- -d, --decode lockname
-
Display the lock type, inode number and the inode generation number encoded in the lockname.
- -e, --encode lock_type inode_num generation
-
Display the lockname obtained by encoding the lock type, inode number and the inode generation number.
- -f, --file cmdfile
-
Executes the debugfs commands in cmdfile.
- -l [tracebit ... [allow|off|deny]] ...
-
Control OCFS2 filesystem tracing by enabling and disabling trace bits.
Do debugfs.ocfs2 -l to get the list of all trace bits.
- -n, --noprompt
-
Hide prompt.
- -R, --request command
-
Executes a single debugfs command.
- -s, --superblock backup-number
-
mkfs.ocfs2 makes upto 6 backup copies of the superblock at offsets 1G, 4G,
16G, 64G, 256G and 1T depending on the size of the volume. Use this option to
specify the backup, 1 thru 6, to use to open the volume.
- -w, --write
-
Opens the filesystem in RW mode. By default the filesystem is opened
in RO mode.
- -V, --version
-
Display version and exit.
- -?, --help
-
Displays help and exit.
SPECIFYING FILES
Many debugfs.ocfs2 commands take a filespec as an argument
to specify an inode (as opposed to a pathname) in the filesystem which
is currently opened by debugfs.ocfs2. The filespec argument
may be specified in two forms. The first form is an inode number or lockname
surrounded by angle brackets, e.g., <32>. The second form is a pathname;
if the pathname is prefixed by a forward slash ('/'), then it is
interpreted relative to the root of the filesystem which is currently
opened by debugfs.ocfs2. If not, the path is interpreted relative
to the current working directory as maintained by debugfs.ocfs2,
which can be modified using the command cd. If the pathname is
prefixed by a double forward slash ('//'), then it is interpreted relative
to the root of the system directory of the filesystem opened by
debugfs.ocfs2.
LOCKNAMES
Locknames are specially formatted strings used by the file system
to uniquely identify objects in the filesystem. Most locknames used
by OCFS2 are generated using the inode number and its generation
number and can be decoded using the decode command or used directly
in place of an inode number in commands requiring a filespec. Like
inode numbers, locknames need to be enclosed in angle brackets, e.g.,
<M000000000000000040c40c044069cf>. To generate a lockname for a given object,
use the encode command.
COMMANDS
This is a list of the commands which debugfs.ocfs2 supports.
- bmap filespec logical_block
-
Display the physical block number corresponding to the logical block
number logical_block in the inode filespec.
- cat filespec
-
Dump the contents of inode filespec to stdout.
- cd filespec
-
Change the current working directory to filespec.
- chroot filespec
-
Change the root directory to be the directory filespec.
- close
-
Close the currently opened filesystem.
- curdev
-
Show the currently open device.
- decode <lockname>
-
Display the inode number encoded in the lockname.
- dump [-p] filespec outfile
-
Dump the contents of the inode filespec to the output file
outfile. If the -p is given, set the owner, group,
timestamps and permissions information on outfile to match
those of filespec.
- encode filespec
-
Display the lockname for the filespec.
- extent block#
-
Display the contents of the extent structure at block#.
- findpath [<lockname>|<inode#>]
-
Display the pathname for the inode specified by lockname or inode#. This
command does not display all the hard-linked paths for the inode.
- fs_locks
-
Display the locks and their status as maintained by the filesystem. This command
expects the debugfs filesystem mounted, mount -t debugfs debugfs /path,
at the appropriate path. If /sys/kernel/debug exists on your distribution,
mount it at that path. Else, mount it at /debug.
- group block#
-
Display the contents of the group descriptor at block#.
- hb
-
Display the contents of the heartbeat system file.
- help, ?
-
Print the list of commands understood by debugfs.ocfs2.
- icheck block# ...
-
Display the inodes that use the one or more blocks specified on the command line.
If the inode is a regular file, also display the corresponding logical block offset.
- lcd directory
-
Change the current working directory of the debugfs.ocfs2 process
to the directory on the native filesystem.
- locate [<lockname>|<inode#>] ...
-
Display all pathnames for the inode(s) specified by locknames or inode#s.
- logdump node#
-
Display the contents of the journal for node node#.
- ls [-l] filespec
-
Print the listing of the files in the directory filespec. The
-l flag will list files in the long format.
- ncheck [<lockname>|<inode#>] ...
-
See locate.
- open device
-
Open the filesystem on device.
- quit, q
-
Quit debugfs.ocfs2.
- rdump [-v] filespec outdir
-
Recursively dump directory filespec and all its contents
(including regular files, symbolic links and other directories) into
the outdir which should be an existing directory on the native
filesystem.
- slotmap
-
Display the contents of the slotmap system file.
- stat filespec
-
Display the contents of the inode structure for the filespec.
- stats [-h] [-s backup-number]
-
Display the contents of the superblock. Use -s to display a
specific backup superblock. Use -h to hide the inode.
ACKNOWLEDGEMENT
This tool has been modelled after debugfs, a debugging tool for ext2.
SEE ALSO
mkfs.ocfs2(8)
fsck.ocfs2(8)
tunefs.ocfs2(8)
mounted.ocfs2(8)
ocfs2console(8)
ocfs2cdsl(8)
AUTHOR
Oracle Corporation
COPYRIGHT
Copyright © 2004, 2007 Oracle. All rights reserved.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- SPECIFYING FILES
-
- LOCKNAMES
-
- COMMANDS
-
- ACKNOWLEDGEMENT
-
- SEE ALSO
-
- AUTHOR
-
- COPYRIGHT
-