On Mon, Dec 28, 2015 at 12:01:39AM +0100, Christoph Anton Mitterer wrote: > On Mon, 2015-12-28 at 02:27 +1100, Jiri Kanicky wrote: > > Thanks for the reply. Looks like I will have o use some newer > > distro. > As it was already said... btrfs may even corrupt your filesystem if > colliding UUIDs are "seen". > > At least to me it's currently unclear what "seen" exactly means... > actually trying a mount, or already when just a device with colliding > IDs appear.
The damage happens on (or after) mount. Until that point there's no danger. The OS (usually udev) will run btfs dev scan when a new block device is detected, and it tells the kernel that there's a btrfs filesystem with a particular UUID on a particular block device. The kernel uses this information to decide which devices to include when it assembles a filesystem. If you have two devices where there should be only one (particularly if the data on the two was similar but has now diverged), then the kernel can end up writing to one or other device arbitrarily, possibly having read state from the other one, and things screw up rather fast. Hugo. > So whenever you do your recovery works, make sure that there's never a > moment where more than one btrfs block device appears with the same > UUID. > Even when it's just for some seconds it may already cause corruption. > > > Cheers, > Chris. -- Hugo Mills | emacs: Eats Memory and Crashes. hugo@... carfax.org.uk | http://carfax.org.uk/ | PGP: E2AB1DE4 |
signature.asc
Description: Digital signature