TrueNAS Nightly Development DocumentationThis content follows experimental nightly development software. Pre-release software is intended for testing purposes only.
Use the Product and Version selectors above to view content specific to a stable software release.
Replacing Disks
6 minute read.
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.
If you configure your main TrueNAS Dashboard to include individual Pool or the Storage widgets they show the status of your system pools as on or offline, degraded, or in an error condition.
The Storage Dashboard pool widgets also show the status of each of your pools.
From the main Dashboard, you can click the on either the Pool or Storage widget or you can click Storage on the main navigation menu to open the Storage Dashboard screen and locate the pool in the degraded state.
To replace a disk in a pool without a hot spare available:
- Take the disk offline.
- Replace the disk.
- Refresh the screen.
To replace a disk in a pool with a hot spare:
- Take the disk offline.
- Detach the failed disk to promote the hot spare.
- Refresh the screen.
- Recreate the hot spare VDEV.
We recommend users off-line a disk before starting the physical disk replacement. Off-lining a disk removes the device from the pool and can prevent swap issues. To offline a disk:
Go to the Storage Dashboard and click Manage Devices on the Topology widget for the degraded pool to open the Devices screen for that pool. Click next to the VDEV to expand it, then look for the disk with the REMOVED status.
Click on the failed disk, then click Offline in the ZFS Info widget to take the disk offline. The disk status changes to OFFLINE.
If you are replacing the failed disk you took offline and removed, insert the replacement disk now. The new disk must have the same or greater capacity as the failed disk. If replacing a failed disk with an available disk in the system, proceed to the next step.
Click Replace on the Disk Info widget on the Devices screen for the disk you off-lined.
Select the new drive from the Member Disk dropdown list on the Replacing disk dialog.
Click Replace Disk to add the new disk to the VDEV and bring it online.
Disk replacement fails when the selected disk has partitions or data present. To destroy any data on the replacement disk and allow the replacement to continue, select the Force option.
When the disk wipe completes, TrueNAS starts replacing the failed disk. TrueNAS resilvers the pool during the replacement process. For pools with large amounts of data, this can take a long time. When the resilver process completes, the pool status returns to Online on the Devices screen.
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. TrueNAS resilvers the pool after the hot spare is activated.
To replace a disk in a pool with a hot spare:
- Take the disk offline.
- Detach the failed disk to promote the hot spare.
- Refresh the screen.
- Recreate the hot spare VDEV.
Go to the Storage Dashboard and click Manage Devices on the Topology widget for the degraded pool to open the Devices screen for that pool. Click next to the VDEV to expand it, then look for the disk with the REMOVED status.
Click Detach on the ZFS Info widget on the Devices screen for the disk you off-lined.
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.
After promoting the hot spare, recreate the Spare vdev and assign a disk to it.
If recreating the spare with a replacement in place of the failed disk, insert the replacement disk now. The new disk must have the same or greater capacity as the failed disk. If recreating the spare with an available disk in the system, proceed to the next step.
Go to the Storage Dashboard and click Manage Devices on the Topology widget for the degraded pool to open the Devices screen for that pool.
Click Add VDEV to open the Add Vdevs to Pool screen.
Click the Spare (Optional) row to expand it.
Select a disk size equal to or greater than the failed disk or click Manual Disk Selection to choose the replacement disk. Click Save And Go To Review.
Review changes then click Update Pool. Select Confirm, then click Continue.
After completing the job, TrueNAS returns to the Storage Dashboard screen. Review Spare VDEVs on the Topology widget to confirm the hot spare is added.