Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month, online, via Jitsi Meet.

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] ZFS On Linux "in" Debian, migration from Btrfs



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.



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org