So I am running TrueNAS Scale as my primary NAS system and I have an old Synology system that I use to backup all the TrueNAS data. I currently have a pool, let's call it "tank1" that is composed of 4 16TB drives in a RAIDZ1 configuration, but I just recently purchased 6 new 18TB drives that I would like to replace this with using a RAIDZ2 configuration.
What I would like to do is take all the datasets/configuration/etc on tank1 and move it to the new tank2 that's composed of 6 18TB drives. Essentially the new tank2 should be an exact clone of what tank1 is today ie all the configuration, datasets, files, timestamps, etc should be the same... a "clone". Once that's done, and rigorously tested to make sure everything is still there :), I would like to wipe and remove the original 4 drives and move them over to my Synology to use for additional backup storage. Then I'd like to rename tank2 to tank1 so that nothing will appear to be different (other than the fact that it's now in a 6 drive RAIDZ2 configuration).
My question, what's the best way to do this? I looked around the Scale GUI and I didn't see anything explicitly looked like it would handle it but I found this discussion (https://serverfault.com/questions/88638/moving-a-zfs-filesystem-from-one-pool-to-another) that seems to indicate that this process would essentially be what I want to do:
# Do the initial send
zfs snapshot -r tank1@golden
zfs send -R tank1@golden | zfs receive -F tank2
# Shut everything down ???? and rerun
zfs snapshot -r tank1@golden2
zfs send -Ri tank1@golden tank1@golden2 | zfs receive -F tank2
A couple questions:
What I would like to do is take all the datasets/configuration/etc on tank1 and move it to the new tank2 that's composed of 6 18TB drives. Essentially the new tank2 should be an exact clone of what tank1 is today ie all the configuration, datasets, files, timestamps, etc should be the same... a "clone". Once that's done, and rigorously tested to make sure everything is still there :), I would like to wipe and remove the original 4 drives and move them over to my Synology to use for additional backup storage. Then I'd like to rename tank2 to tank1 so that nothing will appear to be different (other than the fact that it's now in a 6 drive RAIDZ2 configuration).
My question, what's the best way to do this? I looked around the Scale GUI and I didn't see anything explicitly looked like it would handle it but I found this discussion (https://serverfault.com/questions/88638/moving-a-zfs-filesystem-from-one-pool-to-another) that seems to indicate that this process would essentially be what I want to do:
# Do the initial send
zfs snapshot -r tank1@golden
zfs send -R tank1@golden | zfs receive -F tank2
# Shut everything down ???? and rerun
zfs snapshot -r tank1@golden2
zfs send -Ri tank1@golden tank1@golden2 | zfs receive -F tank2
A couple questions:
- Ideally I'd like to keep this system up and available for use during the initial send as there is ~36TB of data to send and this will probably take a while. Would this accomplish what I want?
- For the second part what does "shut everything down" entail? Do I just shutdown all the docker services I have and then go to the TrueNAS GUI System->Services and turn all those off? Is that it or is there some "safe mode" I should be in to really accomplish this correctly?
- Once the receive is done how do I just rename tank1->tankOld and tank2->tank1? Someone mentioned changing mount points but I'm not familiar with that in zfs/TrueNAS.
- Also, according to the TrueNAS Storage GUI, tank1 also contains my System Dataset Pool. I have a set of mirrored SSDs that I think I'd rather have this living on though. Is there an easy way to move that over in the current GUI before I do this move?
- Also there was mention of using "pv" to get an estimated ETA for the initial transfer... eg something like "zfs send -R tank1@golden | pv -s [total-estimated-size] | zfs receive -F tank2". I guess that's the best way to get an ETA? It won't slow down the transfer I assume?