So, basically it’s expected that many users with very old btrfs partitions (more specifically, created with a btrfs-progs version before 5.15) are running with metadata on the Single profile (that is, only one copy), whereas starting in 5.15 the default is for the DUP profile (that is, two copies).
The profile change process is relatively without risks as long as the user has enough free space (I commented with one user on Telegram about doing it and he bricked his system while attempting it, so far we have mostly chalked it up to low free space) and should be beneficial because it makes the filesystem a bit more resilient to failures (if something in one copy of the metadata corrupts, there’s the other one to rely on).
Basically this is something I learned about int the BTRFS Matrix channels when I asked for help in fixing checksum errors with btrfs scrub, it turned out I had to delete the files with checksum problems and get them back (they were ostree-related files, but I never figured if the reson they corrupted was hardware or software), but the users on the channels hinted at having the dup metadata for avoiding future problems (and also because apparently if metadata gets corrupted, you are screwed).
So, basically, I found this also while searching for it:
The DUP profile for metadata became the default as of btrfs-progs 5.15, so if you create one with a previous version it likely is still the single profile (IIRC the btrfs-progs version will match the kernel version, so we could check the Fedora versions likely to be affected by checking the shipped kernel).
From Btrfs RAID profiles | Forza's Ramblings those seem very important:
With btrfs-progs 5.14 and earlier the defaults were different on flash based media such as NVMe and SSD and normal rotational HDDs. The default was
DUPmetadata on HDDs and
SINGLEmetadata on NVMe and SSD. It was changed because it increases reliability and resiliency of the filesystem.
DUP means duplicate. This ensures two copies exists on the same disk. Can be used on one or several drives like SINGLE mode but does not protect against disk failures.
**** DUP mode protects against data or metadata corruption, but not disk failures.***
Always use a redundant profile such as
RAID1for metadata, even if you use
RAID0for data. This protects the filesystem from many types of otherwise irreparable damage if there were some corruptions in the metadata.
Also the article will be targeted for users of the Single profile for Data, as any other profiles likely was manually chosen by the user and we could assume that they “likely know what they are doing”, although they could likely reuse it if applicable for their system.
The article would end up not being much different than the Manjaro blog post above as we would need:
- Explain why older btrfs filesystems are not in the dup profile (i.e. created with pre-btrfs-progs 5.15)
- Explain why they should be, what are the benefits
- Show the command to check the profiles
- Give the disclaimer that the process is very low risks, but the user should be sure that backups are working and that there’s enough disk space (since it will have an extra copy of Metadata and System, a bit over their combined size as free space)
- Show the command to actually upgrade the profile
If possible it would be nice to have someone with more knowledge of BTRFS to give some feedback on the article before it’s published.