| 84716 packages online |
|
|
| | | | No screenshot available |
|
ffstest is the first stage of a disk repair program. It parses
a OFS/FFS/DCFS filesystem tree and reports inconsistencies. It
does not repair them.
Currently it checks
- meta-block checksum
- hash table entries
- hash chains
- parent links
- file names
- dircache blocks
- hard link chains
- usage of various 'reserved' fields
- allocation bitmap
it doesn't yet check for
- OFS data blocks
- consistent hard link types
- dircache contents
- soft link targets
usage:
ffstest DISK/A,LIST/S,NOINHIBIT/S
DISK - name of the drive/partition, the partition must be mounted
but the filesystem handler doesn't need to loaded
A trailing ':' is discarded from the name.
LIST - lists every meta-block encountered.
NOINHIBIT - don't send an ACTION_INHIBIT to the filesystem, you can
access the filesystem while it is checked, but obviously
you must not modify it.
Caveat: ACTION_INHIBIT may fail.
a small tool lets you also start the disk validator manually
validate DISK/A
DISK - name of the drive/partition, the partition must be mounted
but the filesystem handler doesn't need to loaded
diagnostics:
"bad checksum for key"
- a meta block has a bad checksum, ignored
"need a root block to start"
- the calculated root block is not of type ST_ROOT, use something
like DiskSalv to salvage the disk contents
"ERROR: long name"
- the name field in a block has a length > 30 chars
"ERROR: tablesize = xxxx, hashsize = xxxx"
- invalid hash table size field in root block, ignored
"ERROR: invalid dircache chain xxxx=>xxxx"
- invalid key to next dir cache block
"ERROR: invalid dircache block type"
- dircache block is not of type ST_DIRCACHE
"ERROR: key xxx refers to itself as xxx"
- the OWNKEY field of a meta block doesn't contain its block number
"ERROR: key xxx with parent xxx doesn't match previous xxx"
- the PARENT field of a meta block doesn't match the parent block
"key xxx linked at bad hash position xxx (!= xxx)"
- the hash function for a meta block does not match the position
in the parents hash table
"INVALID(xxx) type xxx (!= ST_LIST)"
- list block is not of type ST_LIST
"ERROR: LIST block xxx for file header xxx has different parent xxx"
- the PARENT field in a LIST block doesn't match the parent of the
file header
"key xxx: unallocated xxx"
- the number of allocated blocks for a file doesn't match the size
in the file header
"INVALID(xxx) type xxx"
- meta block not recognized
"Unsorted hash chain xxx => xxx"
- found a hash chain that isn't sorted by block number
"key xxx: invalid hash entry xxx = xxx"
- invalid entry in hash table
"key xxx: hash entry xxx = xxx already used for key xxx at xxx..xxx"
- a hash entry points to a block that is already allocated for
a different disk object
"ERROR: zero bitmap pointer xxx"
- an entry in the table of bitmap block is zero
"bad checksum for bitmap key xxx"
- ...
"key xxx: allocation error"
- bitmap block xxx doesn't match with computed disk allocations"
"BitMap is not valid"
- validator did not complete, the bitmap isn't checked
"typeBlock xxx/xxx"
- unrecognized block of type/subtype encountered
"xxx: non-zero reserved fields"
- meta block contains non-zero data in reserved fields
"alloc(llist) failed"
- out of memory for storing hard link information
"link chain for target xxx unbalanced"
- multiple hard links to this target don't build a single list
"link chain for target xxx not terminated"
- the list of hard links for this target isn't terminated with 0
"bad link chain for target xxx: xxx -> xxx != xxx"
- multiple hard links to this target don't build a single list
"ST_FILE xxx doesn't point back to link xxx"
"ST_DIR xxx doesn't point back to link xxx"
- a file or directory object doesn't point back to the first hard link
"invalid target type xxx for link"
- the target of a hard link is neither a file nor a directory
"openMountedDisk("xxx") failed"
- the drive/partition xxx isn't found or the device driver couldn't
be opened or the environment vector couldn't be found or the filesystem
couldn't be inhibited
"FATAL: invalid environment vector"
- The environment vector was found, but contained invalid data"
"FATAL: unsupported huge disk"
- Sorry, no support for the 64bit disk APIs yet. Max disk size
for standard exec drivers is 4GB.
"alloc(Extent) failed"
- out of memory for allocating Extent structure, computed disk allocation
will be erroneous
"overlap key xxx: xxx..xxx"
" with key xxx: xxx..xxx"
- two disk objects claim the same disk blocks (corresponds to validator
messages 'key already set' or 'key used twice')
"key xxx outside of filesystem"
- tried to lookup a block number larger than the disk size (should never
happen)
"allocated free block xxx"
- this block is missing in the bitmap
"xxx..xxx: xxxxxxxxxxx"
- this block range contains errors in the bitmap,
either blocks missing or allocated while free,
the right part is a bitmask, zeros represent errors
"ERROR: bounding circle in tree at xxx"
- a circular block chain was found, the repeated block isn't
read again to avoid infinite loops
"ERROR: readDisk failed for key xxx"
- the disk driver returned an error reading this block
"ERROR: getBuffer failed for key xxx"
- sorry, out of memory for allocating a buffer for this block
"ERROR: alloc(bstack) failed for key xxx"
- sorry, out of memory for allocating a stack node
Michael van Elst
|
Contents of disk/salv/ffstest.lha PERMSSN UID GID PACKED SIZE RATIO CRC STAMP NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic] 8940 16464 54.3% -lh5- bb1b Nov 29 1997 ffstest
[generic] 2141 5728 37.4% -lh5- db5f Nov 30 1997 ffstest.readme
[generic] 3077 5276 58.3% -lh5- 0ab6 Nov 30 1997 validate
---------- ----------- ------- ------- ------ ---------- ------------ -------------
Total 3 files 14158 27468 51.5% Dec 1 1997
|
|
|
|
Aminet © 1992-2024 Urban
Müller and
the Aminet team.
Aminet contact address: <aminetaminet net> |