Resource icon

Tutorial when your RAID degrade with BTRFS in Syno NASes

One of my concern was about - What would happen when my RAID contains BTRFS will degrade?

Analyze
I found in official BTRFS Wiki these recommendations:
RAID1 volumes - if they become degraded may only be mounted read-write once with the options -o degraded,rw.
Notes:
This does not happen (reportedly) when there are more than 2 devices.
This is often due to the "Incomplete chunk conversion" issue, where there are single chunks left.
Possible recoveries:

If it is still read-write, you can convert the chunks from profile RAID1 to profile single (or profile dup) if you have enough space).
If it is still read-write, you can btrfs device replace command the missing device.
When a RAID1 volume is stuck as read-only for either reason it can only be recovered by dumping its contents, recreating it and restoring the contents.

But there is another point of view found in the BTRFS Wiki:
Replacing failed devices - Using btrfs replace command
When you have a device that's in the process of failing or has failed in a RAID array you should use the btrfs replace command rather than adding a new device and removing the failed one.

even worse:
Currently RAID5 and RAID6 profiles have flaws that make it strongly not recommended
- In less recent releases the parity of resynchronized blocks was not calculated correctly, this has been fixed in recent releases (TBD).
- If a crash happens while a RAID5/6 volume is being written this can result in a "transid" mismatch as in transid verify failed.
- The resulting corruption cannot be currently fixed.

Issued Questions (my own):
1. Is there needed such manual described (above) procedure when the RAID1 is degraded (btrfs mount, replace commands)?
or
Synology DSM will cover "self-supported" replacement of failed disk in the RAID 1 (still about BTRFS)?

2. Same for RAID 5/6

3. Same for Synology Spare disk feature - automated disk replacement from Spare disk, ...

Solution
I was totally surprised from such information, then ticket was opened to Syno.
Answer from Syno Support:
Described steps as in manual are not necessary, because they apply to btrfs RAID, which is not used on Synology NAS ... link to Syno BTRFS KB
Therefore for all three question the answer is no. If the volume would be degraded, there is no need to do anything via console, everything can be done via UI.

This is C/P of Syno KB for your better understanding:
What is the RAID implementation for Btrfs File System on Synology NAS?
To secure stored data, Synology has verified Btrfs File System in the way that has been confirmed to be the most stable for business use. Some concerns have been raised in regards to systems with Btrfs RAID potentially encountering issues with parity calculation errors, resulting in unrecoverable data loss. You can read about it here.

The below diagram illustrates that Btrfs RAID takes over the entire communication between Btrfs file system layer and the disks.
1579382236773.png


However, it is known that Btrfs RAID is unstable and not suitable for production environments. For this reason, Synology chose Linux RAID over Btrfs RAID. The following diagram explains the concept - Synology has implemented the layers in between to ensure that we have full control of the communication for the highest stability.
1579382248645.png


Although Btrfs RAID has some advantages, including automatic corruption detection and correction, we are already developing these features when Btrfs and Linux RAID are used.

Verdict
When you have same schizophrenic ideas as me, don't hesitate to find answers, it will help you to increase your mental health.
Thx gents from Syno, for such useful solution (I hope for)



  • Like
Reactions: fredbert and Rusty

Similar resources

suitable & wrong attitude for SSD RAID in your NAS or in any other data operation (computer, ...)
5.00 star(s) 1 ratings
Updated
Back
Top