I am using a RAIDZ3 pool and have added a new harddrive to my system.
Now, I want to exchange one of the existing drives of the pool with the new (larger) drive.
To ensure that everything wents smooth, I want to double-check the exact steps with you before. Is it correct to:
Set the drive that shall be removed from the pool to “OFFLINE”.
Can I now simply click “REPLACE” and select the new drive?
Will the resilvering start automatically?
At the end do I have to export the encryption key again (does it change)?
Do I need to export the pool recovery key file?
Add the new file to S.M.A.R.T. tests.
Is this right or is there anything else or anything different?
First, you understand that changing one disk to a larger one won’t increase capacity at all, right?
For example, if your pool is 8 disks that are 8tb, and you replace a single 8tb with a 16tb, the capacity is still going to be the same once it resilvers.
To answer your question, yes you can offline a disk, put in a new disk, choose replace, and it will rebuild the pool
I will defer that question to another person, because I’ve never used an encrypted pool.
However, I can’t see why it would affect anything. To change the key, you would need to re-encrypt the pool with the new key. Furthermore, when you’re replacing a drive, the goal is to get it back online as quickly as possible. I’m 99.99% sure it doesn’t do anything with encryption.
In regards to ZFS Dataset or zVol encryption, no, replacing a disk will not affect anything related to your ZFS encryption. That is handled at the file system level.
To be clear, the old FreeBSD / TrueNAS Core GELI encryption was at the disk partition level. So in that case, you DO have to fuss with GELI to get the new drive encrypted. (Or to remove GELI encryption.)
On the other subject of drive replacement.
If you are able to install the new drive without removing the old, don’t bother to off-line the old drive. This will allow ZFS to retain 100% redundancy during the replacement procedure. Meaning with RAID-Z3, (3 drives of redundancy), you can still loose 3 drives during the drive replacement procedure and not loose data.
If you off-line a drive in a RAID-Z3 vDev, you only have 2 drives of redundancy. Thus, if you loose 3 drives, you loose the pool.
Of course, RAID-Z3 is highly redundant, so it is so unlikely to loose enough redundancy to loose the pool. But, using the replace in place method, (old drive still available & on-line), works faster because ZFS will temporarily Mirror the 2 drives affected by the replacement.