#btrfs corruption

16 messages · Page 1 of 1 (latest)

modest hare
#

So 24 hours ago I got out of memory and had to force a poweroff and now btrfs gave up and remounted in read-only. (probably because I had swap partition)
After booting up into an iso I have following, what do I do? btrfs check --repair?

mild carbon
#

@modest hare are you in the chroot?

modest hare
#

no

#

right now I mounted spare ssd and successfully mounted falling apart btrfs filesystem and just copying my home to the spare ssd

#

but after I made the backup what do I do?

#

well first what I do is shutdown and flash fresh iso because btrfs on falling apart system is v6.7 vs v6.5.2 and doubt it is a good idea to repair with this old version

modest hare
modest hare
#

so I just did the repair without chroot or anything it said it deleted something but system boots just fine so far I did not notice anything vital missing

#

but how do I avoid such things in the future? (aside from setting up oom killer)

dull sail
#

you dont even need to fsck it after a force poweroff, unlike smth like ext4

modest hare
#

How do I (possible?) extract filenames or paths of corrupted stuff from such a state?

modest hare
# spring arrow Mounting it read only

of files that cause the corrupted state, like when btrfs check tells me data extent and all that other information how do I convert it into a path to a file on the filesystem

#

I did mount the filesystem in read only and copied everything over but I still don't know what files were broken/missing

long ledge
#

AFAIK there's no way to know what files are broken/missing unless you compare them to a known working state. EI: You would know if any are missing by comparing old file list to new file list. You could know which are corrupt by comparing old checksum and new checksum.