Fsck − The unix† File System Check Program

Overview of the file system

Download 52.5 Kb.
View original pdf
Size52.5 Kb.
1   2   3   4   5   6   7   8   9   ...   49
2. Overview of the file system
The file system is discussed in detail in [Mckusick84]; this section gives a brief overview.
2.1. Superblock
A file system is described by its super-block. The super-block is built when the file system is created
(newfs(8)) and never changes. The super-block contains the basic parameters of the file system, such as the number of data blocks it contains and a count of the maximum number of files. Because the super-block contains critical data, newfs replicates it to protect against catastrophic loss. The default super block always resides at axed offset from the beginning of the file system’s disk partition. The redundant super blocks
are not referenced unless ahead crash or other hard disk error causes the default super-block to be unusable. The redundant blocks are sprinkled throughout the disk partition.
Within the file system are files. Certain files are distinguished as directories and contain collections of pointers to files that may themselves be directories. Every file has a descriptor associated with it called an inode. The inode contains information describing ownership of the file, time stamps indicating modifi- cation and access times for the file, and an array of indices pointing to the data blocks for the file. In this section, we assume that the first 12 blocks of the file are directly referenced by values stored in the inode structure itself. The inode structure may also contain references to indirect blocks containing further data block indices. Ina file system with a 4096 byte block size, a singly indirect block contains 1024 further block addresses, a doubly indirect block contains 1024 addresses of further single indirect blocks, and a triply indirect block contains 1024 addresses of further doubly indirect blocks (the triple indirect block is never needed in practice).
In order to create files with up to 2

32 bytes, using only two levels of indirection, the minimum size of ale system block is 4096 bytes. The size of file system blocks can be any power of two greater than or equal to 4096. The block size of the file system is maintained in the super-block, so it is possible for file systems of different block sizes to be accessible simultaneously on the same system. The block size must be decided when newfs creates the file system the block size cannot be subsequently changed without rebuilding the file system.

Fsck − the unix file system check program
Table of contents
Can’t stat fcan’t make sense out of name
Impossible minfree=
Magic number wrong
Can not read blk
Partially truncated inode
Link count table overflow (continue)
Excessive bad blks
Bad state ddd to blkerr
Partially allocated inode i=
Root inode unallocated (allocate)
Cannot allocate root inode
I out of range i=
Zero length directory i=
Directory corrupted i=
Missing ‘.’ i=
Extra ‘.’ entry i=
Missing ‘..’ i=
Extra ‘..’ entry i=
Bad state s for root inode
No lost+found directory (create)
Sorry. cannot create lost+found directory
Sorry. no space in lost+found directory
Directory f length
Unref file i=
No space left in /lost+found (expand)
Link count type i=

Share with your friends:
1   2   3   4   5   6   7   8   9   ...   49

The database is protected by copyright ©userg.info 2017
send message

    Main page

Harley Davidson