Ignorant user overfilled /usr; strange errors followed. Fixed with fsck -y, but what exactly happened?

boink lordboink at gmail.com
Thu May 18 13:47:25 PDT 2006


On 18/05/06, Lowell Gilbert <freebsd-questions-local at be-well.ilk.org> wrote:
> boink <lordboink at gmail.com> writes:

8<...

> > My questions are these:
> > - How could /usr have been at 108%, given that 100% is the logical maximum?
>
> Because that *isn't* a given.
> See the FAQ entry on "How is it possible for a partition to be more
> than 100% full?"
>
> > - Is there any risk that a physically adjacent filesystem be
> > damaged?
>
> No.  Furthermore, it's unlikely that your /usr was actually damaged,
> either.  Don't run fsck on a live filesystem; of *course* it will
> always find "errors."
>
> > - How can it be that, immediately following the deletion of
> > /usr/ports/ktrace.out, I still had errors *at all* (prior to the
> > fsck)?
>
> See the FAQ entry on "The du and df commands show different amounts of
> disk space available. What is going on?"  That describes what you
> probably should have done instead of the fsck.
>
> > - Given its recent history, can I now trust the integrity of /usr?
>
> Probably.  But you may have messed it up with the fsck, so just to be
> sure, go into single-user mode, umount /usr, and fsck it WHILE IT IS
> NOT MOUNTED.
>
> > My interpretation of the situation is that following the deletion of
> > /usr/ports/ktrace.out, KDE, on startup, tried to write a file to a
> > filesystem that apparently (although incorrectly) had no free blocks.
> > fsck fixed the problem of the reported free blocks.
>
> More or less.  But since the kernel's idea of what was on the disk
> no longer matched reality (i.e., it knew that in reality there *were* no
> free blocks), you may have gotten into trouble.
>
> > However, if this interpretation is correct, it shouldn't have worked
> > *at all* until fsck had repaired the filesystem.  That is, KDE should
> > not have started at all.
>
> That doesn't necessarily follow.
>
> > So, prior to  the fsck -y in single-user mode, what was happening in
> > the five minutes it took KDE to start?
>
> I don't know KDE at all, but my guess would be some kind of timeout.
>


Lowell,

Thank you for taking the time to answer my questions.

I omitted to mention that I had rebooted into single user mode prior
to running fsck, so /usr was not in fact mounted when fsck was run.

The du/df FAQ is interesting, and non-obvious, as is FAQ 9.26. (How is
it possible for a partition to be more than 100% full?), which
explains why the quoted disk usage was 108%.
http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html.

Thanks again,
boink


More information about the freebsd-questions mailing list