BSD filesystem defragmentation question
David Elliott
dce at Solbourne.COM
Thu Aug 10 02:19:02 AEST 1989
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 at Solbourne.COM
...!{uunet,boulder,nbires,sun}!stan!dce
"I had a dream that my kids had been reparented." - Tom LaStrange
More information about the Comp.unix.wizards
mailing list