To replace a failed hard drive in a TrueNAS system, follow these steps:
- Identify the failed drive: Check the TrueNAS web interface for alerts or status information about the failed drive. Note down the drive’s serial number, device name (e.g., da0, da1, etc.), and the storage pool it belongs to.
- Power off the system: It is a best practice to power off the system before replacing the hard drive, especially if you are using a non-hot-swappable drive. However, if your system supports hot-swapping, you can replace the drive without powering off the system.
- Physically replace the drive: Locate the failed drive in your system and remove it. Replace it with a new drive of equal or larger capacity. Make sure the new drive is properly seated and connected.
- Power on the system (if it was powered off): Turn on the system and wait for it to boot up completely.
- Log in to the TrueNAS web interface: Open a web browser and navigate to the IP address of your TrueNAS system. Log in using your credentials.
- Import the disk (optional): In some cases, you may need to import the new disk manually. Go to the “Storage” > “Disks” section, click the “Import Disk” button, and follow the instructions to import the new drive.
- Offline the failed drive: Go to the “Storage” > “Pools” section. Expand the relevant pool and click the three-dot menu next to the failed drive. Click “Offline” to mark the drive as offline.
- Replace the drive in the storage pool: In the “Storage” > “Pools” section, expand the relevant pool and click the three-dot menu next to the offline drive. Click “Replace” and select the new drive from the drop-down list. Click “Replace Disk” to start the resilvering process.
- Monitor the resilvering process: The resilvering process can take a significant amount of time, depending on the size of the drive and the amount of data stored. Monitor the progress in the TrueNAS web interface by going to the “Storage” > “Pools” section. You can also check the status by running the following command in the TrueNAS shell:
zpool status
- Verify the pool health: Once the resilvering process is complete, the pool should return to a healthy state. Verify this in the “Storage” > “Pools” section or by running the
zpool status
command. - Set up S.M.A.R.T. monitoring (optional): If you want to enable S.M.A.R.T. monitoring for the new drive, go to the “Services” section in the TrueNAS web interface, find the “S.M.A.R.T.” service, click the gear icon, and add the new drive to the list of monitored devices. Click “Save” to apply the changes.
That’s it! You have successfully replaced a failed hard drive in your TrueNAS Core system. Remember to regularly check the health of your storage pool and ensure that your data is backed up to protect against potential drive failures in the future.