xref: /freebsd/sbin/ffsinfo/ffsinfo.8 (revision 1b6c76a2fe091c74f08427e6c870851025a9cf67)
1.\" Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz
2.\" Copyright (c) 1980, 1989, 1993 The Regents of the University of California.
3.\" All rights reserved.
4.\"
5.\" This code is derived from software contributed to Berkeley by
6.\" Christoph Herrmann and Thomas-Henning von Kamptz, Munich and Frankfurt.
7.\"
8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright
12.\"    notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\"    notice, this list of conditions and the following disclaimer in the
15.\"    documentation and/or other materials provided with the distribution.
16.\" 3. All advertising materials mentioning features or use of this software
17.\"    must display the following acknowledgment:
18.\"      This product includes software developed by the University of
19.\"      California, Berkeley and its contributors, as well as Christoph
20.\"      Herrmann and Thomas-Henning von Kamptz.
21.\" 4. Neither the name of the University nor the names of its contributors
22.\"    may be used to endorse or promote products derived from this software
23.\"    without specific prior written permission.
24.\"
25.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
26.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35.\" SUCH DAMAGE.
36.\"
37.\" $TSHeader: src/sbin/ffsinfo/ffsinfo.8,v 1.3 2000/12/12 19:30:55 tomsoft Exp $
38.\" $FreeBSD$
39.\"
40.Dd September 8, 2000
41.Dt FSINFO 8
42.Os
43.Sh NAME
44.Nm ffsinfo
45.Nd "dump all meta information of an existing ufs file system
46.Sh SYNOPSIS
47.Nm
48.Op Fl L
49.Op Fl g Ar cylinder_group
50.Op Fl i Ar inode
51.Op Fl l Ar level
52.Op Fl o Ar outfile
53.Ar special | file
54.Sh DESCRIPTION
55.Nm Ffsinfo
56extends the
57.Xr dumpfs 8
58program.
59.Pp
60The output is generated into the file
61.Pa outfile .
62Also expect the output file to be rather large.
63Up to 2 percent of the size of the specified filesystem is not uncommon.
64.Pp
65The following options are available:
66.Bl -tag -width indent
67.It Fl L
68Specifying this option skips the tests of the disklabel.
69This is done automatically, if the specified filename to dump is a plain file.
70.It Fl g Ar cylinder_group
71This restricts the dump to information about this cylinder group only.
72Here
73.Ar 0
74means the first cylinder group and
75.Ar -1
76the last one.
77.It Fl i Ar inode
78This restricts the dump to information about this particular inode only.
79Here the minimum acceptable inode is
80.Ar 2 .
81If this option is omitted but a cylinder group is defined then only inodes
82within that cylinder group are dumped.
83.It Fl l Ar level
84The level of detail which will be dumped.
85This value defaults to
86.Ar 255
87and is the
88.Dq bitwise or
89of the following table:
90.Pp
91.Bl -hang -width indent -compact
92.It Ar 0x001
93initial superblock
94.It Ar 0x002
95superblock copies in each cylinder group
96.It Ar 0x004
97cylinder group summary in initial cylinder group
98.It Ar 0x008
99cylinder group information
100.It Ar 0x010
101inode allocation bitmap
102.It Ar 0x020
103fragment allocation bitmap
104.It Ar 0x040
105cluster maps and summary
106.It Ar 0x080
107rotational layout tables
108.It Ar 0x100
109inode information
110.It Ar 0x200
111indirect block dump
112.El
113.It Fl o Ar outfile
114This allows to change the output filename where the dump is written to.
115The current default is
116.Pa /var/tmp/ffsinfo .
117.El
118.Sh EXAMPLES
119.Pp
120.Dl ffsinfo -l 1023 /dev/vinum/testvol
121.Pp
122will dump
123.Pa /dev/vinum/testvol
124with all available information.
125.Sh BUGS
126Currently
127.Nm
128can only dump unmounted file systems.
129Do not try dumping a mounted file system, your system may panic and you will
130not be able to use the file system any longer.
131.Pp
132Also snapshots are handled like plain files.
133They should get their own level to provide for independent control of the
134amount of what gets dumped.
135It probably also makes sense to some extend to dump the snapshot as a
136filesystem.
137.Sh SEE ALSO
138.Xr disklabel 8 ,
139.Xr dumpfs 8 ,
140.Xr fsck 8 ,
141.Xr growfs 8 ,
142.Xr newfs 8 ,
143.Xr tunefs 8 ,
144.Xr vinum 8
145.Sh AUTHORS
146.An Christoph Herrmann Aq chm@FreeBSD.org
147.An Thomas-Henning von Kamptz Aq tomsoft@FreeBSD.org
148.An The GROWFS team Aq growfs@Tomsoft.COM
149.Sh HISTORY
150The
151.Nm
152command first appeared in
153.Fx 5.0 .
154