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
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.
Check more discussion of this question.