Thinking of migrating ZFS server to Debian with BTRFS

jhu

Lifer
Oct 10, 1999
11,918
9
81
Currently have my FreeBSD system with 2x 2TiB drives in the RAID1 equivalent using ZFS. Since I'm pretty close to filling up the drives, I was thinking about migrating to larger drives with Debian and BTRFS. How would I setup the equivalent to my current system?
 
Feb 25, 2011
16,822
1,493
126
plug the zfs drives into the new system, import the zpool, and copy the data to the new disks?
 

dealcorn

Senior member
May 28, 2011
247
4
76
Your question has many dimensions. The Debian installer can format an installation target as a single BTRFS drive, but it can not natively install to BTRFS RAID1. After install, convert the target to RAID1 using the "Conversion" feature described: https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices. While both BTRFS and ZFS are Copy on Write designs, they are different critters and you should start by spending time with the BTRFS Wiki. BTRFS RAID1 may not work how you think it does so, for example, a 3 disk RAID 1 array works fine. The above link is a page within that Wiki. You should understand, for example, that the command "df" is worthless for checking whether you have free space and you need to write, for example, "btrfs fi usage /".

BTRFS is stabilizing rather than stable and it is prudent to subscribe to the BTRFS mailing list. Within the "Status" page of the Wiki, RAID1 is noted as stable (while RAID56 is not). Still the mailing list advice suggests that you follow either the most recent kernel or the latest version of the most recent long term support kernel. I got tired of constantly compiling kernels and now, in a home use setting for several normally off RAID1 servers, I just follow the most current Debian kernel and version of BTRFS-tools from the Debian Stable updates repository. Also, highly regarded documentation is provided by: https://wiki.debian.org/Btrfs#Maintenance.

Unlike ZFS, BTRFS permits you to install "/" on your array together with data that may be exported. My personal preference is to install to a subvolume rather than directly to the file system. This is not natively supported by the Debian installer so I follow the procedure: https://aykevl.nl/2015/11/debian-btrfs-subvolume. It is not intuitively obvious on inspection of a name how to distinguish a subvolume from a directory. I follow the Ubuntu convention of naming all subvolumes the the character "@" such as @ and @home. Lastly, BTRFS does not support swap. Either create a separate partition or skip it. BTRFS lacks the memory hunger and pickiness of ZFS. I believe Phoronix has some comparative performance benchmarks for RAID1. I have no experience with data loss or corruption on BTRFS RAID 1 and it is more affordable than ZFS.
 
Last edited:
Reactions: jhu

jhu

Lifer
Oct 10, 1999
11,918
9
81
Thank you for your insight. I've also read that a 3 drive RAID 1 on BTRFS doesn't work the same way as on ZFS (ZFS writes to all 3 drives, BTRFS only makes sure there's 2 copies, unless things have changed).

Right now I have 1 drive for the OS and 2 drives using ZFS. Guess I'll stick with ZFS since I can wrap my brain around it.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |