SYS V - What is Inode 1 ?
Gordon Burditt
gordon at sneaky.UUCP
Wed Jan 23 09:12:52 AEST 1991
>>For a while now I have been trying to find out - for no good reason -
>>what inode 1 is reserved for in ATT SYSV. Whether the same is true for
>>other UN*X's I do not know, but whatever V.2 or V.3 release I have
>>seen, the root directory of a file system is always (as far as I have
>>seen) inode 2.
>
> My understanding of inode 1 was that in the days before disk controllers
>routinely mapped bad sectors and avoided them, inode 1 was to be used to
>allocate bad blocks to a a dummy file. I don't think anybody does this
>anymore so inode 1 is not used for anything these days.
I have used inode 1 for this purpose on occasion. It's convenient at least
as a stopgap and to get rid of marginally-faulty blocks that the format
program doesn't consider bad but keep causing trouble.
Programs that scan inodes such as dump/restor, quot, etc. start at inode 2
so the "file" with the bad blocks isn't dumped. Fsck starts at inode 1
for determining whether or not blocks are allocated to an inode, but at
inode 2 for reporting on orphaned files.
Gordon L. Burditt
sneaky.lonestar.org!gordon
More information about the Comp.unix.wizards
mailing list