cpio and lost+found

John Chambers jc at cdx39.UUCP
Sat Dec 6 02:55:41 AEST 1986


> 
> If you save a file system with cpio, it doesn't save the contents of
> each directory file, it just saves the directory as an empty entity and
> it gets filled with the appropriate files.  While this is the correct
> action in most cases, it is wrong in the case of the lost+found
> directory.  (It's supposed to have a bunch of spare empty slots, but it
> gets created by cpio with no spare empty slots.)
>
There is a secondary problem I've run across.  Sometimes a lost+found
directory gets full, nobody notices, and during the next boot there's
not enough space.

Both of these problems can be [almost-]solved, at the price of a slightly 
slower boot, by having your /etc/rc include a bunch of lines like:
	(cd /        ; mklost+found)
	(cd /usr     ; mklost+found)
	(cd /usr/lib ; mklost+found)
and so on for each mounted file system.   You might want to write 
a version of mklost+found that doesn't try to create the directory,
to get rid of the complaints about lost+found already existing.

-- 
	John M Chambers			Phone: 617/364-2000x7304
Email: ...{adelie,bu-cs,harvax,inmet,mcsbos,mit-eddie,mot[bos]}!cdx39!{jc,news,root,usenet,uucp}
Smail: Codex Corporation; Mailstop C1-30; 20 Cabot Blvd; Mansfield MA 02048-1193
Clever-Saying: For job offers, call (617)484-6393 evenings and weekends.



More information about the Comp.unix.wizards mailing list