If you search the list for 'corrupt leaf bad key ordering' the top two
causes are bad RAM and flaky power supply. These can be hard to narrow
down. But yes pretty good chance it can be fixed with 'btrfs check
--repair' but two things before you do that:

a. Make sure backups are up to date. Hopefully you can mount the
volume read only, it's a more permissive mount and also it helps not
contribute more problems, and then update your backups. If you can't
mount read only, then you kinda have to weigh the risk of repair
breaking the file system versus updating backups with btrfs restore -
which is an offline scraping tool. I don't know what the risk is for
bad key ordering repairs though.

b. Make sure you're using a recent btrfs-progs - as recent as you can
get a hold of. I'd probably not use anything older than 4.14.1 but
anything since 4.4 should be capable of repairing this because it's a
pretty old feature in check and should be safe, but yeah...

c. (optional) take a btrfs image before you do the repair because if
something blows up, at least that will help a dev figure out why btrfs
check blew up your file system.

Chris Murphy
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to