I’ve been tooling around with some simple filesystem tasks on a few servers and have a terrible memory with silly things like this. So I’m writing it down to answer my own question!
You’ll need the
e2fsprogs package. Within that package is a command called
tune2fs. You can list out the statistics for various volumes on your system with the
-l switch. I’d recommend perusing the output of that entire command, however for the impatient, if you want to see the last time that a check was run on a given volume:
tune2fs -l /dev/sda1 | grep "checked" Last checked: Sat Feb 9 11:42:51 2013
As of the writing of this post in February 2014, it appears that I should probably consider scheduling a maintenance window for that volume to be checked.
This is also useful to determine why a remote server took so long to come back up from a reboot. I recently had a server that took an unexpectedly long time to reboot (it wasn’t production, thankfully) and I used this method as part of my process of elimination to determine if it was a fsck that caused the delay. Just see if the Last checked time was during the reboot period. There are other ways to determine that as well, such as checking fsck logs, but it’s always nice to have several methods to get the same information.