Expand 3 disks to 4 disks and increase size by first creating a mirror?

dtww

Cadet
Joined
Aug 29, 2023
Messages
3
Hi

I am new to TrueNAS and appreciate confirmation of the following, having read a number of messages on this topic.

I started with 3 8TB disks primarily as a trial. I want to expand it by 1 disk, total 4 disks (2 disk fault tolerance). Data is personal and family stuff - when this includes decades of photos, it gets "costly" if lost. Yes, I know the importance of backup which is not the primary aim of RAIDZ. Backup is taken care of.

Current - see pics below.
3 x 8TB
No "mirror"

Upgraded
4 x 10TB
Mirror (also 4 x 10TB)

What I think I should do (that works!) is, with questions:
  • create second vdev with 4 x 10TB
  • copy data in current pool to the 4x10TB vdev
    • question: is this zfs send? or copy?
    • what's the difference between send / copy, and setting vdev as mirror?
  • how to I "switch over" primary vdev to this 4x10TB?
    • remove / offline the 3x8TB disks?
    • this is purely theoretical - what if: I now have the 4x10 vdev as "primary", and then I have the first vdev back in and online, wouldn't the system treat that as primary?
    • Might not be "theoretical", because if I happen to put the 3x8TB disk sets back in, thinking of making that as a "second" vdev, wouldn't the system treat that as "primary"?
  • to create the mirror vdev, I could have the existing 3x8TB disks and add a 4th disk which is 10TB. I think I don't need this vdev the same number of disks as the pimary vdev, correct? The thinking is that the 3x8TB disks are new (newly bought) so why not keep them online till they expire...
Thanks for clarification.
David

1693343421135.png


1693344844122.png
 

dtww

Cadet
Joined
Aug 29, 2023
Messages
3
This came closest to what I hope to do https://www.truenas.com/community/threads/convert-raidz-1-to-raidz-2.26187/. I have yet to buy new disks as I want to be "sure" what I am doing even if starting again. Starting again means copy data (backup) to some external drives, set up new NAS, and copy data back. Permission-wise it is root plus one other global user. Buying 5 disks (add 1 to first vdev, remaining 4 forms 2nd vdev) is $£€ but I want to learn.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
OK, you have a lot of learning to do about what ZFS is capable of and how to use the terminology.

If I understood you right, you currently have a pool with a single VDEV of 3 disks in RAIDZ1.

What you eventually want is a pool with a single VDEV of 4 disks in RAIDZ2.

Adding a VDEV to a pool which contains any VDEVs of the RAIDZ type (not mirrors or striped) will be a one-way, irreversible action, leaving you with a pool of 2 VDEVs.

Hopefully that's now clear that your first proposed step of adding a VDEV is not the right one.

Adding a disk to a RAIDZ type VDEV is not (at least not currently) possible, so a pool rebuild is necessary to change things here.

What you're describing as actions make a lot more sense if I replace your use of VDEV with Pool.

If you create a new pool with one VDEV of 4 (new) disks in RAIDZ2 (or whatever configuration you decide is right), then use zfs send | recv to make an identical copy of all your data currently in your existing pool, destroy the original pool and then add the old disks + a new one back to the new pool as a 4 disk RAIDZ2 VDEV, that will work just fine.

I think trying to follow steps in the thread (or the further linked one from it) isn't the greatest idea (although some of the commands will apply in your case) since your initial setup is not a mirror (unless you're saying it is a 3-way mirror currently, in which case we need to go over the whole thing again).
 

dtww

Cadet
Joined
Aug 29, 2023
Messages
3
Thanks sretalla
If I understood you right, you currently have a pool with a single VDEV of 3 disks in RAIDZ1.
Yes

What you eventually want is a pool with a single VDEV of 4 disks in RAIDZ2.
Yes

Adding a VDEV to a pool which contains any VDEVs of the RAIDZ type (not mirrors or striped) will be a one-way, irreversible action, leaving you with a pool of 2 VDEVs.
I need to ponder further about this, as the future state is a vdev of 4x10TB, and then 2nd vdev being mirror.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I need to ponder further about this, as the future state is a vdev of 4x10TB, and then 2nd vdev being mirror.
OK, so that's not a thing... additional VDEVs are only ever striped into the pool, you can't select to make them mirror other VDEVs.

What you can do is either make 4 pairs of mirrors (4 mirrored VDEVs) or just go with a wider RAIDZ2 single VDEV (although you'll have the issue of how to get the data across in that case).
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
OK, so that's not a thing... additional VDEVs are only ever striped into the pool, you can't select to make them mirror other VDEVs.
He can make 2 separate zpools. One with RAIDZ VDEV, the other with mirror VDEV
 
Top