SCAN_FFS(8) | System Manager's Manual | SCAN_FFS(8) |
scan_ffs
— find
UFS/FFS partitions on a disk
scan_ffs |
[-lsv ] [-b
begin] [-e
end] device |
This is the life-saver of typos. If you have ever been working too long, and just happened to type 'disklabel -w sd0 floppy', instead of 'disklabel -w fd0 floppy', you know what I am talking about.
This little program will take a raw disk device (which you might have to create) that covers the whole disk, and finds all probable UFS/FFS partitions on the disk. It has various options to make it go faster, and to print out information to help in the reconstruction of the disklabel.
scan_ffs
works only on FFS file systems,
not FFS2 file systems.
The options are as follows:
-b
beginscan_ffs
where to begin searching for
filesystems. This makes it easier to skip swap partitions, or other large
non-UFS/FFS partitions.-e
endscan_ffs
where to stop.-l
scan_ffs
print out a string looking
much like the input to disklabel. With a little massaging, this output can
usually be used in the disklabel edit.-s
scan_ffs
to be smart about skipping
partitions (when it thinks it found a valid one). By not scanning
partitions for superblocks, the program completes a couple of orders of
magnitude faster. However, sometimes being smart is too good for its own
good, especially if your disk has had a different layout previously, or
contains other non-UFS/FFS filesystems.-v
scan_ffs
to be verbose about what it is
doing, and what it has found.scan_ffs
should use to
scan for filesystems. Usually this device should cover the whole disk in
question.The basic operation of this program is as follows:
scan_ffs
over this partition. If you have any
information about the disklabel which used to exist on the disk, keep that
in mind while scan_ffs
spews out its things.scan_ffs
and other sources.Last but certainly not least, we wish you good luck. The UFS/FFS filesystems are pretty sturdy. I've seen them reconstructed after some pretty weird and awesome fumbles. If you can't have backups, at least have funky tools to help you out of a jam when they happen.
February 10, 2019 | OpenBSD-current |