Fixing Disk Corruption in LXC Containers

Found here: https://forum.proxmox.com/threads/broken-filesystem-in-lxc.38921/

LXC-Containers which were running on the hosts during crash, filesystem errors are displayed and look like this (on host and in LXC):

kernel: [360205.838168] EXT4-fs (loop3): previous I/O error to superblock detected
kernel: [360205.839314] Buffer I/O error on dev loop3, logical block 0, lost sync page write
kernel: [367213.313281] print_req_error: I/O error, dev loop11, sector 470195848

Shut down the LXC and try to repair the filesystem with e2fsck:

e2fsck -p -c -f -v /mnt/pve/storage/images/71403/vm-71403-disk-1.raw 

Broken inodes found and fixed.

recovering journal
Clearing orphaned inode 1180012 (uid=0, gid=0, mode=0100666, size=0)
Clearing orphaned inode 1179930 (uid=0, gid=0, mode=0100666, size=0)
Clearing orphaned inode 10444 (uid=0, gid=0, mode=0100600, size=0)
Updating bad block inode.