From mboxrd@z Thu Jan 1 00:00:00 1970 From: Goffredo Baroncelli Subject: Re: Cloning a Btrfs partition Date: Thu, 08 Dec 2011 20:22:19 +0100 Message-ID: <1335463.NujyoKUyEg@venice> References: Reply-To: Goffredo Baroncelli Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: linux-btrfs@vger.kernel.org To: Stephane CHAZELAS Return-path: In-Reply-To: List-ID: On Thursday, 08 December, 2011 10:00:54 Stephane CHAZELAS wrote: > Because of the same uuid, the btrfs commands like filesystem > show will not always give sensible outputs. I tried to rename > the fsid by changing it in the superblocks, but it looks like it > is alsa included in a few other places where changing it > manually breaks some checksums, so I guess someone would have to > write a tool to do that job. I'm surprised it doesn't exist > already (or maybe it does and I'm not aware of it?). The fs-uuid is recorded in the header of every tree block. >>From fs/btrfs/ctree.h [...] /* * every tree block (leaf or node) starts with this header. */ struct btrfs_header { /* these first four must match the super block */ u8 csum[BTRFS_CSUM_SIZE]; u8 fsid[BTRFS_FSID_SIZE]; /* FS specific uuid */ [...] Moreover I would be worried more about the uuid of the device than the filesystem one... -- gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) Key fingerprint = 4769 7E51 5293 D36C 814E C054 BF04 F161 3DC5 0512