Hey all, when I build my initial system I started out with 1 mirror pool pool1 made up of 2x1TB NVME SSDs. I later added a second mirror pool with 2x2TB SATA SSDs.
I then recently expanded the SATA SSD pool pool2 with another 2x2TB as a second vdev.
Though I now have regrets about doing so, as I think making a whole new pool pool tmp as a RAIDZ2, migrating pool2 to pool tmp, deleting pool2 and extending the new pool tmp RAIDZ2 with the then freed up 2x2TB SSDs would have been the much smart upgrade path.
I would have had the same redundancy as with the current 2 Mirror x 2 wide pool2 but much better failure protecting in the event of one disk failing within every vdev and potential higher performance.
Now how would one go about doing this now? My pool2 is not above 50% storage usage yet so removing the second MIRROR and setting up pool tmp would probably be possible without any data loss.
Would this even be advisable to do or should I just stick with the current 2x2 MIRROR setup?
In the event I would make the switch which steps would be involved in the Truenas UI?
From what I have read I could go about this by:
removing one of the two mirror vdevs
creating pool pool tmp
create new vdev as RAIDZ2 with the now available 2x2TB SSDs
migrating over all the data from pool2 to pool tmp
remove the second vdev in pool2 or delete the pool altogether
extend pool tmp RAIDZ2 with the now available remaining 2x2TB SSDs
Would really appreciate some help / guidance. Thanks in advance.
Oh I might have noticed a problem in my approach as Z2 needs 4 drive to even create the pool. Since I dont have any extra drives, I wouldnt even be able to create the pool right now.
A Z1 would just need 3. It should be possible to simply remove one mirror from pool2. I could then do something very dangerous and also remove the parity drive from the remaining mirror → setup the Z1 and pray to god the one drive lets me move all the data over to the new pool while within a degraded state.
Would that even be possible? It would definitely be playing with fire, thats for sure.
The easiest and least technical way to do this is to move the data off the 2x 2-way mirror pool, destroy the pool and recreate it as RAIDZ2, and then recreate the datasets and permissions and move the data back.
But you need enough storage elsewhere.
Alternatively you can probably do it in the way you suggest, and even do it without losing redundancy, but it will be messy and require a fair bit of shell command line activity which you need to be comfortable with.
Another complication for both these methods is if this pool has any apps on it as the iX apps special datasets have complications on moving.
Moving without extra storage
Your pool is currently shown as 43.8% full, though this widget based on ZFS stats not ZPOOL stats and is not accurate - you need to run sudo zpool list to get accurate stats.
If this is accurate, you have (just) enough space to remove one of the vDevs which will take the remaining vDev to c. 87.6% which is on the high side but should work. (You can remove a vDev from a pure mirror pool and it will move the data for you. If it is RAIDZ you cannot do this.) This will leave you with 2 free 2TB disks. Run a scrub to ensure your data is intact.
You can then create a fully degraded RAIDZ2 pool (with 2 devices missing) using the command line and the two free disks and 2 sparse files and then offlining and deleting the sparse files. You need to create this in the same way that TrueNAS would i.e. by creating partitions with Partition UUIDS and then creating the pool using the partuuids.
You then need to replicate the root dataset recursively from the old pool to the new pool and make sure that you do this r/w. (This will replicate datasets and their settings and ACLs and save you setting them up manually.) At this point you have two pools with identical content (i.e. 2 independent copies). Run a scrub on the new pool to confirm the data has copied OK.
Now you need to swap the pools. You need to export both pools, pool2 from the UI and pool2 temp from the CLI and again from the CLI rename/remount them the other way around.
Now you can remove one mirror from the old pool (leaving you with 2 independent copies) and use that free disk to replace one of the offline disks in the new pool. Once that has resilvered, the new pool has the same redundancy as your existing mirror pool. Run a scrub to make sure that the resilver worked ok.
Now you can destroy the old pool and use the free disk to resilver the 2nd parity drive on the new RAIDZ2 pool. When the resilver has finished, run a scrub to double check data integrity.
Finally, you can export the pool in the CLI and import it in the UI to have a fully working RAIDZ2 pool.
I did say it was complex. If you want to do this process, then I would recommend that you do research and write down the set of commands you want to run, and then share them here and let the community review them for you.
I see, don’t know if you got to read my other comment in the meantime, but already appreciate the response.
I am comfortable with using the CLI, just want to gather all required steps first, before I even attempt this as you have suggested as well.
From what your saying creating a Z2 would be possible in degraded state which would work nicely. I thought not having 4 drives to begin with would lock me out of that option entirely. I’m also fine with naming the new pool something different entirely if that would help the process with not getting both pools mixed up by their naming as they are named the same in your example.
I also just got the thought; I wanted to buy an additional 2TB drive for my PC at some point anyway. I could technically copy the whole contents of pool2 to that new drive on my PC → delete the pool outright → recreate it and the copy everything over again. As all of the data is in SMB storage anyway doing it that way might actually be easier. Just have to hit that brand new SSD hard once right from the get go.
The current pool2 does not have any ix-apps on it. Those are all on the 2x1TB pool1, which I wont be changing.
For reference, I have 4 SATA SSDs in total in my system and space for 2 more, but I would have to buy them first and also add a new SATA Controller first to use them as my motherboards 4 SATA ports are now used up.
sudo zpool list shows 42% usage, but I can also clean up some of the space beforehand since some of it is just steam games that can easily be redownloaded. The rest is plex / jellyfin storage, that I would want to have to redo again.
So I went ahead and bought a new drive for my main pc and pulled all the data to it. I then, after verify everything transferred over correctly, deleted the pool2 and rebuild is as a raidz2. All the data has been copied back and is now being scrubbed just to be sure the drives all survived this torture.
Anyway still appreciate the detailed response and explanation for what I originally intended to do. I haven’t tried it now, so can’t comment on how well this would go if someone tried it based on this thread in the future, but the information does exist now, so good luck.