Upgrading pool to SSD ("shuffling" / resilvering 1 drive at a time)

vom

Dabbler
Joined
Nov 13, 2012
Messages
24
Hello all,

I currently have a very modest and simple RAIDZ1 pool of 4 x WD RED 1TB HDDs (mechanical). When considering getting 4 x WD RED 1TB SSDs to upgrade to - a question popped into my head. What if the raw capacity of one of the SSDs is slightly smaller than the current HDD ? The resilvering would fail / get stuck at the very end yes ? So the raw size of the new drives needs to be either exactly the same or larger ?

I've looked around and can't really find the spec. for these drives that would tell me that. I could be searching the wrong thing or missing something though...

Can anyone point me in the right direction or otherwise set me straight on my thinking here ?

Thanks.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
When the replacement drive is smaller, a ZFS re-silver does not even start. So yes, the raw capacity of the new drive(s) needs to be either exactly the same or larger.

However, TrueNAS attempts to over come this problem by including a 2GB, (or is it larger now?), swap partition. So your existing drives are likely using a partition that is slightly smaller than full, raw size of the disks. This "feature" can make replacing drives actually work, though it may require manual effort.

What you want to do is list the partition tables of all 4 x WD Red 1TB HDDs. If they all have the swap partition, even if not in use, then you may be in luck. I don't have the partition listing command for TrueNAS Core handy. Perhaps someone else may have it.
 
  • Like
Reactions: vom

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
I don't have the partition listing command for TrueNAS Core handy. Perhaps someone else may have it.
gpart show
 
  • Like
Reactions: vom

vom

Dabbler
Joined
Nov 13, 2012
Messages
24
When the replacement drive is smaller, a ZFS re-silver does not even start. So yes, the raw capacity of the new drive(s) needs to be either exactly the same or larger.

However, TrueNAS attempts to over come this problem by including a 2GB, (or is it larger now?), swap partition. So your existing drives are likely using a partition that is slightly smaller than full, raw size of the disks. This "feature" can make replacing drives actually work, though it may require manual effort.

What you want to do is list the partition tables of all 4 x WD Red 1TB HDDs. If they all have the swap partition, even if not in use, then you may be in luck. I don't have the partition listing command for TrueNAS Core handy. Perhaps someone else may have it.
Ahh I see. I do indeed have the 2G swap partition on each physical disk.

So perhaps a dumb question - what process creates / created this swap part. ? More pointedly - if I were to do this process of shuffling / resilvering - would TrueNAS create this on the new drives at some point in the process ?

Thanks for the reply and detail.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
If you created the pool with the GUI, (which seems likely since you have the 2GB swap partition), that is what created the swap partition.

And if you do the disk replacement through the GUI, it should do the same.


Their have been old, (as in years old), reports of people having trouble with disk replacements due to the new disk being slightly smaller that the old. But, that was generally solved manually. However, I don't have the exact sequence of events that TrueNAS Core / SCALE uses for disk replacement. Other than it works perfectly if the replacement is the same or larger in size. (Their was a recent disk replacement bug in TrueNAS Core, though that was solved pretty quick.)


I should probably clarify my state about:
When the replacement drive is smaller, a ZFS re-silver does not even start.
The correct wording should be:
When the replacement drive is smaller, you can't finish the replacement... thus no ZFS re-silver.
 
Top