Path: utzoo!utgpu!watmath!att!dptg!rutgers!mailrus!ncar!boulder!stan!dce From: dce@Solbourne.COM (David Elliott) Newsgroups: comp.unix.wizards Subject: BSD filesystem defragmentation question Message-ID: <1886@marvin.Solbourne.COM> Date: 9 Aug 89 16:19:02 GMT Reply-To: dce@Solbourne.com (David Elliott) Organization: Solbourne Computer Inc., Longmont, Colorado Lines: 28 Assume I have an 8k/1k filesystem and create a file with 789 bytes in it. This gives me one fragment. Now, let's say I add to the file so it grows to be 3875 bytes, taking 4 fragments, and that these fragments are not all in the same block. OK, let's increase the file size to 10486 bytes, which is 11 fragments. At this point, is the data moved on the disk so that my file comprises one block and 3 fragments, or is it left as fragments? (Note: In the above, assume that the file changes have taken place far enough apart so that the files have been written to disk in between.) When do entire blocks get written? Only when the entire block is written at once (i.e., when the buffer cache gets flushed)? Do new files tend to get placed in available blocks, or do they go in partially-used blocks? -- David Elliott dce@Solbourne.COM ...!{uunet,boulder,nbires,sun}!stan!dce "I had a dream that my kids had been reparented." - Tom LaStrange