Re: No kernel message when filesystem full

From: Valdis . Kletnieks
Date: Mon Apr 17 2006 - 23:16:59 EST


On Tue, 18 Apr 2006 12:26:37 +1000, Danny.Weldon@xxxxxxxxxxxxxxxxxxx said:
> I am not getting any kernel messages when a filesystem fills up. Is this
> facility still available or is it now configurable?

> # dd if=/dev/zero of=/opt/xx
> dd: writing to `/opt/xx': No space left on device

The kernel hands the program a ENOSPC back. The program decides what to do.
Emitting a kernel message as well just means that instead of /home being full,
in a few minutes /home *and* /var will be full... ;)

If you have an actual concern about a full file system, the *RIGHT* thing to do
is to run a userspace program that does a statfs() every once in a while and
issues a warning when the partition is at 97% or so - so that you can act
*before* it gets full. This is a case where proactive can actually *do*
something, but being reactive really can't.

Yes, the kernel does issue printk()s for other things like I/O errors. But you
can *see* a "disk full" coming, whereas you can't (usually) predict an I/O
error (except for at the end of a CDROM with a buggy ide-cd.c ;)

Attachment: pgp00000.pgp
Description: PGP signature