On Fri, Mar 03, 2017 at 06:56:22AM +0100, Kai Krakow wrote: > > > I don't understand what problem this proscription is trying to > > > avoid. If it's OK to mount rw,degraded once, then it's OK to allow > > > it twice. If it's not OK twice, it's not OK once. > > > > Well, yeah. The current check is naive and wrong. It does have a > > purpose, just fails in this, very common, case. > > I guess the reasoning behind this is: Creating any more chunks on this > drive will make raid1 chunks with only one copy. Adding another drive > later will not replay the copies without user interaction. Is that true? > > If yes, this may leave you with a mixed case of having a raid1 drive > with some chunks not mirrored and some mirrored. When the other drives > goes missing later, you are loosing data or even the whole filesystem > although you were left with the (wrong) imagination of having a > mirrored drive setup... Ie, you want a degraded mount to create degraded raid1 chunks rather than single ones? Good idea, it would solve the most common case with least surprise to the user. But there are other scenarios where Qu's patch[-set] is needed. For example, if you try to convert a single-disk filesystem to raid1, yet the new shiny disk you just added decides to remind you of words "infant mortality" halfway during conversion. Or, if you have degraded raid1 chunks and something bad happens during recovery. Having the required number of devices, despite passing the current bogus check, doesn't mean you can continue. Qu's patch checks whether at least one copy of every chunk is present. -- ⢀⣴⠾⠻⢶⣦⠀ Meow! ⣾⠁⢠⠒⠀⣿⡁ ⢿⡄⠘⠷⠚⠋⠀ Collisions shmolisions, let's see them find a collision or second ⠈⠳⣄⠀⠀⠀⠀ preimage for double rot13! -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
