Freeze after hibernation with LUKS & XFS -> corrupted partition

First of all, I have resolved the issue (the consequences, albeit not the cause), so all is fine now. :slight_smile:
This is more of a report and questioning if you could have done something differently.

The setup:
xfs (filesystem)
3 partitions: EFI, system with LUKS, swap with LUKS.
slock screen locker

So, I hibernated the system by systemctl hibernate. When I later opened the lid, the system would boot back successfully and be responsive.
But then, when I switched to a workspace with a web browser open, the system would totally freeze, the statusbar clock wouldn’t move etc.

After a while I just held down the power button and hard-booted the system. Booting up, and after entering password errors would tell me of a corrupted partition. I first thought it meant the swap partition, but apparently it was the main system partition. I poked around in that shell (what shell is that, initframs?), but didn’t really know what to do. I then exited and I would fall to emergency shell, where I knew even less of what to do.

I then took my EOS live-USB and used xfs_repair on /dev/dm-0, after which the system would boot normally.

I’ve since tried to recreate the freeze, but so far everything’s been fine.

There are two questions I’m thinking:

  1. Should I have just waited longer when the system froze, and it would have unstuck? Does it happen, that the system boots from SWAP and is operational while some of the data is still being read from SWAP? Is this why the corruption occurred?

  2. Could I have fixed the system without the live-USB (in the early user-space or emergency shell)? I think tools like xfs_repair weren’t available there.


Not the answer to your questions, but before this happens next time, it may be good to enable Magic SysRq Key (REISUB).
And try to use it in a similar situation.

Thanks! Didn’t know about that, that’s amazing :star_struck:

1 Like