[Discuss] ZFS On Linux "in" Debian, migration from Btrfs
Rich Pieri
richard.pieri at gmail.com
Fri May 20 18:59:17 EDT 2016
I've done a test migration using a VM and some small (20GB) volumes. It
works with a couple of caveats:
* You need to have enough free space available in the Btrfs set to
evacuate at least one full ZFS vdev worth of devices.
* If you are using raid10 data and metadata then you may need to convert
to raid1 in order to evacuate those disks.
Here are the steps for a 4 disk, raid1 Btrfs set:
* Make sure you have a good backup of your data.
* Evacuate two disks from the set:
btrfs device delete /dev/sdb /btrfs
btrfs device delete /dev/sdc /btrfs
* Create the first vdev:
zpool create -f zfs mirror sdb sdc
* Replicate Btrfs subvolumes as ZFS datasets:
zfs create zfs/foo
.....
* Copy data from Btrfs to ZFS:
rsync -avxSHP /btrfs/ /zfs/
* Unmount the Btrfs volume.
* Create the second vdev and add it to the pool:
zpool add zfs mirror sdd sde
Done.
After performing this process on a test VM I decided that I probably
won't use it for real. Two reasons. The first is that I don't have
capacity for evacuating two disks at once. The second is that ZFS
currently lacks a mechanism for automatically balancing device pools so
the data as migrated would all be on one vdev.
As I will be dependent on backups for restoring my data it makes sense
to me to use backups for everything.
--
Rich P.
More information about the Discuss
mailing list