Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upmkfs.btrfs shouldn't always use data profile 'raid0' by default with multiple devices #270
Labels
Milestone
Comments
|
Yeah, I agree, raid0 was bad choice for a default. For multiple devices there are also multiple choices about the striping and parity so I guess most users set that explicitly, but the defaults should be something sane anyway. It's much easier to convert from single than from raid0. |
|
Changes to defaults need to be done at major releases, I'm tagging this for 5.8. |
|
Related downstream bug has been accepted as release blocking for beta. Ideally a fix lands by Aug 25. |
kdave
added a commit
that referenced
this issue
Jul 21, 2020
…evices The single profile is better suited as default for data on multiple devices. Switch from RAID0 because: - it's easier to convert to other profiles, as single consumes some chunks per device, but RAID0 has chunks on all devices regardless of the used space - RAID0 has no redundancy and compared one disk failure affects many files due to striping, while with single the chances are a bit higher that complete files are stored on one device - when the device sizes are not equal and not even close to equal, the maximum achievable size with RAID0 is size of the smallest device due to striping, with single it's the sum of all device sizes The changed defaults could affect scripts and deployments that rely on the old values, but given the number of possible profiles for multiple devices let's hope that they're specified explicitly in majority of cases. Issue: #270 Signed-off-by: David Sterba <dsterba@suse.com>
|
Pushed to devel. The 5.8 is roughly scheduled to kernel 5.8 release (maybe 2 weeks from now). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mkfs.btrfs defaults to data profile 'raid0' even when the devices are completely unlike size.
(a) mkfs.btrfs should use some threshold, maybe 5% difference, by default. If the difference is less than threshold, use 'raid0'. If more than threshold, use 'single'.
(b) mkfs.btrfs should use 'single' profile by default.
The current behavior makes it way too easy (as in, by default) to run into the following two bugs:
#269
https://bugzilla.redhat.com/show_bug.cgi?id=1855174