13d500078SThomas-Henning von Kamptz.\" Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz 23d500078SThomas-Henning von Kamptz.\" Copyright (c) 1980, 1989, 1993 The Regents of the University of California. 33d500078SThomas-Henning von Kamptz.\" All rights reserved. 43d500078SThomas-Henning von Kamptz.\" 53d500078SThomas-Henning von Kamptz.\" This code is derived from software contributed to Berkeley by 63d500078SThomas-Henning von Kamptz.\" Christoph Herrmann and Thomas-Henning von Kamptz, Munich and Frankfurt. 73d500078SThomas-Henning von Kamptz.\" 83d500078SThomas-Henning von Kamptz.\" Redistribution and use in source and binary forms, with or without 93d500078SThomas-Henning von Kamptz.\" modification, are permitted provided that the following conditions 103d500078SThomas-Henning von Kamptz.\" are met: 113d500078SThomas-Henning von Kamptz.\" 1. Redistributions of source code must retain the above copyright 123d500078SThomas-Henning von Kamptz.\" notice, this list of conditions and the following disclaimer. 133d500078SThomas-Henning von Kamptz.\" 2. Redistributions in binary form must reproduce the above copyright 143d500078SThomas-Henning von Kamptz.\" notice, this list of conditions and the following disclaimer in the 153d500078SThomas-Henning von Kamptz.\" documentation and/or other materials provided with the distribution. 163d500078SThomas-Henning von Kamptz.\" 3. All advertising materials mentioning features or use of this software 173d500078SThomas-Henning von Kamptz.\" must display the following acknowledgment: 183d500078SThomas-Henning von Kamptz.\" This product includes software developed by the University of 193d500078SThomas-Henning von Kamptz.\" California, Berkeley and its contributors, as well as Christoph 203d500078SThomas-Henning von Kamptz.\" Herrmann and Thomas-Henning von Kamptz. 213d500078SThomas-Henning von Kamptz.\" 4. Neither the name of the University nor the names of its contributors 223d500078SThomas-Henning von Kamptz.\" may be used to endorse or promote products derived from this software 233d500078SThomas-Henning von Kamptz.\" without specific prior written permission. 243d500078SThomas-Henning von Kamptz.\" 253d500078SThomas-Henning von Kamptz.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 263d500078SThomas-Henning von Kamptz.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 273d500078SThomas-Henning von Kamptz.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 283d500078SThomas-Henning von Kamptz.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 293d500078SThomas-Henning von Kamptz.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 303d500078SThomas-Henning von Kamptz.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 313d500078SThomas-Henning von Kamptz.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 323d500078SThomas-Henning von Kamptz.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 333d500078SThomas-Henning von Kamptz.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 343d500078SThomas-Henning von Kamptz.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 353d500078SThomas-Henning von Kamptz.\" SUCH DAMAGE. 363d500078SThomas-Henning von Kamptz.\" 374020c5bcSThomas-Henning von Kamptz.\" $TSHeader: src/sbin/ffsinfo/ffsinfo.8,v 1.3 2000/12/12 19:30:55 tomsoft Exp $ 383d500078SThomas-Henning von Kamptz.\" 39*27bd6c32SJohn Baldwin.Dd January 23, 2025 403186023eSMaxim Konovalov.Dt FFSINFO 8 41f33c0fddSRuslan Ermilov.Os 423d500078SThomas-Henning von Kamptz.Sh NAME 433d500078SThomas-Henning von Kamptz.Nm ffsinfo 4410cb9bd3SRuslan Ermilov.Nd "dump all meta information of an existing ufs file system" 453d500078SThomas-Henning von Kamptz.Sh SYNOPSIS 46f33c0fddSRuslan Ermilov.Nm 47f33c0fddSRuslan Ermilov.Op Fl g Ar cylinder_group 483d500078SThomas-Henning von Kamptz.Op Fl i Ar inode 493d500078SThomas-Henning von Kamptz.Op Fl l Ar level 503d500078SThomas-Henning von Kamptz.Op Fl o Ar outfile 514020c5bcSThomas-Henning von Kamptz.Ar special | file 523d500078SThomas-Henning von Kamptz.Sh DESCRIPTION 5387450669SPhilippe CharnierThe 5487450669SPhilippe Charnier.Nm 5587450669SPhilippe Charnierutility extends the 563d500078SThomas-Henning von Kamptz.Xr dumpfs 8 5787450669SPhilippe Charnierutility. 583d500078SThomas-Henning von Kamptz.Pp 59db8c0973SColin PercivalThe output is appended to the file 604020c5bcSThomas-Henning von Kamptz.Pa outfile . 614020c5bcSThomas-Henning von KamptzAlso expect the output file to be rather large. 624020c5bcSThomas-Henning von KamptzUp to 2 percent of the size of the specified file system is not uncommon. 634020c5bcSThomas-Henning von Kamptz.Pp 644020c5bcSThomas-Henning von KamptzThe following options are available: 653d500078SThomas-Henning von Kamptz.Bl -tag -width indent 66f33c0fddSRuslan Ermilov.It Fl g Ar cylinder_group 67f33c0fddSRuslan ErmilovThis restricts the dump to information about this cylinder group only. 68f33c0fddSRuslan ErmilovHere 69f33c0fddSRuslan Ermilov.Ar 0 70f33c0fddSRuslan Ermilovmeans the first cylinder group and 71f33c0fddSRuslan Ermilov.Ar -1 72f33c0fddSRuslan Ermilovthe last one. 733d500078SThomas-Henning von Kamptz.It Fl i Ar inode 74f33c0fddSRuslan ErmilovThis restricts the dump to information about this particular inode only. 75f33c0fddSRuslan ErmilovHere the minimum acceptable inode is 76f33c0fddSRuslan Ermilov.Ar 2 . 774020c5bcSThomas-Henning von KamptzIf this option is omitted but a cylinder group is defined then only inodes 784020c5bcSThomas-Henning von Kamptzwithin that cylinder group are dumped. 793d500078SThomas-Henning von Kamptz.It Fl l Ar level 804020c5bcSThomas-Henning von KamptzThe level of detail which will be dumped. 81f33c0fddSRuslan ErmilovThis value defaults to 82f33c0fddSRuslan Ermilov.Ar 255 83f33c0fddSRuslan Ermilovand is the 84f33c0fddSRuslan Ermilov.Dq bitwise or 85f33c0fddSRuslan Ermilovof the following table: 86f33c0fddSRuslan Ermilov.Pp 87f33c0fddSRuslan Ermilov.Bl -hang -width indent -compact 88f33c0fddSRuslan Ermilov.It Ar 0x001 89f33c0fddSRuslan Ermilovinitial superblock 90f33c0fddSRuslan Ermilov.It Ar 0x002 91f33c0fddSRuslan Ermilovsuperblock copies in each cylinder group 92f33c0fddSRuslan Ermilov.It Ar 0x004 93f33c0fddSRuslan Ermilovcylinder group summary in initial cylinder group 94f33c0fddSRuslan Ermilov.It Ar 0x008 95f33c0fddSRuslan Ermilovcylinder group information 96f33c0fddSRuslan Ermilov.It Ar 0x010 97f33c0fddSRuslan Ermilovinode allocation bitmap 98f33c0fddSRuslan Ermilov.It Ar 0x020 99f33c0fddSRuslan Ermilovfragment allocation bitmap 100f33c0fddSRuslan Ermilov.It Ar 0x040 101f33c0fddSRuslan Ermilovcluster maps and summary 102f33c0fddSRuslan Ermilov.It Ar 0x100 103f33c0fddSRuslan Ermilovinode information 104f33c0fddSRuslan Ermilov.It Ar 0x200 105f33c0fddSRuslan Ermilovindirect block dump 106f33c0fddSRuslan Ermilov.El 1073d500078SThomas-Henning von Kamptz.It Fl o Ar outfile 108a5640f3dSCeri DaviesThis sets the output filename where the dump is written to, and 109c4b2cc12SRobert Watsonmust be specified. 11010cb9bd3SRuslan ErmilovIf 11110cb9bd3SRuslan Ermilov.Fl 11210cb9bd3SRuslan Ermilovis provided, output will be sent to stdout. 1133d500078SThomas-Henning von Kamptz.El 1143d500078SThomas-Henning von Kamptz.Sh EXAMPLES 115a64096aaSEd Maste.Dl ffsinfo -o /var/tmp/ffsinfo -l 1023 /dev/md0 1163d500078SThomas-Henning von Kamptz.Pp 1174020c5bcSThomas-Henning von Kamptzwill dump 118a64096aaSEd Maste.Pa /dev/md0 119c4b2cc12SRobert Watsonto 120c4b2cc12SRobert Watson.Pa /var/tmp/ffsinfo 1214020c5bcSThomas-Henning von Kamptzwith all available information. 1223d500078SThomas-Henning von Kamptz.Sh SEE ALSO 1233a212cc6SDavid Gilbert.Xr ffs 4 , 124f33c0fddSRuslan Ermilov.Xr dumpfs 8 , 1253d500078SThomas-Henning von Kamptz.Xr fsck 8 , 126b8c19fd7SEdward Tomasz Napierala.Xr gpart 8 , 127f33c0fddSRuslan Ermilov.Xr growfs 8 , 1283d500078SThomas-Henning von Kamptz.Xr newfs 8 , 129d1cd5e7cSJoel Dahl.Xr tunefs 8 1303d500078SThomas-Henning von Kamptz.Sh HISTORY 1313d500078SThomas-Henning von KamptzThe 1323d500078SThomas-Henning von Kamptz.Nm 13387450669SPhilippe Charnierutility first appeared in 13486f47875SSheldon Hearn.Fx 4.4 . 1356087df9eSRuslan Ermilov.Sh AUTHORS 136bd0891ceSBaptiste Daroussin.An Christoph Herrmann Aq Mt chm@FreeBSD.org 137bd0891ceSBaptiste Daroussin.An Thomas-Henning von Kamptz Aq Mt tomsoft@FreeBSD.org 138bd0891ceSBaptiste Daroussin.An The GROWFS team Aq Mt growfs@Tomsoft.COM 1396087df9eSRuslan Ermilov.Sh BUGS 1406087df9eSRuslan ErmilovSnapshots are handled like plain files. 1416087df9eSRuslan ErmilovThey should get their own level to provide for independent control of the 1426087df9eSRuslan Ermilovamount of what gets dumped. 1436087df9eSRuslan ErmilovIt probably also makes sense to some extend to dump the snapshot as a 1446087df9eSRuslan Ermilovfile system. 145