Replacing 3 disk ZFS pool in one go

mha

Dabbler
Joined
Jul 12, 2015
Messages
15
Hi,

I am running TrueNAS-12.0-U8 booting from a USB stick and have a ZFS pool with 3 disks running (think it is called RaidZ) - 1 disk fault tolerance).

I had a batch of old 2TB disks which I wanted to use up and kept replacing/resilvering single failing disks every few month. Now I ran out of old disks and decided to buy 3 new WD Red One Plus 2TB disks. I have a full backup of the pool on a separate 4TB HDD.

What is the best strategy to replace the still running 3 old disks with the new ones? Replacing/resilvering one by one? Or is there a better way to do this?

Thanks,
Michael
 

Etorix

Wizard
Joined
Dec 30, 2020
Messages
2,134
If you have free SATA ports you may plug in the new drives without removing the old ones and select 'Replace' (Storage>Pools>(gear)>Status>(drive)>(…)>Replace). All three drives in one go if you have three spare ports.
Mind that raidz1 becomes less safe with larger drives and consider moving to raidz2 at some point.
 

mha

Dabbler
Joined
Jul 12, 2015
Messages
15
Thanks for your reply. Unfortunately I only have 4 SATA ports. So back to replacing/resilvering one by one?

For RaidZ2 I'd need 4 disks, right?
 

Etorix

Wizard
Joined
Dec 30, 2020
Messages
2,134
Correct on both counts.
There's no way to change a raidz1 into a raidz2, so if you go this way you'll have either to (a) backup, delete the raidz1 pool and restore to the new raidz2, or (b) to get a HBA (or another server…) to attach all drives (at least temporarily) and transfer (replication) from one pool to the other.
 

mha

Dabbler
Joined
Jul 12, 2015
Messages
15
Thanks.

Backup: I have one spare SATA port and a spare old 4TB disk. Is this a reasonable way to backup the RaidZ1 and restore to a new RaidZ2:
- connect 4TB disk to USB
- create ZFS pool and dataset on 4TB drive
- snapshot the existing RaidZ1 pool
- replicate snapshot to 4TB dataset
- tgurn off, exchange disks (now 4 new ones), turn on
- create ZFS pool RaidZ2 on new disks
- create snapshot on 4TB disk
- replicate to raidZ2 pool

will the shares and things work again?
 

Etorix

Wizard
Joined
Dec 30, 2020
Messages
2,134
Datasets will be preserved. You may need to point shares to the new pool.
 
Top