19.03.2016 21:35, Chris Murphy пишет:
On Fri, Mar 18, 2016 at 11:32 PM, Andrei Borzenkov
wrote: 19.03.2016 04:00, Chris Murphy пишет:
On Fri, Mar 18, 2016 at 3:51 AM, Andrei Borzenkov
wrote: On Fri, Mar 18, 2016 at 2:39 AM, Chris Murphy
wrote: ... I have two subvolumes, root and home. I used to do separate boot, I don't anymore. Simple version is this:
cd /boot tar -acf bootefi.tar.gz efi/ mount -o subvolid=5 /dev/sdX /mnt cd /mnt btrfs sub snap -r root root.6 btrfs sub snap -r home home.6 btrfs send -p root.5 root.6 | ssh chris@ip 'btrfs receive /backups' btrfs send -p home.5 home.6 | ssh chris@ip 'btrfs receive /backups'
Do you need to create subvolumes on destination in advance or are they created automatically by btrfs receive?
They're created by receive. The very first send is different, it omits -p because it's not an incremental send. And with -p option on the send side, the receive side must already have that subvolume.
How does it verify that baseline snapshot is really unchanged? Using name only? I.e. if I rename completely unrelated subvolume as home.5 on destination, will it apply diff between source home.5 and home.6?
Only read-only snapshots can be sent received. Hence the -r when the snapshot is taken. I haven't looked at the code, but I expect names are only used by user space, where the subvol uuids are used behind the scene: each subvolume has its own uuid, a parent uuid, and a received uuid to keep track of relationships on and across volumes.
Like I mentioned in the example, home.5 must already be on the destination to incrementally send home.6. How do you rename an unrelated subvolume to match an existing subvolume name?
mv /home.5 /some-other-name mv /unrelated-subvolume /home.5
That would fail.
Why?
And even if it succeeded, the "fake" home.5 would not have the same parent uuid or received uuid as what's expected when using -p on the send side.
How send side knows what parent uuid to expect on receive side in the first place? This information should be kept somewhere. How can I see what parent uuid is expected for next operation? Not that I really understand what "parent" in case of btrfs means ... So the receive would fail.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org