How Trigger fsck / e2fsck

Hello,

I found following errors on external HDD (first partition, used as /storage. Second sda2 is fine)

[   25.752220@2] EXT4-fs error (device sda1): ext4_mb_generate_buddy:756: group 1, block bitmap and bg descriptor inconsistent: 191 vs 190 free clusters
[   25.833096@2] EXT4-fs error (device sda1): ext4_mb_generate_buddy:756: group 23, block bitmap and bg descriptor inconsistent: 7678 vs 1550 free clusters
[   25.840086@2] EXT4-fs error (device sda1): ext4_mb_generate_buddy:756: group 24, block bitmap and bg descriptor inconsistent: 7678 vs 1666 free clusters
[   25.848089@2] EXT4-fs error (device sda1): ext4_mb_generate_buddy:756: group 26, block bitmap and bg descriptor inconsistent: 7678 vs 7630 free clusters
[   25.848099@2] EXT4-fs error (device sda1): ext4_mb_generate_buddy:756: group 27, block bitmap and bg descriptor inconsistent: 7661 vs 5525 free clusters
[   25.854963@2] EXT4-fs error (device sda1): ext4_mb_generate_buddy:756: group 28, block bitmap and bg descriptor inconsistent: 7678 vs 1990 free clusters
[   25.863093@2] EXT4-fs error (device sda1): ext4_mb_generate_buddy:756: group 30, block bitmap and bg descriptor inconsistent: 7678 vs 5590 free clusters
[   25.863103@2] EXT4-fs error (device sda1): ext4_mb_generate_buddy:756: group 31, block bitmap and bg descriptor inconsistent: 7678 vs 5350 free clusters
[   25.869970@2] EXT4-fs error (device sda1): ext4_mb_generate_buddy:756: group 32, block bitmap and bg descriptor inconsistent: 7678 vs 6718 free clusters

Is there a way how to trigger disc check and repair during next startup? This is remote installation, unfortunatelly I cant fix this in person this week :frowning:

I know there is normal message

EXT4-fs (sda2): warning: maximal mount count reached, running e2fsck is recommended

which doesnt triggers full scan (and thats good), and there should be automatic trigger of disc repair when serious damage is done, but for this case

EXT4-fs (sda1): warning: mounting fs with errors, running e2fsck is recommended

its not triggered. Does I have any option to trigger one-time check and repair remotelly? Obviously I must run it after boot, as /storage is mounted…

/dev/loop0: TYPE="squashfs"
/dev/mmcblk0: PTUUID="0098b697" PTTYPE="dos"
/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="COREELEC" UUID="3001-0354" TYPE="vfat" PARTUUID="0098b697-01"
/dev/mmcblk0p2: LABEL="SD_DATA" UUID="1568868e-1619-47ff-820b-99abe9c45408" TYPE="ext4" PARTUUID="0098b697-02"
/dev/sda1: LABEL="STORAGE" UUID="7abb6ff0-d224-d401-40b2-6df0d224d401" TYPE="ext4" PARTUUID="16f2a91f-01"
/dev/sda2: LABEL="disk" UUID="b6ffbff8-d224-d401-00fe-bdf8d224d401" TYPE="ext4" PARTUUID="16f2a91f-02"

Thanks in advance

fsck is always run on boot. And I though it fixes fs issues but seems it depends what they are. I made errors on fs manually and they were fixed on next boot. But I noticed that this doesn’t always happen even if fsck is executed. I assume there are some missing parts in init script.

Yep… thats why I trying find out, if theres any option to trigger it “manually”. I read somewhere, that for the root partition that could be done by creating some file, but I dont know, how its on CE and also on non-root partitions…

On the other hand, if there will be full disc check to all “issues”, then maximal mount count reached would trigger fsck uselessly, and its not exeption I have connected external HDDs like 1T, 2T… :sweat:

From what i see in init script you can only disable checking with boot argument nofsck.

ah, then no luck for me :frowning: Thank you. Then its not possible repair remotelly /storage partition I guess.