ZFS Reuse Drives - Taking drives from one to another using zpool attach (expansion)

Friends,

In my home I have a Dell Poweredge R730xd with 8 SATA 5400rpm HDDs along with 2 SATA SSD boot/OS drives. I only turn it on here and there to do some backups because it is so dang loud. I'm going to decommission it and looking to reuse some of the drives.

I have a NEW machine that is using desktop components that will do the non-critical job and isn't crazy loud. It is capable of running 2 NVME drives and 4 SATA drives. I was going to use 2 NVME drives in ZFS mirror for the boot/OS pool (FreeBSD 15.1-RELEASE-p7 which includes zfs-2.4.2-1 which has raidz_expansion feature). The 4 SATA drives I plan on using ZFS RAIDZ1 so that I can achieve ~75% of the capacity and allow one disk failure at a time without any issue to the data.

My idea is organized in order as follows. I'm looking to see if I am crazy, if there is a better way, etc.
1. Remove 2 of the 8 HDD (zfs offline) from the Dell server and put them into the NEW machine. <risk is that I have no parity on the Dell at this point>
2. Create RAIDZ1 pool on the NEW machine with the pulled 2 HDDs.
3. ZFS snapshot on Dell. ZFS send/receive to the NEW machine's RAIDZ1 pool.
4. Verify the data on the NEW machine. (just ls, zfs list, zfs -t snapshot, etc?)
5. Destroy the Dell ZFS pool.
6. Take 2 more HDDs from the Dell and put into the NEW machine.
7. Attach 1 HDD to the NEW machine ZFS pool.
8. Do a zpool expansion (zpool attach). Monitor the expansion with zpool status
9. Once expansion is complete then add the last (4th) HDD to the NEW machine ZFS pool.
10. Expand the pool using zpool attach. Monitor the expansion with zpool status.
Once the expansion completes successfully I should have 4 of the SATA 5400rpm HDDs running one pool in RAIDZ1 allowing one disk failure.
11. Create new ZFS RAIDZ1 pool on Dell with the remaining 4 HDDs so that still has some usage and can also have one disk failure.

I'm looking to see if this the above is logical, if I am missing anything, little nuance things to watch out for or that will pain me later OR if there is simply a better way. I acknowledge that I can backup all of the original Dell pool data somewhere else but I don't have the capacity locally so I would have to spin up a VPS or something and I don't want to send all of the stuff to the cloud (if I have to, then i'll encrypt locally and will go this route if my above plan is just plain silly).
 
Where will you place the zroot on the new machine? Will you initially break the root mirror to place one SSD on each host?

How much data do you have to move from the Dell ZFS pool to the new machine?

You may be better off building the new pool on the Dell server, and then physically moving the disks to the new server (SATA backplane is faster than Ethernet).

Note that a RAIDZ1 pool with two disks will have the capacity of just one disk. If that's not enough, you could copy your original pool to a concat of two disks (assuming it fits), then free up the other 6 disks to create a RAIDZ1 pool of 4 disks, copy the concat to the new pool, and physically move the 4 disk pool to the new server.

There's a lot of risk in a plan like this. A little finger trouble could lead to a lot of grief... I would certainly want a way to recover...
 
Where will you place the zroot on the new machine? Will you initially break the root mirror to place one SSD on each host?
The Dell zroot will be left in place. The New machine will have two NVME cards running mirror that will have plain vanilla FreeBSD installed for zroot.
How much data do you have to move from the Dell ZFS pool to the new machine?
Less than 1TB and is on a gigabit network. I actually ran benchmarks/iperf3 between the Dell and New while thinking about this transition to ensure there isn't some bottleneck in-between.

You may be better off building the new pool on the Dell server, and then physically moving the disks to the new server (SATA backplane is faster than Ethernet).

Note that a RAIDZ1 pool with two disks will have the capacity of just one disk. If that's not enough, you could copy your original pool to a concat of two disks (assuming it fits), then free up the other 6 disks to create a RAIDZ1 pool of 4 disks, copy the concat to the new pool, and physically move the 4 disk pool to the new server.

There's a lot of risk in a plan like this. A little finger trouble could lead to a lot of grief... I would certainly want a way to recover...
I agree that doing it locally in the same machine is going to be the fastest and probably the safest but the issue is that the Dell server isn't running a version of ZFS that is capable of expanding a RAIDZ pool. I may be able to do some snapshots or a boot environment change to get it to work but I feel like the work and risk level with that is likely higher.

If everything fails...... I do have a backup of the Dell pool data. I just want to do this without utilizing the backup if at all possible and only use the backup as a fail-safe.

Thank you so much for your response! It really is so useful to get another set of eyes on something as well as experience!
 
Do bear in mind that when you expand raidz, any data already in the pool retains the ratio of data/parity from the time it was written. If your data is mostly static, you might want to make sure it's rewritten.

I've never expanded raidz, but I wonder if it's really necessary to expand 1 disk at time.
 
bob2112 - Nearly all of the data is static. It is almost all family photos scanning back decades. It is constantly growing as we take photos. It was the original thought process to use enterprise 5400rpm drives rather than super fast drives as 99% of the data doesn't change at all.
My understanding, although I've never actually done it, is that expanding raidz requires 1 disk at a time but maybe someone can comment who knows for sure.
Also I'm not following the ratio of data/parity. How would I go about making sure it is rewritten?
 
One thing to be a little careful about is making sure that the labels get completely removed before creating a new zpool with them in it. I've had a minor annoyance recently of having a hard to remove label from an older zpool on it. It's safest to just do it right ahead of time, although having an extra zpool label in there isn't something that seems to cause problems, other than when importing if you can't recall which one it is.
 
Back
Top