TrueNAS CORETrueNAS CORE Version Documentation
This content follows the TrueNAS CORE 13.0 releases. Use the Product and Version selectors above to view content specific to different TrueNAS software or major version.

Disk Replacement

Hard drives and solid-state drives (SSDs) have a finite lifetime and can fail unexpectedly. When a disk fails in a Stripe (RAID0) pool, you must recreate the entire pool and restore all data backups. We always recommend creating non-stripe storage pools that have disk redundancy.

To prevent further redundancy loss or eventual data loss, always replace a failed disk as soon as possible! TrueNAS integrates new disks into a pool to restore it to full functionality.

TrueNAS requires you to replace a disk with another disk of the same or greater capacity as a failed disk. You must install the disk in the TrueNAS system. It should not be part of an existing storage pool. TrueNAS wipes the data on the replacement disk as part of the process.

Disk replacement automatically triggers a pool resilver.

Although GELI encryption is deprecated, TrueNAS implements GELI encryption during a “GELI-Encrypted (Legacy) pool” disk replacement. TrueNAS uses GELI encryption for the lifetime of that pool, even after replacement.

The TrueNAS Dashboard shows when a disk failure degrades a pool.

Degraded Pool
Figure 1: Degraded pool on dashboard widget.

Click the on the pool card to go to the Storage > Pools > Pool Status screen to locate the failed disk.

If a disk shows a faulted state, TrueNAS has detected an issue with that disk and you should replace it.

To replace a disk in a pool without a hot spare available:

  1. Take the disk offline.
  2. Replace the disk.
  3. Refresh the screen.

To replace a disk in a pool with a hot spare:

  1. Take the disk offline.
  2. Detach the failed disk to promote the hot spare.
  3. Refresh the screen.
  4. Recreate the hot spare VDEV.

Taking a Failed Disk Offline

Go to Storage > Pools screen.

Go to the Storage > Pools screen, click on the settings icon, and then select Status to open the Pool Status screen and display the disks in the pools.

Click the icon for the disk you plan to remove and then click Offline.

Disk Options
Figure 2: Pool Status disk options

Select Confirm, then click OFFLINE.

When the disk status shows as Offline, physically remove the disk from the system.

Offline Disk
Figure 3: Pool Status disk offline
If the offline operation fails with a Disk offline failed - no valid replicas message, go to Storage > Pools, click the for the degraded pool, and select Scrub Pool. When the scrub operation finishes, reopen the pool Status and try to offline the disk again.

Replacing a Failed Disk

If replacing the failed disk that you have taken offline and removed, insert the replacement disk now. If replacing a failed disk with an available disk in the system, proceed to the next step.

In the Pool Status screen, open the options for the offline disk and click Replace

Replacing Disk
Figure 4: Replacing disk screen.

Select a new member disk and click Replace Disk. The new disk must have the same or greater capacity as the disk you are replacing. The replacement fails when the chosen disk has partitions or data present. To destroy any data on the replacement disk and allow the replacement to continue, set the Force option.

When the disk wipe completes and TrueNAS starts replacing the failed disk, the Pool Status screen changes to show the in-progress replacement.

Replacing Started
Figure 5: Pool Status replacing disk.

TrueNAS resilvers the pool during the replacement process. For pools with large amounts of data, resilvering can take a long time.

When the resilver completes, the Pool Status screen updates to show the new disk, and the pool status returns to Online.

Replacement Complete
Figure 6: Pool Status disk replacement complete.

Replacing a Failed Disk with a Hot Spare

A Hot Spare vdev sets up drives as reserved to prevent larger pool and data loss scenarios. TrueNAS automatically inserts an available hot spare into a Data vdev when an active drive fails. The pool resilvers after the hot spare is activated.

To replace a disk in a pool with a hot spare:

  1. Take the disk offline.
  2. Detach the failed disk to promote the hot spare.
  3. Refresh the screen.
  4. Recreate the hot spare VDEV.

Detaching a Failed Disk

Go to the Storage > Pools screen, click on the settings icon, and then select Status to open the Pool Status screen and display the disks in the pools.

After taking the failed disk offline and removing it from the system, the disk status changes to REMOVED and the disk name displays the gptid.

Disk Removed - Hot Spare Active
Figure 7: Disk Removed - Hot Spare Active

Click the icon for the removed disk and then click Detach.

Select Confirm, then click DETACH. TrueNAS detaches the disk from the pool and promotes the hot spare disk to a full member of the pool.

Recreating the Hot Spare

After promoting the hot spare, recreate the Spare vdev and assign a disk to it.

If you have a hot spare inserted into the pool and then follow the instructions in Replacing a Failed Disk, TrueNAS automatically returns the hot spare disk to the existing Spare vdev and ONLINE status.

However, we do not recommend this method, because it causes two resilver events: one when activating the hot spare and again when replacing the failed disk. Resilvering degrades system performance until completed and causes unnecessary strain on the disk.

To avoid unnecessary resilvers, promote the hot spare then recreate the hot spare vdev.

If recreating the spare with a replacement in place of the failed disk, insert the replacement disk now. If recreating the spare with an available disk in the system, proceed to the next step.

Go to the Storage > Pools screen, click on the settings icon, and then select Add Vdevs to open the Pool Manager screen and display the disks in the pools.

Click ADD VDEV and select Hot Spare.

Add Vdev Hot Spare
Figure 8: Add Vdev Hot Spare

Select an available disk and click to add it to the Spare VDev.

Click ADD VDEVS. Select Confirm, then click ADD VDEVS.

After completing the job, TrueNAS returns to the Storage > Pools screen. Click on the settings icon, and then select Status to open the Pool Status screen and confirm the hot spare is added.

Related Storage Articles