Skip to contentSkip to conversation

btrfs metadata mirroring

DISCUSSION Zener 2 participants 2 messages Nov 27, 2020 Btrfs file system

lore
Share & tools
lore

Zener

author
#0 lore raw

Hi, I have a disk with btrfs but now I'd like enable just metadata mirroring to understand if some error occurs. Do I need another disk / partition / volume dedicated?
How to do?
Is it safe now or do I risk to loss my formely data?
Thank you for your support.
Bye.

#1 lore raw
Quoted 5 lines · Zener

Hi, I have a disk with btrfs but now I'd like enable just metadata mirroring to understand if some error occurs.
Do I need another disk / partition / volume dedicated?
How to do?
Is it safe now or do I risk to loss my formely data?

It's quite possible that you already have it.

If you look at the output of "btrfs fi usage -T /mountpoint",
you'll see the RAID level for your metadata listed. If it's "DUP", then you have two copies of each metadata block duplicated -- effectively running "RAID-1" for your metadata, but on a single device.

If it says "single", then you've only got one copy of your
metadata. You can convert it to DUP with a balance conversion:

# btrfs balance start -mconvert=dup,soft /mountpoint

You may need to run this more than once. Sometimes the conversion
process manages to allocate (and then skip over) a new metadata chunk as single. Check with "btrfs fi usage -T /mountpoint" after running the first time, and see if there's any single metadata allocation left. If there is, run the command again.

Hugo.

Signature · 4 lines
Hugo Mills             | Anyone who says their system is completely secure
hugo@... carfax.org.uk | understands neither systems nor security.
http://carfax.org.uk/  |
PGP: E2AB1DE4          |                                        Bruce Schneier