From: Kai Krakow <hurikhan77@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: Re: how to clone a btrfs filesystem
Date: Sat, 18 Apr 2015 18:36:05 +0200 [thread overview]
Message-ID: <moda0c-jgd.ln1@hurikhan77.spdns.de> (raw)
In-Reply-To: CAJCQCtRCvO5hE1Fo6Y=2rk7Amg6KQtm2gcUvFQTu2r=9kErvNQ@mail.gmail.com
Chris Murphy <lists@colorremedies.com> schrieb:
> On Sat, Apr 18, 2015 at 10:09 AM, Kai Krakow <hurikhan77@gmail.com> wrote:
>
>> You could simply "btrfs device add" the new device, then "btrfs device
>> del" the old device...
>
> That wipes the btrfs signature (maybe the entire superblock, I'm not
> sure) from the deleted device. It needs to be a seed device first to
> prevent that, which makes it ro.
Yeah, I figured I forgot about the "copy" requirement Cristoph mentioned...
My suggestions only works for cloning if you want to actually migrate from
the old to the new device, and no longer use the old one.
I wonder if one could split mirrors in btrfs... Read:
btrfs device add the new device, set the raid policy for data, meta data,
and system to raid-1, balance, and then unmount and detach one of the
devices.
I'm not sure how to get out of the degraded state then. Is it possible to
simply resort from raid-1 to single raid policy again and remove the missing
device from the pool? Regarding data, it should contain everything needed
for running the filesystem - so it should have no problem here.
I guess there's one caveat: The signature of both devices will then indicate
they are belonging to the same pool, making it impossible to ever attach
those to the same system again without causing trouble for your data. If one
could change that to make both devices distinct filesystems, it could be
used to implement a "btrfs filesystem clone" call.
--
Replies to list only preferred.
next prev parent reply other threads:[~2015-04-18 16:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-17 23:08 how to clone a btrfs filesystem Christoph Anton Mitterer
2015-04-18 4:24 ` Russell Coker
2015-04-18 5:17 ` Christoph Anton Mitterer
2015-04-18 15:02 ` Russell Coker
2015-04-19 3:56 ` Duncan
2015-04-19 20:00 ` Christoph Anton Mitterer
2015-04-20 5:23 ` Duncan
2015-04-20 16:32 ` Christoph Anton Mitterer
2015-04-18 8:10 ` Martin Steigerwald
2015-05-07 5:14 ` Paul Harvey
2015-05-07 18:57 ` Martin Steigerwald
2015-05-08 3:22 ` Paul Harvey
2015-04-18 16:09 ` Kai Krakow
2015-04-18 16:23 ` Kai Krakow
2015-04-18 16:23 ` Chris Murphy
2015-04-18 16:36 ` Kai Krakow [this message]
2015-04-19 20:33 ` Chris Murphy
2015-04-18 16:20 ` Chris Murphy
2015-04-18 17:23 ` Christoph Anton Mitterer
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=moda0c-jgd.ln1@hurikhan77.spdns.de \
--to=hurikhan77@gmail.com \
--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).