Re: Impossible to mount two different copies of the same btrfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 27, 2015 at 07:32:29PM +0200, carlo von lynX wrote:
> Hi there. Excuse me if I didn't subscribe the list. Just wanted to
> let you know of this behavior assuming you haven't noticed it yet.

   Thanks for the thought. :)

> When mounting two copies of the same file system from two different
> hard disks with the intention of syncing the older with the newer
> one, btrfs behaves differently from ext4: it will mount the first
> one twice rather than mounting each. I assume it has something to
> do with all UUIDs being identical, which doesn't disturb ext4 though.

   When you have a multi-device filesystem, all of the devices contain
a filesystem with the same UUID (because it's the same filesystem).
btrfs therefore uses the UUID to distinguish between filesystems,
whereas ext4 can simply use the device ID (major,minor). Create two
devices containing a copy of the same filesystem, btrfs sees two
devices with the same UUID on them, and decides they're a part of the
same FS.

> This only happens with btrfs - I cannot mount two file systems that
> happen to have the same UUID (or are deemed identical by some other
> criterion I cannot determine). I presume this is not intended
> behavior. I tried relabeling one of the copies, but it didn't have
> any effect. Now I'm looking into ways to change the UUID.

   It's well-known behaviour, and documented on the btrfs wiki's
Gotchas page -- first item in the list, in fact. :) Basically, it's
likely to give you results somewhere between "doesn't work" and "eats
your filesystem, sets fire to your sofa and feeds strychnine to your
cat"(*). I can't really recommend trying it.

   You can change the UUID offline using a recent (4.1 or later)
version of btrfstune.

   Hugo.

(*) No sofas were harmed in the writing of this email.

-- 
Hugo Mills             | You know... I'm sure this code would seem a lot
hugo@... carfax.org.uk | better if I never tried running it.
http://carfax.org.uk/  |
PGP: E2AB1DE4          |

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux