Re: Ignorant user overfilled /usr; strange errors followed. Fixed with fsck -y, but what exactly happened?
- From: Lowell Gilbert <freebsd-questions-local@xxxxxxxxxxxxxxx>
- Date: Thu, 18 May 2006 10:35:40 -0400
boink <lordboink@xxxxxxxxx> writes:
Dear FreeBSD,
While attempting to follow filesystem activity (and not realising the
effect it would have) I left a ktrace running (something like ktrace
-di -p0 -ti - seen on a forum while searching for a Filemon equivalent
for FreeBSD). I had launched it while in /usr/ports, and forgot about
it. Doh!
Some time later strange things started happening, so I exited from
X/KDE, and found a whole sequence of 'filesystem is full' errors on
the console. df said that /usr was at 108%.
I found the offending ktrace.out file in /usr/ports (~25GB), killed
ktrace, deleted the file, and restarted X/KDE. It took about 5
minutes to show the desktop, following a number of console messages
like 'xauth: creating new authority file...'
So, I Googled around and found a few hints relating to permissions in
~, but that didn't seem to be the problem; anyway I moved my ~/.kde/
to ~/.kde_20060515 in an attempt to 'reset' kde's startup behaviour,
but X/KDE still took ages to start the GUI, following similar
messages.
Even once X/KDE had started, some applications took a *long* time to
start (eg Firefox - 3/4 minutes to show blank home page). However, I
could still r/w access all files within /usr.
Following the advice found on various fora, I then ran fsck -y in
single-user mode, with the following output:
** Last mounted on /usr
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
FREE BLK COUNT(S) WRONG IN SUPERBLK
SALVAGE? yes
401256 files, 4135860 used, 13715938 free (126762 frags, 169-647
blocks, 0,8% fragmentation)
Afterwards, X/KDE started with its usual alacrity, so I restored my
~/.kde folder, and now everything seems to be exactly as before.
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.
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- References:
- Prev by Date: Re: crdit
- Next by Date: Re: Converting a zsh prompt to bash
- Previous by thread: Ignorant user overfilled /usr; strange errors followed. Fixed with fsck -y, but what exactly happened?
- Next by thread: Re: Ignorant user overfilled /usr; strange errors followed. Fixed with fsck -y, but what exactly happened?
- Index(es):
Relevant Pages
|
|