This guide provides step-by-step instructions to replace a faulty or degraded disk in TrueNAS, either with or without a hot spare.
General Recommendations
Replace failed disks immediately to prevent data loss or redundancy failure.
Use a replacement disk of equal or greater capacity than the failed disk. Ensure the replacement disk is not part of an existing storage pool, as TrueNAS wipes it during the replacement process.
Disk replacement triggers a resilvering process, during which the system integrates the new disk into the pool.
Replacing a failed disk without a hot spare
-
Take the failed disk offline:
Open the Storage Dashboard in the TrueNAS interface.
Locate the degraded pool and click Manage Devices on the Topology widget.
Expand the pool’s VDEV list and select the failed disk.
Click Offline in the ZFS Info widget to remove the disk from the pool safely. This step prevents potential swap issues.
-
Physically Replace the Disk:
Remove the failed disk from the system.
Install the new disk, ensuring it is the correct size and capacity.
-
Replace the Disk in TrueNAS:
Return to the Devices screen for the degraded pool.
Click Replace on the Disk Info widget.
Select the new disk from the drop-down list in the Replacing Disk dialog.
Confirm and start the replacement process. Enable the Force option if required to erase existing data on the replacement disk.
-
Monitor Resilvering:
TrueNAS automatically starts the resilvering process to rebuild the pool.
Check the Storage Dashboard or Devices screen to monitor progress. For larger pools, resilvering may take significant time.
-
Verify the Pool's Status:
Refresh the screen to confirm that the replacement disk is integrated and the pool status is healthy.
Replacing a failed disk with a hot spare
-
Take the Failed Disk Offline:
Follow the same steps as above to offline the failed disk.
-
Promote the Hot Spare:
Detach the failed disk from the pool. This promotes the hot spare to full membership in the pool.
Confirm the changes in the ZFS Info widget.
-
Recreate the Hot Spare:
Install a replacement disk for the failed drive.
Go to the Storage Dashboard, click Manage Devices, and select Add VDEV.
Assign the new disk to the hot spare VDEV, then save and update the pool.
Tips:
Preserve Configurations: Enable options like Preserve Power Management and S.M.A.R.T. Settings during replacement to retain the original disk settings.
Force Replacement: If the replacement process fails due to existing partitions on the new disk, use the Force option in the Replacing Disk dialog.