I just ran into this same problem. After debugging the issue with the e2fsck
maintainer, we realised that the SD card was broken. It was accepting writes without error, but it wasn't actually writing the data to the card. The SD card was effectively read only.
It seems the card had gone into some sort of failsafe mode, where the data could still be read, but nothing written.
The e2fsck
message unable to set superblock flags
means it tried to write to the superblock to mark the journal as processed, which happened without error, but when it went to read the superblock back again it still indicated that the journal needed to be replayed. In other words, the changes written to the superblock were not saved on the storage medium.
The card I am using that has this problem is a Samsung Evo 16GB microSD, which I mention just in case it's a common problem with these cards.
I was able to test this by using dd
to write 4096 bytes from /dev/zero
onto the card at block 0, then I read back from the card and instead of getting all zeroes as I should, I still got the original unchanged ext4 superblock.
I'm now in the process of moving the data onto a new card and then seeing if I can get a replacement from Samsung, who appear to offer a 10 year warranty on SD cards.
UPDATE: Samsung replaced the 16GB card with a 32GB one in the same Evo series, so guess I can't complain too much!
You are looking for the systemd
journal. man journalctl
can be your entry point. To review the logs for systemd-fsck
you can look at:
journalctl -u systemd-fsck*
As you'll see in man journalctl
, there are are also machine-friendly output options like JSON. That's as close as you are going to come to an API to query fsck status, besides the other systemd tool for querying service status:
systemctl status systemd-fsck*
As you'll see in man systemctl
, it also offers machine-friendly output formats as well.
I'm aware of no way to query fsck
status without systemd
.
Best Answer
This means that the checked file system uses 3811 inodes (usually you need (at least) one inode per file) out of 49152 inodes available.
The same to the blocks: 105570 out of 171776 blocks are currently in use. If not specified otherwise the default block size in Linux ext2, ext3, ext4 file systems is 1 KByte (1024 bytes).