Chris Murphy <li...@colorremedies.com> schrieb:

> On Sat, Apr 18, 2015 at 10:09 AM, Kai Krakow <hurikha...@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.

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to