Convert 2 striped disks to 1 larger disk or 2 mirrored disks

Gjohns

Cadet
Joined
Nov 5, 2023
Messages
3
I am currently running TrueNAS-12.0-U8.1 12. I have a separate boot disk and 2 striped disk for my pool. I want to convert or move my existing pool to either a single larger disk or 2 mirrored disks. I have read about extending a pool, but that only creates a mirror of one of the striped drives in my pool. I want to move or convert my pool from the 2 striped disks over to a single larger drive and then mirror that new larger drive for redundancy. I have poured over many threads and even youtube videos and can't seem to find any info on exactly what I want to do. Any information or assistance for an approach to this question would be greatly appreciated.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
If you are using less than 45% of your 2 disk striped pool, you can remove 1 disk. I don't know if the remove feature is in TrueNAS-12.0-U8.1, but you can check with this command;
zpool get all | grep device_removal
This assumes both disks are the same size. If one is larger, and the amount of space works out that you can remove the smaller, that works too.

Whence you have a single disk, you can either put in a larger disk, and either replace the existing single disk pool. Then, when done, remove the old, unused disk and put in the replacement for Mirroring. Or simply Mirror the old disk with the new disk. Whence the Mirror is synced, replace the old disk with a 2nd new disk. Your space will then grow to the new size.

This is all done "live". If you don't need to perform it live, you can setup a second pool and copy the data over. (But, that needs a another disk slot.) The slight advantage to copying the original pool over to a new, second pool is that you get de-fragmented data and the change to fix things. Like update to newer compression algo, or change record size on some datasets.

Lots of options.
 

Gjohns

Cadet
Joined
Nov 5, 2023
Messages
3
Actually, I have used 86 % of 2 disk striped pool. One of the disks in the striped pool is showing degraded. I should have known better than to created a striped pool, but it is too late now. The 2 disks in the stripe are a matched set. I would prefer to figure out a way to convert these disk to a mirrored set using 2 larger hard drives. Worst case, I could recreate the pool and datasets but it would be so much easier, if there is some way I can convert this striped set to 2 mirrored larger drives.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
It is best to deal with the degradation in your pool now, rather than later. You can use this command to get the details of what files or part of files are lost;
zpool status -v
With this list, you either restore the file(s) from backup. Or simply erase them. Then run a scrub to verify a good pool. If additional corruption is found, you have to deal with it :-(.


Next, you replace the disk that had degradation, with a larger disk. This requires an additional disk slot & SATA port. When the larger disk is in place, your pool size will grow.

Now that your 1st larger disk is in place, you can use ZFS to remove the other smaller disk. Then insert the 2nd larger disk, and mirror to the 1st large disk.


This assumes your current pool will fit on to one new, larger disk. But, you've implied that is the case.
 
Last edited:

asap2go

Patron
Joined
Jun 11, 2023
Messages
228
Either what Arwen said or you make a recursive snapshot of your current pool. Name it something easy like "last_snapshot". Then add the new disks as mirror and create a new pool on them, e.g. "pool2".
Afterwards you can just replicate the first pool onto the second one.
Either via GUI's replication tasks or via
zfs send -R --raw pool@snapshot-last | zfs receive pool2
After it is done you can export the first pool.
 

Gjohns

Cadet
Joined
Nov 5, 2023
Messages
3
Thanks All.
I followed Arwen's directions. I ran the zpool status -v to find the corrupt files and deleted them. A scrub fixed the degredation. I installed the larger HD and did a replace on one of the drives in the pool, and as Arwen said, my pool size grew.

I then used the shell to run glabel status command to get the drive ID info (gptid/ xxx-xxx-xxx) so I could run the zpool remove "your pool" gptid/xxx-xxx-xxx command. After a scrub, the other smaller drive that was once part of the stripe was gone.

Then as Arwen suggested, I added another larger drive as a mirror by Storage, Pools, "gear", Status, 3 dots next to the pool, then Extend, select drive.

After the resilvering process, I now have 1 large hd pool and a hd mirror.

Thanks for all the great help !!!!
 
Top