Replacing a Btrfs drive - best practices?

Ken D'Ambrosio ken at jots.org
Mon Nov 6 21:19:47 UTC 2017


What you want to do is:

1) Set up your new RAID with the new disks.
2) Use "btrfs send" to send over your old volumes/snapshots.  It can be 
a bit tricky, so give it a try, and if you still have problems, ping me 
either here or directly, and I'll see if I can't step you through it.

Good luck!

-Ken

P.S.  Just for reference, here's the btrfs send/receive that I used the 
other day to do an initial backup:

btrfs send /bigdisk-01/snapshots/newlxc-2017-10-24_13-28-RO | pv -L 25m 
-b -a | btrfs receive /tmp/dest/backups/

Notes:
1) You have to first create a read-only snapshot of the volume/snapshot 
you want to send.
2) The "pv -L 25m -b -a" is just so I can watch progress; otherwise, you 
don't have any good way to tell how long it's going to take.
3) On the destination, you'll receive a read-only copy, as well.  You 
can then make a snapshot of *that* that's read-write.


On 2017-11-06 16:03, Liam Proven wrote:
> On 6 November 2017 at 19:12, Matthew Crews <mailinglists at mattcrews.com> 
> wrote:
> 
>> 
>> Finally, which is the preferred method, or is there a better method 
>> than the
>> ones I've listed?
> 
> Disclaimer: I know virtually about Btrfs.
> 
> If it were me, I'd take method 2.
> 
> No, *AFAIK* rsync _won't_ copy snapshots. I think you'd have to
> duplicate the partition at block level.
> 
> --
> Liam Proven • Profile: https://about.me/liamproven
> Email: lproven at cix.co.uk • Google Mail/Talk/Plus: lproven at gmail.com
> Twitter/Facebook/Flickr: lproven • Skype/LinkedIn/AIM/Yahoo: liamproven
> UK: +44 7939-087884 • ČR/WhatsApp/Telegram/Signal: +420 702 829 053




More information about the ubuntu-users mailing list