The Tuesday 2005-03-15 at 08:52 -0800, Randall R Schulz wrote:
On Tuesday 15 March 2005 06:39, Damon Register wrote:
Darryl Gregorash wrote:
**Never** fsck a mounted partition.
Ok, I'll bite. Why not? Please don't think that I wish to argue, I just want to learn.
The kernel has much cached file system information in RAM. If fsck changes anything on the disk then, the data the kernel holds no longer matches that on the disk, yet the kernel does not "know" this and will access the device as if the information it holds accurately reflects the state, structure and contents of the drive. Bad consequences are very likely to ensue.
That's true. However, a theoretical point raises to my mind. O:-) It should be possible for the kernel to know what is happening and update its internal buffers. In other words, the kernel could keep track of what fsck is doing, update or flush or empty buffers as appropriate, and conversely, be able to write to disk whatever the rest of the OS seems fit, and informing fsck of what has changed. It should be possible, albeit very complex. And slow. But I have seen more complex feats... like, on a double computer, updating half of a mirror disk with the computer continuing normal processing, then suddenly switching to the other, updated half, without interrupting service. Roughly so, but almost correct explanation. -- Cheers, Carlos Robinson