xref: /freebsd/sbin/ffsinfo/ffsinfo.8 (revision 257e70f1d5ee61037c8c59b116538d3b6b1427a2)
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.\"
39.Dd September 8, 2000
40.Dt FFSINFO 8
41.Os
42.Sh NAME
43.Nm ffsinfo
44.Nd "dump all meta information of an existing ufs file system"
45.Sh SYNOPSIS
46.Nm
47.Op Fl g Ar cylinder_group
48.Op Fl i Ar inode
49.Op Fl l Ar level
50.Op Fl o Ar outfile
51.Ar special | file
52.Sh DESCRIPTION
53The
54.Nm
55utility extends the
56.Xr dumpfs 8
57utility.
58.Pp
59The output is appended to the file
60.Pa outfile .
61Also expect the output file to be rather large.
62Up to 2 percent of the size of the specified file system is not uncommon.
63.Pp
64The following options are available:
65.Bl -tag -width indent
66.It Fl g Ar cylinder_group
67This restricts the dump to information about this cylinder group only.
68Here
69.Ar 0
70means the first cylinder group and
71.Ar -1
72the last one.
73.It Fl i Ar inode
74This restricts the dump to information about this particular inode only.
75Here the minimum acceptable inode is
76.Ar 2 .
77If this option is omitted but a cylinder group is defined then only inodes
78within that cylinder group are dumped.
79.It Fl l Ar level
80The level of detail which will be dumped.
81This value defaults to
82.Ar 255
83and is the
84.Dq bitwise or
85of the following table:
86.Pp
87.Bl -hang -width indent -compact
88.It Ar 0x001
89initial superblock
90.It Ar 0x002
91superblock copies in each cylinder group
92.It Ar 0x004
93cylinder group summary in initial cylinder group
94.It Ar 0x008
95cylinder group information
96.It Ar 0x010
97inode allocation bitmap
98.It Ar 0x020
99fragment allocation bitmap
100.It Ar 0x040
101cluster maps and summary
102.It Ar 0x100
103inode information
104.It Ar 0x200
105indirect block dump
106.El
107.It Fl o Ar outfile
108This sets the output filename where the dump is written to, and
109must be specified.
110If
111.Fl
112is provided, output will be sent to stdout.
113.El
114.Sh EXAMPLES
115.Dl ffsinfo -o /var/tmp/ffsinfo -l 1023 /dev/md0
116.Pp
117will dump
118.Pa /dev/md0
119to
120.Pa /var/tmp/ffsinfo
121with all available information.
122.Sh SEE ALSO
123.Xr dumpfs 8 ,
124.Xr fsck 8 ,
125.Xr gpart 8 ,
126.Xr growfs 8 ,
127.Xr gvinum 8 ,
128.Xr newfs 8 ,
129.Xr tunefs 8
130.Sh HISTORY
131The
132.Nm
133utility first appeared in
134.Fx 4.4 .
135.Sh AUTHORS
136.An Christoph Herrmann Aq Mt chm@FreeBSD.org
137.An Thomas-Henning von Kamptz Aq Mt tomsoft@FreeBSD.org
138.An The GROWFS team Aq Mt growfs@Tomsoft.COM
139.Sh BUGS
140Snapshots are handled like plain files.
141They should get their own level to provide for independent control of the
142amount of what gets dumped.
143It probably also makes sense to some extend to dump the snapshot as a
144file system.
145