On Wed, May 27, 2020 at 10:23 AM Goffredo Baroncelli <kreijack@xxxxxxxxx> wrote: > > Hi All, > > On 5/27/20 8:25 AM, Chris Murphy wrote: > > On Tue, May 26, 2020 at 11:22 PM Andrei Borzenkov <arvidjaar@xxxxxxxxx> wrote: > >> > >> 27.05.2020 05:20, Chris Murphy пишет: > >>> > >>> single, dup, raid0, raid1 (all), raid10 are safe and stable. > >> > >> Until btrfs can reliably detect and automatically handle outdated device > >> I would not call any multi-device profiles "safe", at least unconditionally. > > > > I agree. > > > > Checking the generation of each device should be sufficient to detect "outdated" devices. Why this check is not performed ? > May be that I am missing something ? But transid isn't unique enough except in isolation. Degraded volumes are treated completely independently. So if I take a 2x raid1 and mount each one degraded on separate computers and modify them. Then join them back together, how can Btrfs resolve the differences? It's a mess. Yes that is obviously a kind of sabotage. While not literal sabotage, the effect is the same if you have alternating degraded drives in successive boots. So you just cannot use degraded with either fstab or rootflags. It's bad advice to anyone who gives it and we need to be vigilant about recommending against it. Maybe the man 5 btrfs page should expressly say not to include degraded in fstab, or at least warn there are consequences. -- Chris Murphy
