Path: utzoo!attcan!uunet!cs.utexas.edu!sun-barr!newstop!texsun!letni!rwsys!sneaky!gordon From: gordon@sneaky.UUCP (Gordon Burditt) Newsgroups: comp.unix.wizards Subject: Re: SYS V - What is Inode 1 ? Keywords: inode sysv Message-ID: <47030@sneaky.UUCP> Date: 22 Jan 91 22:12:52 GMT References: <1991Jan19.123830.8859@micromuse.co.uk> <1991Jan21.102735.27257@st_nik!swindon.ingr.com> Organization: Gordon Burditt Lines: 22 >>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