Replacing disks in a dataset pool with disks of a larger size

testfire10

Dabbler
Joined
Aug 1, 2021
Messages
46
Hi folks, I had a disk in my 6X disk RAIDz2 pool fail (which has 6X 8TB HGST HDDs). I replaced that disk with one of the same size (indeed, the same model), and the replacement went well, no issues.

At the time, I went ahead and bought a 10TB disk as a spare, because it's getting harder to find the 8TB versions, and in this case was the only one available. It occurred to me that I may reach a point where I'm unable to find any 8TB disks, or at the very least, finding 10 (or more) TB disks is easier/more cost effective.

My question is: if I replace one by one all 6X disks in the pool with 10TB disks, am I ever able to take advantage of the additional space? Is there a procedure to do this - i.e. upgrade in place to additional storage?
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Yes, replacing the 8TB disks with larger ones in a RAID-Zx vDev is one method to grow your pool. It won't grow until all of them are replaced.

It does not even mater if your next replacement disk is 12TB. The vDev will grow to the smallest disk. Meaning if you have 3 x 10TB & 3 x 12TB, the vDev size will grow to 6 x 10TB. With the potential later to replace the 3 x 10TB with larger disks, to grow further.

The growth is somewhat automatic. The ZFS pool attribute "autoexpand" controls this behavior. If "on", then after all the disks have been changed to larger size, the vDev size will grow automatically. If off, vDev size will remain as it was before. Then pool attribute "expandsize" will show what could be the new size.
 

testfire10

Dabbler
Joined
Aug 1, 2021
Messages
46
Yes, replacing the 8TB disks with larger ones in a RAID-Zx vDev is one method to grow your pool. It won't grow until all of them are replaced.

It does not even mater if your next replacement disk is 12TB. The vDev will grow to the smallest disk. Meaning if you have 3 x 10TB & 3 x 12TB, the vDev size will grow to 6 x 10TB. With the potential later to replace the 3 x 10TB with larger disks, to grow further.

The growth is somewhat automatic. The ZFS pool attribute "autoexpand" controls this behavior. If "on", then after all the disks have been changed to larger size, the vDev size will grow automatically. If off, vDev size will remain as it was before. Then pool attribute "expandsize" will show what could be the new size.
Thank you for clarifying.
 

Radu

Dabbler
Joined
Mar 7, 2014
Messages
45
Setup:
36x4TB HDD organised in one pool composed of three vdevs each 12 HDD raidZ2.
If only one vdev is upgraded to 8TB HDDs(12hdd out of 36hdd) can the total pool space be increased(by a third proportionally)?
What are the disadvantages of growing only one vdev at a time ? Or eventually the critical issues that can occur if this grow scenario is valid?
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
If only one vdev is upgraded to 8TB HDDs(12hdd out of 36hdd) can the total pool space be increased(by a third proportionally)?
Yes, the available space will increase.

What are the disadvantages of growing only one vdev at a time ? Or eventually the critical issues that can occur if this grow scenario is valid?
As far as I know there are no disadvantages or critical issues; if there were hotspares you might have needed to upgrade those too, but it's not your case.
 

stephanel

Cadet
Joined
Nov 10, 2023
Messages
1
I'm new with Truenas and ZFS. I got 10x 300GB that I wand to replace by 10x 900GB. Do I just need to change the disk one at the time and wait that the raid rebuild the disk or I need to do something more specific ?
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
I'm new with Truenas and ZFS. I got 10x 300GB that I wand to replace by 10x 900GB. Do I just need to change the disk one at the time and wait that the raid rebuild the disk or I need to do something more specific ?
Pretty much that.
  1. Offline Old Drive
  2. Disconnect Old Drive
  3. Connect New Drive
  4. Software-Replace Old Drive with New Drive
  5. Repeat
If you have a slot free you can replace the drive without offlining it first, maintaining your parity level:
  1. Connect New Drive
  2. Software-Replace Old Drive with New Drive
  3. Offline Old Drive
  4. Disconnect Old Drive
  5. Repeat
 

Etorix

Wizard
Joined
Dec 30, 2020
Messages
2,134
As stated above, rowth is per vdev. If the ten drives are a single 10-wide raidz2 you need to replace all disks to get extra space. If it is five mirrors, size will increase every time two drives are in the same vdev are replaced.
 
Top