Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am familiar with output suppress on Unix machines, ie:

cat /file/that/doesnt/exist > /dev/null 2>&

However I can't seem to suppress the output of mount when an ext3 filesystem is mounted for the nth time, and it recommends an fsck. As it happens, fscks are run regularly by another machine, so these warning messages are needlessly interrupting the flow of output to my pretty bash script. These are the errors:

# mount -t ext3 /dev/sda1 /mnt > /dev/null 2>&
kjournald starting. Commit interval 5 seconds
EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,1), internal journal
EXT3-fs: mounted filesystem with ordered data mode.

Can anyone shed some light on this? I'm clearly blocking both fd's, but somehow output is still getting through.

This is GNU Bash v2.05a

share|improve this question
up vote 2 down vote accepted

I'm pretty sure that those messages are coming from the kernel, not the mount command itself, so redirectinging the outputs aren't going to help. Try tweaking kernel.printk in sysctl until you get a level of verbosity that you're happy with.

When you say fscks are regularly run by another machine, i'm guessing this is on a shared block storage device like DRBD? I'd check that your other machine is actually fscking those volumes as the mount count is stored in the filesystem metadata, not the machine itself.

share|improve this answer
Ah, that explains it. It's just a USB storage device, and I hadn't actually run a fsck on it yet since I was testing the script. Thanks! – tjbp Jun 8 '10 at 12:40
echo "4 1 1 7" > /proc/sys/kernel/printk should turn it off but remember this is system wide, but be warned there might be other kernel messages that you do want to know about and that is suppressing them. – davey Jun 8 '10 at 12:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.