Replacing an HDD or SSD in TrueNAS Scale is relatively straightforward, provided the disk is part of a fault-tolerant array. If the disk is part of a RAID 0 (Stripe) configuration, you must first back up the data, then replace the disk and restore the data from the backup. This is a routine procedure necessary whenever a disk fails. For instance, in this example, there is a failed disk in a RAIDZ1 (3-wide) array. The disks in the array are 1TB NVMe SSDs, and I am upgrading them to 2TB NVMe SSDs.
Note: if you are replacing more than one disk in an array, wait for each device to resilver before starting the next one.
In the TrueNAS Scale GUI go to Storage. As you can see from the screenshot below, there is an issue with the “data” pool’s VDEVs (as we will see, there is a disk missing).
To replace a disk, there must already be a physical disk (hot spare) in the system that is of the same size or larger than the one you want to replace. You will also want it to be of a similar type, for example, replace HDD with HDD and NVMe with NVMe.
I will cover the situation where there is no space for a hot spare later.
When installing a physical disk into TrueNAS Scale, mark the disk with the serial number in a position that is easily visible. This makes the task easier in the future.
This will display the disks in the VDEV. As shown in the screenshot, two disks are healthy, while the other has been removed. Click on the failed or removed disk.
The resulting panel will display the details for the failed or removed disk. Make a note of the serial number of the failed disk.
If you are in a situation where it has not been possible to install a hot spare disk, then power down the system, remove and replace the failed disk, identifying the failed disk by its serial number. The disk must be of a similar type and the same size or larger. Power on the system and follow through this tutorial again.
Click the Replace button.
A pop-up will appear, prompting you to select a disk to replace disk vda. Select one of the available disks. Click Replace Disk.
If the disk is new, the process should continue, and the disk will be replaced. However, if the disk has been used before, you will receive a warning that it already has partitions. In which case, you will have to use the force option.
Next, click the Replace button:
A pop-up will appear indicating that the disk is being replaced. This pop-up will disappear quickly; however, the array will still be resilvering. This can be observed in the icon bar at the top of the TrueNAS Scale GUI. The process may take several hours for a large HDD. It is important not to take any further actions on the pool until the resilvering is completed.
If you increase the size of all the disks in a pool, you can expand the pool to utilise all the available disk space. To do this, click the “Expand” button for the desired pool and then confirm the action. Once resilvering completes and all disks show as Online, your pool is healthy and operating at full capacity.
