Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-unix!ctnews!pyramid!oliveb!sun!gorodish!guy From: guy@gorodish.UUCP Newsgroups: comp.unix.wizards Subject: Re: help with missing lost+found! Message-ID: <25735@sun.uucp> Date: Sun, 16-Aug-87 04:18:15 EDT Article-I.D.: sun.25735 Posted: Sun Aug 16 04:18:15 1987 Date-Received: Sun, 16-Aug-87 22:11:10 EDT References: <180@LOGICON.LOGICON.UUCP> <142700014@tiger.UUCP> <561@murphy.UUCP> Sender: news@sun.uucp Lines: 28 > Several people have posted shell scripts that make a directory, create a > bunch of files in it, and then delete the files. This works, at least for > BSD4.2, and I think SYSV too. The idea is to create a bunch of directory > slots and force the directory to be extended; this is necessary because fsck > is not capable of extending the directory (after all, you can't expect the > entire file system to be implemented inside fsck). This does work in 4.2 and S5. However... > Now, here's my question: I've seen several postings here saying that BSD4.3 > is capable of shrinking directories. In that case, if I create a bunch > of files in a lost+found directory and then delete them, what's to stop > it from shrinking the directory and undoing the effect? Nothing - but then it shouldn't matter in most cases, since the 4.3BSD "fsck" *is* capable of extending (or creating!) "lost+found" in most cases. (It looks like it won't do it if 1) it will require the directory's file map to have an indirect block, or if the directory's file map already has an indirect block - but then with a 4K/x file system, and 512-byte disk blocks, that won't happen until "lost+found" is 5120 bytes long, or 10240 bytes long with an 8K/x file system; 2) it can't allocate a block, e.g. because the file system is full.) Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com