EXT4 dm-0 corrupted filesystem warnings after hibernation

I just recovered from a very odd event. The system attempted to enter hybrid sleep (which I have previously disabled) and was unresponsive until power was cycled on the PSU.

Checking the logs it shows what I suspected (that it tried to hibernate) but now the kernel is giving the following warnings.

Aug 15 21:32:52 nothing-box kernel: EXT4-fs error (device dm-0): ext4_validate_block_bitmap:390: comm rsync: bg 411: bad block bitmap checksum
Aug 15 21:33:21 nothing-box kernel: Uhhuh. NMI received for unknown reason 2c on CPU 0.
Aug 15 21:33:21 nothing-box kernel: Dazed and confused, but trying to continue
Aug 15 21:35:12 nothing-box kernel: EXT4-fs error (device dm-0) in ext4_free_inode:362: Corrupt filesystem
Aug 15 21:35:42 nothing-box kernel: EXT4-fs error (device dm-0): ext4_validate_inode_bitmap:105: comm ThreadPoolForeg: Corrupt inode bitmap - block_group = 12128, inode_bitmap = 397410320
Aug 15 21:35:42 nothing-box kernel: EXT4-fs error (device dm-0) in ext4_free_inode:362: Corrupt filesystem

Kind of at a loss here with dm-0 being the problem, if it was a storage device I would run fsck but dm-0 is a mystery to me as it’s used for device mapping?

Can’t tell if I should just reboot and test on a proper boot, but I feel I’m just as likely to lose the filesystem.

edit:

ok so this thread on the arch forums lays out the problem
https://bbs.archlinux.org/viewtopic.php?id=249962

So this is related to the encrypted swapfile partition(System drive) if I am following correctly. That’s good to know but I am still at a loss on how to correct it.

Better ideas welcome.

Hello from my laptop :sweat_smile:

I had the bright idea to use the snapshot from an hour before the event. Of course that didn’t work.

So upon rebooting and entering the LUKS key I was dumped into the rootfs shell.

Is there any hope of recovery at this point?

On the liveboot USB I can still decrypt my system drive, whew.

So recap so far,

  • confirmed that hd0,gpt1 which is what I thought my drive was before this, was not present via ls on the grub command line.(I’ve noticed that it now opens hd2,gpt2 … significance?)

  • After opening slot0 for hd2,gpt2 I am met with many fsck failures then dropped to root fs with a reccomendation of running fsck manually.

  • systemdrive can be accessed and unlocked via liveboot USB.

So I guess my question is… where to go from here in order to restore the encrypted drive?

And also I guess I can still try to run fsck on dm-0 from the live USB, however I get the warning that the drive is mounted. What is the proper procedure here?

Sorry, there is much information to get through and most of it is irrelevant with LUKS thrown in.

  1. Boot a live session.
  2. Decrypt and map the device. (cryptsetup)
  3. Run fsck by targeting /dev/mapper/<mapping-name>

Thanks that wasn’t so bad after all!

Out of curiosity do you think hd0 moving to hd2 was due to some kind of offset introduced by the errors?

Either way, thank you for the assist!

No, it is a file system error… and possibly happened on a hard shutdown:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.