2

We tried to resize a 15TB ext4 partition to 16TB and accidentally managed to hit an old (and fixed in newer releases) off-by-one bug of ext4_resize_fs() which causes inode count to reset to 0 thanks to an overflow bug.

The fix can be seen here: https://github.com/torvalds/linux/commit/4f2f76f751433908364ccff82f437a57d0e6e9b7

As a result, our 16TB partition is unusable at the moment.

Are there any ways to recover from the situation? Even a read-only access to all files is more than enough in this case.

0

Probably the best way to handle this is to use debugfs ssv command to edit the superblock to reduce the block count and inode count by one group's worth of items, then run e2fsck. That essentially undo the last part of the resize, allowing you to use the filesystem again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.