DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Solving filesystem problems

Using fsck_ufs to check superblocks

The most commonly corrupted item in a filesystem is the summary information associated with the superblock, because it is modified with every change to the blocks or inodes of the filesystem, and is usually corrupted after an unclean halt. The superblock is checked for inconsistencies involving:

Using fsck_ufs to check filesystem size and inode list size

The filesystem size must be larger than the number of blocks used by the superblock and the number of blocks used by the list of inodes. While there is no way to check these sizes precisely, fsck can check that they are within reasonable bounds. All other filesystem checks require that these sizes be correct. If fsck detects corruption in the static parameters of the default superblock, fsck requests the operator to specify the location of an alternate superblock.

Using fsck_ufs to check free block list

fsck checks that all the blocks marked as free in the cylinder group block maps are not claimed by any files. When all the blocks have been initially accounted for, fsck checks that the number of free blocks plus the number of blocks claimed by the inodes equals the total number of blocks in the filesystem. If anything is wrong with the block allocation maps, fsck will rebuild them, based on the list it has computed of allocated blocks.

Using fsck_ufs to check free block count

The summary information associated with the superblock contains a count of the total number of free blocks within the filesystem. fsck compares this count to the number of free blocks it finds within the filesystem. If the two counts do not agree, fsck replaces the incorrect count in the summary information by the actual free block count.

Using fsck_ufs to check free inode count

The summary information contains a count of the total number of free inodes within the filesystem. fsck compares this count to the number of free inodes it finds within the filesystem. If the two counts do not agree fsck replaces the incorrect count in the summary information by the actual free inode count.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004