On Sat, Dec 05, 2015 at 04:28:24AM +0100, Christoph Anton Mitterer wrote: > On Fri, 2015-12-04 at 13:07 +0000, Hugo Mills wrote: > > I don't think it'll cause problems. > Is there any guaranteed behaviour when btrfs encounters two filesystems > (i.e. not talking about the subvols now) with the same UUID? Nothing guaranteed, but the likelihood is that things will go badly wrong, in the sense of corrupt filesystems. > Given that it's long standing behaviour that people could clone > filesystems (dd, etc.) and this just worked™, btrfs should at least > handle such case gracefully. > For example, when already more than one block device with a btrfs of > the same UUID are known, then it should refuse to mount any of them. > And if one is already known and another device pops up it should refuse > to mount that and continue to normally use the already mounted one. Except that that's exactly the mechanism that btrfs uses to handle multi-device filesystems, so you've just broken anything with more than one device in the FS. If you inspect the devid on each device as well, and refuse duplicates of those, you've just broken any multipathing configurations. Even if you can handle that, if you have two copies of dev1, and two copies of dev2, how do you guarantee that the "right" pair of dev1 and dev2 is selected? (e.g. if you have them as network devices, and the device enumeration order is unstable on each boot). Hugo. -- Hugo Mills | Geek, n.: hugo@... carfax.org.uk | Circus sideshow performer specialising in the eating http://carfax.org.uk/ | of live animals. PGP: E2AB1DE4 | OED