Migration strategy - expanding and upgrading from legacy encryption at once

Absestos

Cadet
Joined
Feb 4, 2021
Messages
6
I have an 8x8TB RAIDz2 that uses legacy GELI encryption and has less than 3TB worth of free space. The server running hase enough space and SATA ports for 10 drives.

I have purchased 8 16TB HDDs and would like to expand and migrate to native ZFS encryption in a single step. To do so I'm thinking of doing the following:
  1. Purchase an extra HDD, the bigger the better within budget.
  2. Hook up the HDD to the one spare slot and SATA port, create a single disk zpool using it.
  3. Create a clone of my existing pool
  4. Run rsync with --remove-source-files from the clone to the single disk. Let rsync fail due to insufficient space
  5. Export the RAIDz2 pool, swap the 8 8TB disks with the 8 16TB disks
  6. Create a new RAIDz2 pool with native ZFS encryption
  7. rsync from the single disk to the RAIDz2
  8. Export RAIDz2 pool. Swap back the old 8 disks. Import pool
  9. Delete and recreate the single disk zpool
  10. Run rsync with --remove-source-files from the clone to the single disk. Let rsync fail due to insufficient space
  11. Export RAIDz2 pool. Swap new 8 disks. Import
  12. rsync from the single disk to the RAIDz2
  13. Repeat steps 8-12 until clone is empty
Is it possible to migrate in this manner? I should have a copy of the data at all times in the old 8 disks and ZFS would detect any data corruption when copying from/to the single disk, even if it could not recover automatically - correct?

My original idea was to buy a cheap 2nd hand PC and migrate over the network, but I guess this would be safer.
 

Kailee71

Contributor
Joined
Jul 8, 2018
Messages
110
TBH...
A strategy that requires me to read through it 3 times and still not understand clearly what you're trying to achieve doesn't sound like a bankable proposition to me. I mean, I'm no genius by any measure but - have you considered failure points? How many of those are in that description alone?

If you value your data then you have a backup(-server). Use the backup to migrate. Done.

There - one line, no single point of failure. That's something I would be more comfortable with if it were my stuff.

If you don't have a backup(-server) then I'd be very interested to know how you would expand and re-encrypt at the same time given your (sata ports) limitations. In any case this is going to be a long process...

Kai.
 
Joined
Oct 22, 2019
Messages
3,641
I was writing up a response, but like @Kailee71, I had to read the steps multiple times and I have no idea what's going on. Right off the bat, using rsync with "--remove-source-files" is reserved for thrill seekers.

I take it you're trying to dump "a bunch of files at a time" until your new pool runs out of space, at which point you'll keep degrading your old pool to rsync more files to the new striped (expanded) pool until it runs out of space again, rinse and repeat, until you can then just go ahead and finish expanding the new pool...

That is absolutely dangerous. You will put your data at an extremely high risk of being lost forever.

Do you have a backup of the current pool?

Remember, when sizing your NAS and budgeting, you have to factor the costs of your backup as well, before you begin. Budgeting for a NAS of, say, 12TB total capacity should really budget for 24TB total capacity.
 
Last edited:
Top