fsck bad inode number 2(56) to nextinode

px px at i.kiev.ua
Mon May 17 18:22:06 UTC 2021


Hi.

This morning I've noticed that since yesterday I have a following message in /var/log/messages

May 16 13:24:13 bsd-route fsck[1606]: /dev/ufs/pxstore: NO WRITE ACCESS
May 16 13:24:13 bsd-route fsck[1606]: /dev/ufs/pxstore: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
May 16 13:24:13 bsd-route fsck[1606]: /dev/ufs/pxstore: CANNOT SET FS_NEEDSFSCK FLAG

Underlying hdd holds a single Jail with torrent client, so I've shut down the client, don't remember if I've also shut down the jail itself, then I've unmounted drive with -f switch, and run fsck on it. fsck found a lot of errors, like

129516299 DUP I=64686337
UNEXPECTED SOFT UPDATE INCONSISTENCY

2661355758115450807 BAD I=23756482
UNEXPECTED SOFT UPDATE INCONSISTENCY

-8999617908267060188 BAD I=23756482
UNEXPECTED SOFT UPDATE INCONSISTENCY

CYLINDER GROUP 3944: INTEGRITY CHECK FAILED
UNEXPECTED SOFT UPDATE INCONSISTENCY

INCORRECT BLOCK COUNT I=486994392 (56264 should be 49112)

INODE 486994392: FILE SIZE 28746675 BEYOND END OF ALLOCATED FILE, SIZE SHOULD BE 25133056

and some others (you can see 512KB of the log here - https://pastebin.com/Xcm1iKCc), but in the end to my surprise fsck exited with the following error:

INTERNAL ERROR: dups with softupdates
UNEXPECTED SOFT UPDATE INCONSISTENCY
** Phase 1b - Rescan For More DUPS
fsck_ufs: bad inode number 2 to nextinode

After some search I was lucky to find the following commit
https://cgit.freebsd.org/src/commit/?id=bc444e2ec6e6cc9d96d35ab7ce3c02c0da952fad
Fix fsck_ffs Pass 1b error exit "bad inode number 2 to nextinode".

As I'm running 13-RELEASE, I went to https://download.freebsd.org/ftp/snapshots/amd64/13.0-STABLE/, downloaded base.txz file, took fsck* files from it, and put them instead of existing in /sbin, but the only change I've got is the number change from 2 to 256

INTERNAL ERROR: dups with softupdates
UNEXPECTED SOFT UPDATE INCONSISTENCY
** Phase 1b - Rescan For More DUPS
fsck_ufs: bad inode number 256 to nextinode

On fsck re-run I'm getting the same list of the errors, and the check ends with the same result.

I've mounted the disk in r/o mode, and can see the folders structure just fine, random files check showed that they are fine, text/images/video renders without errors. SMART for disk is fine, general status is PASSED, and there are no reallocation events

Any advice please how I can resolve the issue without moving all the data to other disk(s), and then re-formatting it?


-- 
Best regards,
 px




More information about the freebsd-fs mailing list