[PATCH] btrfs-progs: optionally enforce chroot for btrfs receive

2015-04-18 Thread Lauri Võsandi
This patch forces btrfs receive to issue chroot before parsing the btrfs stream using command-line flag -C to confine the process and minimize damage that could be done via malicious btrfs stream. Signed-off-by: Lauri Võsandi lauri.vosa...@gmail.com --- cmds-receive.c | 37

[PATCH] btrfs-progs: optionally enforce chroot for btrfs receive

2015-04-18 Thread Lauri Võsandi
This patch forces btrfs receive to issue chroot before parsing the btrfs stream using command-line flag -C to confine the process and minimize damage that could be done via malicious btrfs stream. Signed-off-by: Lauri Võsandi lauri.vosa...@gmail.com --- cmds-receive.c | 37

system frozen during send/receive

2015-04-18 Thread Christoph Anton Mitterer
Hi. As mentioned before on the list, I'm just playing with send/receive. The first huge disappointment (after copying already hundreds of gigabytes for hours) was, that when I Ctrl-Z the sending/receiving pipe (to give the disks a little bit of rest to cool down) can resuming it (fg) it

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.

How to repair a BTRFS block?

2015-04-18 Thread Martin Monperrus
Dear Btrfs developers, For some unknown reasons, my BTRFS filesystem is corrupted. dmesg prints |BTRFS critical (device sda2): corrupt leaf, slot offset bad: block=43231330304,root=1, slot=47| (more than 1000x in the dmesg trace). btrfs check --repair fails with: read block failed

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

Re: incremental full file backups to smaller mediums possible?

2015-04-18 Thread Martin Steigerwald
Am Samstag, 18. April 2015, 01:03:23 schrieb Christoph Anton Mitterer: On Thu, 2015-04-09 at 16:33 +, Hugo Mills wrote: btrfs sub find-new might be more helpful to you here. That will give you the list of changed files; then just feed that list to your existing bin-packing