Initial import from FreeBSD RELENG_4:
[dragonfly.git] / sbin / ffsinfo / ffsinfo.8
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: src/sbin/ffsinfo/ffsinfo.8,v 1.6.2.5 2003/02/23 20:17:15 trhodes Exp $
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 The
56 .Nm
57 utility extends the
58 .Xr dumpfs 8
59 utility.
60 .Pp
61 The output is generated into the file
62 .Pa outfile .
63 Also expect the output file to be rather large.
64 Up to 2 percent of the size of the specified file system is not uncommon.
65 .Pp
66 The following options are available:
67 .Bl -tag -width indent
68 .It Fl L
69 Specifying this option skips the tests of the disklabel.
70 This is done automatically, if the specified filename to dump is a plain file.
71 .It Fl g Ar cylinder_group
72 This restricts the dump to information about this cylinder group only.
73 Here
74 .Ar 0
75 means the first cylinder group and
76 .Ar -1
77 the last one.
78 .It Fl i Ar inode
79 This restricts the dump to information about this particular inode only.
80 Here the minimum acceptable inode is
81 .Ar 2 .
82 If this option is omitted but a cylinder group is defined then only inodes
83 within that cylinder group are dumped.
84 .It Fl l Ar level
85 The level of detail which will be dumped.
86 This value defaults to
87 .Ar 255
88 and is the
89 .Dq bitwise or
90 of the following table:
91 .Pp
92 .Bl -hang -width indent -compact
93 .It Ar 0x001
94 initial superblock
95 .It Ar 0x002
96 superblock copies in each cylinder group
97 .It Ar 0x004
98 cylinder group summary in initial cylinder group
99 .It Ar 0x008
100 cylinder group information
101 .It Ar 0x010
102 inode allocation bitmap
103 .It Ar 0x020
104 fragment allocation bitmap
105 .It Ar 0x040
106 cluster maps and summary
107 .It Ar 0x080
108 rotational layout tables
109 .It Ar 0x100
110 inode information
111 .It Ar 0x200
112 indirect block dump
113 .El
114 .It Fl o Ar outfile
115 This allows to change the output filename where the dump is written to.
116 The current default is
117 .Pa /var/tmp/ffsinfo .
118 If
119 .Fl
120 is provided, output will be sent to stdout.
121 .El
122 .Sh EXAMPLES
123 .Dl ffsinfo -l 1023 /dev/vinum/testvol
124 .Pp
125 will dump
126 .Pa /dev/vinum/testvol
127 with all available information.
128 .Sh BUGS
129 Currently
130 .Nm
131 can only dump unmounted file systems.
132 Do not try dumping a mounted file system, your system may panic and you will
133 not be able to use the file system any longer.
134 .Pp
135 Also snapshots are handled like plain files.
136 They should get their own level to provide for independent control of the
137 amount of what gets dumped.
138 It probably also makes sense to some extend to dump the snapshot as a
139 file system.
140 .Sh SEE ALSO
141 .Xr disklabel 8 ,
142 .Xr dumpfs 8 ,
143 .Xr fsck 8 ,
144 .Xr growfs 8 ,
145 .Xr newfs 8 ,
146 .Xr tunefs 8 ,
147 .Xr vinum 8
148 .Sh AUTHORS
149 .An Christoph Herrmann Aq chm@FreeBSD.org
150 .An Thomas-Henning von Kamptz Aq tomsoft@FreeBSD.org
151 .An The GROWFS team Aq growfs@Tomsoft.COM
152 .Sh HISTORY
153 The
154 .Nm
155 utility first appeared in
156 .Fx 4.4 .