Re: how to clone a btrfs filesystem

2015-04-20 Thread Christoph Anton Mitterer
On Mon, 2015-04-20 at 05:23 +, Duncan wrote: Which, given the common developer wisdom about premature optimization, can be explained. But accepting that explanation, one is still stymied by the fact that all the previous warnings about btrfs being in heavy development, keep good

Re: how to clone a btrfs filesystem

2015-04-19 Thread Chris Murphy
On Sat, Apr 18, 2015 at 10:36 AM, Kai Krakow hurikha...@gmail.com wrote: 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

Re: how to clone a btrfs filesystem

2015-04-19 Thread Christoph Anton Mitterer
On Sun, 2015-04-19 at 01:02 +1000, Russell Coker wrote: An rsync on block devices wouldn't lose BTRFS checksums, you could run a scrub on the target at any time to verify them. For a dd or anything based on that the target needs to be at least as big as the source. But typical use of

Re: how to clone a btrfs filesystem

2015-04-19 Thread Duncan
Christoph Anton Mitterer posted on Sun, 19 Apr 2015 22:00:24 +0200 as excerpted: Most of the time, only one of the two disks shows activity, while the other is reading respectively writing. The CPU isn't really under full load either (not even a single core),... it's rather in the 5-10%

Re: how to clone a btrfs filesystem

2015-04-18 Thread Russell Coker
On Sat, 18 Apr 2015, Christoph Anton Mitterer cales...@scientia.net wrote: On Sat, 2015-04-18 at 04:24 +, Russell Coker wrote: dd works. ;) There are patches to rsync that make it work on block devices. Of course that will copy space occupied by deleted files too. I think both

Re: how to clone a btrfs filesystem

2015-04-18 Thread Christoph Anton Mitterer
On Sat, 2015-04-18 at 10:20 -0600, Chris Murphy wrote: Make the source a seed device, add new device, delete seed. Once that completes, unmount, unset btrfs seed, and now the two devices are separate fs volumes each with unique UUID. There may still be bugs with seed device, it's been maybe 6

Re: how to clone a btrfs filesystem

2015-04-18 Thread Chris Murphy
On Fri, Apr 17, 2015 at 5:08 PM, Christoph Anton Mitterer cales...@scientia.net wrote: Hey. I've seen that this has been asked some times before, and there are stackoverflow/etc. questions on that, but none with a really good answer. How can I best copy one btrfs filesystem (with snapshots

Re: how to clone a btrfs filesystem

2015-04-18 Thread Kai Krakow
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

Re: how to clone a btrfs filesystem

2015-04-18 Thread Kai Krakow
Christoph Anton Mitterer cales...@scientia.net schrieb: Hey. I've seen that this has been asked some times before, and there are stackoverflow/etc. questions on that, but none with a really good answer. How can I best copy one btrfs filesystem (with snapshots and subvolumes) into

Re: how to clone a btrfs filesystem

2015-04-18 Thread Kai Krakow
Kai Krakow hurikha...@gmail.com schrieb: Christoph Anton Mitterer cales...@scientia.net schrieb: Hey. I've seen that this has been asked some times before, and there are stackoverflow/etc. questions on that, but none with a really good answer. How can I best copy one btrfs filesystem

Re: how to clone a btrfs filesystem

2015-04-18 Thread Chris Murphy
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

Re: how to clone a btrfs filesystem

2015-04-18 Thread Duncan
Russell Coker posted on Sun, 19 Apr 2015 01:02:42 +1000 as excerpted: Some additional questions: a) Can btrfs send change anything(!) on the source fs? b) Can one abort (Ctrl-C) a send and/or receive... and make it continue at the same place were it was stopped? A yes, B I don't know.

Re: how to clone a btrfs filesystem

2015-04-18 Thread Martin Steigerwald
Am Samstag, 18. April 2015, 01:08:44 schrieb Christoph Anton Mitterer: Hey. Hi Christoph, I've seen that this has been asked some times before, and there are stackoverflow/etc. questions on that, but none with a really good answer. How can I best copy one btrfs filesystem (with snapshots

how to clone a btrfs filesystem

2015-04-17 Thread Christoph Anton Mitterer
Hey. I've seen that this has been asked some times before, and there are stackoverflow/etc. questions on that, but none with a really good answer. How can I best copy one btrfs filesystem (with snapshots and subvolumes) into another, especially with keeping the CoW/reflink status of all files?

Re: how to clone a btrfs filesystem

2015-04-17 Thread Russell Coker
On Fri, 17 Apr 2015 11:08:44 PM Christoph Anton Mitterer wrote: How can I best copy one btrfs filesystem (with snapshots and subvolumes) into another, especially with keeping the CoW/reflink status of all files? dd works. ;) And ideally incrementally upgrade it later (again with all

Re: how to clone a btrfs filesystem

2015-04-17 Thread Christoph Anton Mitterer
On Sat, 2015-04-18 at 04:24 +, Russell Coker wrote: dd works. ;) There are patches to rsync that make it work on block devices. Of course that will copy space occupied by deleted files too. I think both are not quite the solutions I was looking for. Guess for dd this is obvious,