systemd doesnt work with timed fsck, only with counted mount fsck

Bug #1608880 reported by Achim Behrens
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Updated my homserver from 14.04 to 16.04. Got a "/dev/sda1 will be fscked on next reboot" hint in the MOTD. Did some reboots and the fsck never happend. Tried with "sudo touch /forcefsck" but the message didnt go away. Thought it was an error of the MOTD scripts and tried to fiddle with them. But it reappeard ever time.

Looked at the syslogs logs and saw the fsck never happend.

Looked at the output from dumpe2fs and it showed several interesting informations:
 * the mount count was 12 and the maximum mountcount of 34 was not reached
 * the timed fsck date was reached
 * the last fsck was long ago (next confirmation the /forcefsck didnt work at all)

i changed the mount count to 35 with "sudo tune2fs -C 35 /dev/sda1" which made the fsck on next reboot.

So what works:
 * mount count fsck on reboot

what doesnt work:
 * setting /forcefsck manually
 * timed fsck

what should work?
 * all 3 of them should work.

Revision history for this message
Nils Kassube (kassube) wrote :

I can confirm this bug. However /forcefsck seems not to be supported because it isn't mentioned in the man page.

When I log in to one of the 16.04 systems, I get this info:

*** /dev/sda5 will be checked for errors at next reboot ***

But the command "dmesg|grep -i e2fsck" gives this output:
[ 14.999711] EXT4-fs (sda5): warning: checktime reached, running e2fsck is recommended

So the interpretation of the check interval seems to be a recommended value only during boot.

Changed in systemd (Ubuntu):
status: New → Confirmed
Revision history for this message
Reuben Thomas (rrt) wrote :

I confirm this problem. Another curious thing is that fsck appears to be run, but doesn't do anything as the file system is clean:

/run/initramfs/fsck.log says:

Log of fsck -C -a -T -t ext4 /dev/md1
Thu Jan 19 19:09:43 2017

/dev/md1: clean, 46950805/57753600 files, 197262216/231002624 blocks

Thu Jan 19 19:09:44 2017
----------------

In other words, it terminates immediately. Yet, the log file for the boot says:

Jan 19 19:09:59 femur kernel: [ 8.478804] EXT4-fs (md1): warning: checktime reached, running e2fsck is recommended

And this is confirmed by the output of dumpe2fs:

Last checked: Fri Dec 25 18:19:07 2015
Check interval: 15552000 (6 months)
Next check after: Wed Jun 22 19:19:07 2016

So I'm a bit puzzled: e2fsck is indeed being run in "preen" mode on this file system, the next check is due, so why is the check not made?

Revision history for this message
Dan Streetman (ddstreet) wrote :

please reopen if this is still an issue

Changed in systemd (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.