Replacing a Btrfs drive - best practices?

Matthew Crews mailinglists at mattcrews.com
Mon Nov 6 23:14:46 UTC 2017


>-------- Original Message --------
>Subject: Re: Replacing a Btrfs drive - best practices?
>Local Time: November 6, 2017 2:19 PM
>UTC Time: November 6, 2017 9:19 PM
>From: ken at jots.org
>To: "Ubuntu user technical support, not for general discussions" <ubuntu-users at lists.ubuntu.com>
>Matthew Crews <mailinglists at mattcrews.com>
>
>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:
>3. You have to first create a read-only snapshot of the volume/snapshot
> you want to send.
>4. 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.
>5. On the destination, you'll receive a read-only copy, as well.  You
> can then make a snapshot of that that's read-write.

Thank you, this seems to be the most optimal method. I can then go and edit my fstab afterwards, and it should be golden.

Curious, why rate limit to 25 MiB/sec? Seems arbitrarily slow unless you are sending across a network. ("pv -L 25m" rate limits to 25 MiB/sec)


More information about the ubuntu-users mailing list