Building RAIDZ2 in stages

egarcia

Dabbler
Joined
Sep 25, 2023
Messages
15
Hello,

I have 4 disks, 2 are SSD 2TB and 2 are HDD 16TB. I want to create a RAIDZ2 pool using them, and in a few weeks/months replace the 2TB disks with 16TB ones as well. Questions:
  1. Will this work fine when created? I'm assuming it will, and I understand that the actual space *at this point* will be 4TB or something like that.
  2. Will this work fine after I start replacing disks with the bigger capacity ones?
  3. Will I recover the "missing" space after everything is 16TB? I'm assuming new space should be 50% of 16*4 or something like that, but it's probably more complicated than that.
I mention RAIDZ2 because I want the redundancy (this is just for backups), but if there is a better setup for those disks (I mean the final 4x 16TB ones, the 2x 2TB+2x 16TB is just an interim solution) please let me know, I'm really confused by all the options.

Thanks in advance!
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
1) Yes, you will have 4*2 TB so 4 TB usable
2) Yes
3) Yes

You could look into striped mirrors.

Pro: More IOPS (probably not needed here)
Flexibility (you can just add another 2x16 TB mirror in the future without destroying the pool)
Cons: Less redundancy, it may survive two failures but not any two drives as with RAIDZ2.

If you run out of storage you'd either need to replace all 4 16 TB drives with higher capacity ones or you would need to add another RAIDZ2 vdev, but still remain at 50 % usable capacity.

Or you stay RAIDZ2 and if you need more space destroy the pool and recreate a wider RAIDZ2, also very viable.
 

egarcia

Dabbler
Joined
Sep 25, 2023
Messages
15
Hey, thanks for the response.

So yeah, I'd like to keep the redundancy there, so RAIDZ2 seems to be what I want versus stripped mirrors, I guess.

The last part where you mention destroying the pool to recreate sounds ok, except that I'll lose all the data when doing that, won't I?
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
Yes destroying the pool means you lose the data. But it sounds like this is not your single copy of the dats do you should be able to restore it.
We're talking about copying 32 TB (minus the 20 % free space you should consider) of data here. Not impossible but that's just for consideration.

Striped mirrors can be extended "in place", you do not need to destroy the pool for that. You could need to rebalance the data afterwards though, but that's optional/possible on the live pool.

If you can live with potentially destroying the pool some time in the future RAIDZ2 is sound, even more so when you add additional drives in the future, this will reduce your parity overhead.
 

egarcia

Dabbler
Joined
Sep 25, 2023
Messages
15
Yeah, I could potentially lose the data to recreate (we have other backups, tape, etc), but 32TB is a lot of data, yeah :D.

That said, this particular machine doesn't have ports for more disks, so if I ever want to increase capacity I'd have another one, rather than having 32TB disks or whatever the future holds...

In any case, many thanks for your answers, I'll start the process shortly to create this RAIDZ2 pool, wish me luck :D.
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
That said, this particular machine doesn't have ports for more disks, so if I ever want to increase capacity I'd have another one, rather than having 32TB disks or whatever the future holds...
You didn't share your hardware setup. With free PCIe slots you can get an HBA to extend your ports.
 
Top