linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephane CHAZELAS <stephane_chazelas@yahoo.fr>
To: linux-btrfs@vger.kernel.org
Subject: Re: Cloning a Btrfs partition
Date: Thu, 8 Dec 2011 16:27:46 +0000 (UTC)	[thread overview]
Message-ID: <slrnje1pc2.lfa.stephane.chazelas@spam.is.invalid> (raw)
In-Reply-To: 4EE0DC86.9080005@cfl.rr.com

2011-12-08, 10:49(-05), Phillip Susi:
> On 12/7/2011 1:49 PM, BJ Quinn wrote:
>> What I need isn't really an equivalent "zfs send" -- my script can do
>> that. As I remember, zfs send was pretty slow too in a scenario like
>> this. What I need is to be able to clone a btrfs array somehow -- dd
>> would be nice, but as I said I end up with the identical UUID
>> problem. Is there a way to change the UUID of an array?
>
> No, btrfs send is exactly what you need.  Using dd is slow because it 
> copies unused blocks, and requires the source fs be unmounted.
[...]

Not necessarily, you can snapshot them (as in the method I
suggested). If your FS is already on a device mapper device, you
can even get away with not unmounting it (freeze, reload the
device mapper table with a snapshot-origin one and thaw).

> and the destination be an empty partition.  rsync is slow
> because it can't take advantage of the btrfs tree to quickly
> locate the files (or parts of them) that have changed.  A
> btrfs send would solve all of these issues.
[...]

When you want to clone a FS using a similar device or set of
devices, a tool like clone2fs or ntfsclone that copies only the
used sectors across sequentially would probably be a lot more
efficient as it copies the data at the max speed of the drive,
seeking as little as possible.

-- 
Stephane


  parent reply	other threads:[~2011-12-08 16:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bb747e0c-d6d8-4f60-a3f6-cf64c856515e@mail.placs.net>
2011-12-07 18:35 ` Cloning a Btrfs partition BJ Quinn
2011-12-07 18:39   ` Freddie Cash
2011-12-07 18:49     ` BJ Quinn
2011-12-08 15:49       ` Phillip Susi
2011-12-08 16:07         ` BJ Quinn
2011-12-08 16:09           ` Jan Schmidt
2011-12-08 16:28             ` BJ Quinn
2011-12-08 16:41               ` Jan Schmidt
2011-12-08 19:56                 ` BJ Quinn
2011-12-08 20:05                   ` Chris Mason
2011-12-08 20:38                     ` BJ Quinn
2011-12-12 21:41                     ` BJ Quinn
2011-12-13 22:06                       ` Goffredo Baroncelli
2011-12-30  0:25                       ` BJ Quinn
2012-01-12  0:52                         ` BJ Quinn
2012-01-12  6:41                         ` Chris Samuel
2011-12-08 16:27         ` Stephane CHAZELAS [this message]
2011-12-08 10:00   ` Stephane CHAZELAS
2011-12-08 19:22     ` Goffredo Baroncelli
2013-07-29  8:21 Fwd: " Jan Schmidt
2013-07-29 15:32 ` BJ Quinn
2013-07-30 10:28   ` Jan Schmidt
2013-08-19 20:45     ` BJ Quinn
2013-08-20  9:59       ` Xavier Bassery
2013-08-20 15:43         ` BJ Quinn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrnje1pc2.lfa.stephane.chazelas@spam.is.invalid \
    --to=stephane_chazelas@yahoo.fr \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).