Moving everything to a bigger pool

Joined
Oct 20, 2016
Messages
34
I posted this originally at the end of the thread mentioned below, but realised that as it was under the FreeNAS (Legacy Software Releases) section and I'm using TrueNAS Core I should probably post it here instead.

I currently have TrueNAS Core 12.0-U8 running with a single RAID-Z1 pool of 3 x 1TB drives. I want to change everything over to a single mirrored pool of two new 12 TB drives, after which I would retire the old 3 x 1TB drives or use them elsewhere.
  1. Are the instructions at the start of the thread "Howto: migrate data from one pool to a bigger pool" from @depasseg still the best way to do this?
  2. The existing pool is not encrypted (if I understand correctly, what I should really say is that none of the datasets in this pool are encrypted). If I want to use encryption after I move everything to the new drives, will @depasseg’s method work, or will zfs replication mean that the copied datasets on the new drives are unencrypted, even if I initially set up the destination pool as encrypted?
The system dataset (including the system logs) is currently on the original pool too. I don’t have a third pool available, so I would have to move the system dataset onto the boot-pool temporarily while doing the migration.

As I set the original pool up just to get started learning about TrueNAS, I don’t have a lot of critical data on it yet. I have a single SMB share in one dataset (with no important data), and the virtual disks of a couple of VMs in another dataset. The VMs would be a little trouble to recreate, but they contain nothing critical. I’m therefore also wondering whether it would be simpler just to create a new pool with the new drives, recreate the SMB share on that pool, individually replicate the VM zvols to the new pool if I don’t want to recreate them, and move the system dataset over. I presume this would work too?
 

EnKo

Dabbler
Joined
Jan 9, 2022
Messages
32
Since I am too lazy to read the complete thread you linked I would like too give you a few ideas about your question:
  • Do you own the two 12 TB devices already? In case yes, is it an option for you to buy another one? In case no, is it an option to buy three 6 TB or 8 TB devices? In both cases you could simply replace the smaller devices one by one and this would be the most easy way in my opinion.
  • You have to setup encryption before you create the pool. If you want to use encryption you have to (re-) create the pool anyway.
  • If you can add your new devices beside the old devices, you can simple create a new pool with them and using SSH-interface from your PC or replication task from your web-interface to copy the files from one pool to the other. You can re-create the VMs with the same settings on your new pool, using the copy of DISK instead of the original one.
  • You can change the system dataset from the old pool to a new pool. I never did this so I don't know exactly how it works. You have to assure you have a backup/download of you configuration file (and secret seed if you use encryption) before you do this.
  • Maybe you can use this opportunity to setup your TrueNAS from beginning new, if you are not happy with your current configuration anyway. In this case, also backup/download your original setup! Better use another device to install TrueNAS, so you have the previous one unchanged in case of problems with the new one.
 
Joined
Oct 20, 2016
Messages
34
Sorry for the delay in replying; other things got in the way of working on this. Thank you for your reply!

Since I am too lazy to read the complete thread you linked I would like too give you a few ideas about your question:
  • Do you own the two 12 TB devices already? In case yes, is it an option for you to buy another one? In case no, is it an option to buy three 6 TB or 8 TB devices? In both cases you could simply replace the smaller devices one by one and this would be the most easy way in my opinion.
I do own the two 12 TB devices already. It might be an option to buy more, and in fact I'm considering going to four drives as RAID-Z2. Unfortunately, of course, this would still not allow me to replace the 3 RAID-Z1 drives one by one, though...

  • You have to setup encryption before you create the pool. If you want to use encryption you have to (re-) create the pool anyway.
If I create a new encrypted pool, is there any issue with replicating from an unencrypted pool to an encrypted one when I transfer the files across? Or am I confusing encrypted/unencrypted pools with encrypted/unencrypted datasets?

At the moment, I am considering moving the system dataset onto the boot drive temporarily, and simply getting rid of the old pool and creating a new one, maybe even recreating the VMs from scratch (as I haven't done much with them yet).
 

EnKo

Dabbler
Joined
Jan 9, 2022
Messages
32
RAID-Z2 is surely the better choice. Be aware, the number is devices for a pool is fixed after creation. E. g. if you have a pool of 4 discs each 12 TB you can replace single disks by bigger ones, but not add or remove disks in total, to have a 3 or 5 disk pool for example. The bigger the pool/data, the bigger the problem if you want to transfer data.

If you can connect the new disks beside the old disks, best way is to create the pool with the new disks and transfer the data directly from old pool to new one. If you have not enough connectors, using the boot device could be an option, if this is a redundant device and there is enough space. And last option is to use an external disk.
 
Joined
Oct 20, 2016
Messages
34
Thanks! Yes, I'm aware I won't be able to change from 4 disks to 5 disks later (at least, not without recreating the pool). Nevertheless, I decided to go for 4 disks instead of 5 because (1) I chose the 12TB drives because they were quieter than the smaller-capacity drives, and (2) I can't justify buying 5 of them because I'm convinced ~24 TB of space will be more than enough for several years for my purposes, and ~36 TB would be excessive, and I'm happy with the redundancy with 4 drives.

Right now I won't have enough connectors to connect all drives at the same time. However, I don't actually have much important data on the old pool yet, so I think it will be OK if I temporarily put the system dataset on the boot device and move anything else via an external drive.
 
Top