2

I have my system to fsck all fs at all reboots. And forced fsck just now. Yet I still get:

$ sudo fsck -vn /dev/lvmroot/root 
fsck from util-linux 2.40.2
e2fsck 1.47.1 (20-May-2024)
Warning!  /dev/mapper/lvm/root is mounted.
Warning: skipping journal recovery because doing a read-only filesystem check.
root has been mounted 1 times without being checked, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong (12783960, counted=12783944).
Fix? no

Free inodes count wrong (5263640, counted=5263625).
Fix? no

Feature orphan_present is set but orphan file is clean.
Clear? no
      503528 inodes used (8.73%, out of 5767168)
         271 non-contiguous files (0.1%)
         237 non-contiguous directories (0.0%)
             # of inodes with ind/dind/tind blocks: 0/0/0
             Extent depth histogram: 448994/96
    10284712 blocks used (44.58%, out of 23068672)
           0 bad blocks
           5 large files

      409720 regular files
       37767 directories
           0 character device files
           0 block device files
           0 fifos
        4248 links
       56022 symbolic links (54421 fast symbolic links)
          24 sockets
------------
      507781 files

Should i go out of my way to repair this?

1
  • 1
    These are wrong because the journal is not replayed before checking. If this were a normal check in automatic mode, with writes permitted, the journal would update the counts. Commented Oct 5, 2024 at 4:36

1 Answer 1

2

The free blocks and inode count in the superblock are not kept updated during normal filesystem operations. This is to avoid a single point of contention when multiple threads are modifying the filesystem at the same time.

Instead of keeping the superblock updated at runtime, the free blocks and inodes are read from the group descriptors at mount time and kept in memory. Since there are many thousands or millions of group descriptors in the filesystem, there is low contention to lock these individual structures at runtime.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.