Move pool to bigger pool

Ndropp92

Cadet
Joined
Dec 27, 2022
Messages
2
I bought 7 new hard drives. 4tb WD RED PLUS
I currently have 10 1tb disks in a raid z2 pool with not much data on it. I want to put 6 of the 4tb disks in a raid z2 format without losing data. Can i export the pool to my boot drive and import it from there?
Boot drive is 1tb NVME and i have less than 500gb on the nas currently.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
In theory, you can copy your current data pool to your boot-pool. But it's not export & import, that's for existing pool data. Check the un-used amount on your boot-pool using;
zfs list
The actual method to copy depends on what your want to do. If you have snapshots and lots of datasets that you want to preserve, then zfs send & receive would be the way to accomplish that. It's complicated because you need to make sure you copy your current pool as a new dataset on your boot-pool.
 

Ndropp92

Cadet
Joined
Dec 27, 2022
Messages
2
i do take daily snapshots. So i can zfs send my pool to the boot pool, zfs receive on the boot pool unplug all the old drives, plug in the new drives, then zfs list, create a new pool, and zfs send and receive from the boot to the new pool?
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
It is a bit more complicated. I can't give you exact commands as I tend to use short cuts that a less experienced person should not use.

But, here are the overall steps:
  1. Backup your configuration
  2. Verify your existing data pool with zpool status and if a scrub has not been run in the last 2 weeks, perform one and re-check your pool status after.
  3. If possible, backup your data else where, (like your laptop, desktop, etc...)
  4. Verify you have enough space in your boot-pool with zfs list which should show both free space in the boot-pool and used space in the data pool
  5. From command line, create a new top level dataset on your boot-pool for your data pool
  6. From command line, create a new migration snapshot on your data pool
  7. From command line, use ZFS send from your new migration snapshot on your data pool, to the NEW boot-pool dataset
  8. When done, use zfs list against the NEW boot-pool dataset to see if the used space is similar to your source data pool. If good, proceed. Else figure out what went wrong.
  9. Export your existing data pool from the GUI
  10. Shutdown the server, remove the 10 x 1TB disks making note which went into which slots, in case you back out your change.
  11. Install the new 6 x 4TB disks, make note which serial numbers went into which slots.
  12. Boot the TrueNAS. You might get boot time errors about your old data pool, because it's not available.
  13. Use the GUI to create your new ZFS pool with the 6 x 4TB disks, use the same pool name as before
  14. Use the command line to ZFS send from your NEW boot-pool dataset to your new data pool
  15. When complete, use zfs list against the new data pool to see if the used space is similar to your NEW boot-pool. If good, proceed. Else figure out what went wrong.
  16. Reboot
As I said, these are rough steps. In general, this is more intermediate skill set and not beginner work. Less experienced people might make a mistake that could cause data loss. I list these steps more to give people the knowledge that TrueNAS is both an appliance and an OS, which can allow unusual, (but un-supported), advanced work.

Good luck.
 
Last edited:
Top