I don’t know if this ever happens to you, but I believe ever Linux users have. You are in a hurry to get computer booted and logged in, so you can check up an important message. Unfortunately, a partition has reach the maximal mount count and a forced checked is running. The check really takes time and you just sit there and watch that progress bar from 0% to finally 100%. Even you are not in a hurry, you still feel it’s like ages.

Not sure if there is a tray program, even there is, I wouldn’t use. I wrote a short script for parsing the output of tune2fs for the left mounts.

#!/bin/bash

for part in /dev/sd??; do
  echo $part: $(($(sudo tune2fs -l $part 2>/dev/null | sed -n '/^Mount/ {x;n;G;y/\n/-/;s/[^0-9-]\+//g
p;q}')))
done > /etc/mountcounts

If you use Gentoo with baselayout2 (everyone should be using v2 already), then you can save it as /etc/local.d/mountcounts.start and grant it an executable permission. Or you can save it as or into /etc/rc.local if your distro uses it. Note that tune2fs requires root user to get the info of a partition.

Every time, you boot, a file /etc/mountcounts will be written with the left mounts, e.g.:

/dev/sda1: 23
/dev/sda2: 0
/dev/sda3: 5

I am lazy, so I just let the script to check all partitions and mute error message when checking swap partition. You can manually list all partitions which you really want to check.

When the count reaches 0, it means a forced check will be launched in next boot and you should be ready for that, i.e. press the power button before you go get your coffee.

I don’t add any notifications, but you can write a simple startup script for your DE and check if the number reaches zero, then pop up a dialog. For me, I just include the file in my dzen-status.