[ ... ] > The advantage of writing single chunks when degraded, is in > the case where a missing device returns (is readded, > intact). Catching up that device with the first drive, is a > manual but simple invocation of 'btrfs balance start > -dconvert=raid1,soft -mconvert=raid1,soft' The alternative is > a full balance or full scrub. It's pretty tedious for big > arrays.
That is merely an after-the-fact rationalization for a design that is at the same time entirely logical and quite broken: that the intended replication factor is the same as the current number of members of the volume, so if a volume has (currently) only one member, than only "single" chunks gets created. A design that would work better for operations would be to have "profiles" to be a concept entirely independent of number of members, or perhaps more precisely to have the "desired" profile of a chunk be distinct from the "actual" profile (dependent on the actual number of members of a volume) of that chunk, so that if a volume has only one member chunks could be created that have "desired" profile 'raid1' but "actual" profile 'single', or perhaps more sensibly 'raid1-with-missing-mirror', with checks that "actual" profile be usable else the volume is not mountable. Note: ideally every chunk would have both a static desired profile and a desired stripe width, and a computed actual profile and a actual stripe width. Or perhaps the desired profile and width would be properties of the volume (for each of the three types of data). For example in MD RAID it is perfectly legitimate to create a RAID6 set with "desired" width of 6 and "actual" width of 4 (in which case it can be activated as degraded) or a RAID5 set with "desired" width of 5 and actual width of 3 (in which case it cannot be activated at all until at least another member is added). The difference with MD RAID is that in MD RAID there is (except in one case , during conversion) an exact match between "desired" profile stripe width and number of members, while at least in principle a Btrfs volume can have any number of chunks of any profile of any desired stripe size (except that current implementation is not so flexible in most profiles). That would require scanning all chunks to determine whether a volume is mountable at all or mountable only as degraded, while MD RAID can just count the members. Apparently recent versions of the Btrfs 'raid1' profile do just that. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html