Can corruption happen by powering off the computer (not properly shutting it down) during balance or scrub of a btrfs volume?
Can corruption happen by powering off the computer (not properly shutting it down) during balance or scrub of a btrfs volume?
Edit: including corruption of superblocks
Corruption should be automatically detected and fixed. The operations will resume on bootup.
However I wouldn't push your luck.
25 0 ReplyNo, I don't thing scrubs / balances resume on boot up, they'd have to be started again.
1 0 Reply
Storage devices can fail at any time for any reason. Always have a backup.
Fwiw, I think BTRFS is better than ext4 and friends at actually detecting whether a block is corrupted or not.
13 0 Reply"Better" in the sense that it actually has the ability to check for corruption at all, as all metadata and data are checksummed.
3 0 Reply
As long as the hardware functions as it should (e.g. respects barriers) and there is no software bug in the stack, no.
That's a highly unlikely scenario though. Make backups.
9 0 ReplyI had some kernel panics here and there... but the last one panic was fatal. Suddenly a lot of /usr/lib/lib<name>.so files were empty and also X11 stopped working...
3 0 ReplyAs long as there are no problems with the btrfs code? Hahahahaha!! There are.
1 0 ReplyAnd also in any other filesystem's code or the block layers below the filesystem. As I said, unlikely scenario.
1 0 Reply
Since btrfs uses Copy on Write, as long as the data makes it onto disk in tact, any further btrfs operations on the data will be safe against sudden power loss. It might need the opportunity to repair some stuff once power is restored (scrub), but the data (and metadata) should still be there and recoverable, not left in some partial state that can't be resolved.
7 0 ReplyTheoretically, no.
In reality, possibly/yes!
What do you have?
6 0 ReplyEveryone saying it'll be fine is speaking theoretically. Practically I can attest to full and total file system corruption under this scenario.
5 0 ReplyEspecially if you're using raid5 for multi disk.
2 0 Reply
What do you mean by "computer" and "corruption"?
4 0 ReplyWhat do you mean what does he mean? He says it right there:
during balance or scrub of a btrfs volume?
BTRFS is obviously a filesystem, so it's equally obviously corruption of the BTRFS filesystem.
10 0 ReplyWhat sub is this?
3 0 Reply
No
2 0 ReplyNo.
2 0 ReplyYes there's always a chance corruption can happen from a hard power off, always keep reliable backups.
1 0 Reply