You are not logged in.
Hi,
I was resizing my root partition with cfdisk when I got errors about my root partition. It cannot be mounted. Running btrfs check gives me this:
Opening filesystem to check...
bad tree block 215475978240, bytenr mismatch, want=215475978240, have=0
ERROR: failed to read block groups: Input/output error
ERROR: cannot open file systemdmesg gives me:
[ 20.429514] BTRFS: device label Arch devid 1 transid 28534 /dev/sdb4 scanned by systemd-udevd (575)
[ 114.514825] BTRFS info (device sdb4): disk space caching is enabled
[ 114.514829] BTRFS info (device sdb4): has skinny extents
[ 114.538568] BTRFS error (device sdb4): bdev /dev/sdb4 errs: wr 0, rd 1, flush 0, corrupt 0, gen 0
[ 114.538652] BTRFS error (device sdb4): failed to read block groups: -5
[ 114.565988] BTRFS error (device sdb4): open_ctree failedBtrfs rescue did nothing. Is there anything I can do short of reinstalling Arch? I have no backups as well. Help is appreciated.
Last edited by fire100265 (2020-12-30 05:31:07)
Offline
I honestly think it's for the better if I reinstall. Other people with this problem had to resort to reinstalling the OS. Is there any hope for me?
Offline
If you didn't resize the filesystem before resizing the partition (... I'm assuming you shrank it) you basically broke the filesystem. The only thing I'd suggest is to try and resize the partition to it's original size but I'm assuming the damage has already been done. If you intend to shrink you always need to shrink the filesystem first.
Offline
I already tried that. It didn't work unfortunately. Is the only available option a complete reinstall?
Last edited by fire100265 (2020-12-29 13:25:37)
Offline
I know too little about btrfs to know whether there is another option so you might have to wait for someone else to chime in, but just for the future you always need to shrink the FS before shrinking the partition and the reverse for the growing case.
Offline
Don't give up so fast (unless you have no time)! It's great opportunity to gain some experience in repairing btrfs, even if it would be unsuccessful.
Do image of that partition (you should start with that first!), make btrfs filesystem change size to fit it in partition, if it isn't already. The best would be orginal size or something similar.
And see this links FIRST:
https://btrfs.wiki.kernel.org/index.php/Restore
https://www.mail-archive.com/linux-btrf … 91854.html
https://ownyourbits.com/2019/03/03/how- … partition/
https://www.suse.com/support/kb/doc/?id=000018769
https://serverfault.com/questions/74230 … -partition
https://forum.rockstor.com/t/btrfs-erro … start/5569
It looks like repairing btrfs is harder, especially if it haven't it's own copy on other drives.
Last edited by xerxes_ (2020-12-29 19:59:16)
Offline
I already tried all of that. Btrfs restore only restored /opt and a few files in /etc. Btrfsck gave me the same errors that everything else gave me. It couldn't be checked.
Edit: a reinstall seems like the only option at this point.
Last edited by fire100265 (2020-12-30 00:22:22)
Offline
I reinstalled Arch. I'll mark this thread as solved.
Offline