This page shows how to find a drive that has failed and replace it with a new one. You do everything in HexOS. You do not need to follow any steps in TrueNAS.
When you replace a drive, HexOS copies your data onto the new drive from the other drives in the pool. This copy is called a rebuild (ZFS calls it a resilver). Your files stay available while it runs.
Warning: Replace one drive at a time. Let the rebuild finish before you remove or replace another drive. Removing a second drive during a rebuild can lose the pool.
Requirement: The new drive must be the same size as the failed drive or bigger. It must be empty or hold nothing you want to keep. For help choosing one, read Selecting drives.
Check how much protection your pool has left:

Danger: If the card says No more drives can fail right now without data loss or This pool is not protected from drive failure, one more failure during the rebuild would lose the data on this pool. Copy anything you cannot replace to another device first, if you can.
On the Storage screen, the pool with the failed drive shows Unhealthy or Drive errors.

Click the pool, then click View drives in its info panel.
Click the drive that shows a problem. A drive that does not work at all shows as Missing, with a Faulty badge. Its info panel says This drive is missing and needs to be replaced.

Write down the Serial number from the failed drive's info panel. The same number is printed on the drive's label, so you can find the right drive inside the server. If no serial number shows, write down the serial numbers of the drives that still work instead. The drive that is not on your list is the failed one.

There are two ways to do this. Pick the one that fits your server.
If your server has a free drive connection (a free SATA port and power cable, or an empty drive bay): connect the new drive. If the failed drive's Status in its info panel is Online or Degraded, leave it connected for now: ZFS can still read from it during the rebuild, which is safer. If its Status is Faulted or Removed, ZFS no longer reads from it, so keeping it connected does not help. You can remove it when you connect the new drive. If your server cannot swap drives while it is running, shut it down first (see below), connect the new drive, then turn it back on. Go to Step 3.
If every drive connection is in use: you must remove the failed drive first.
After the server starts, the old drive shows as Missing in the pool. This is expected.
Click the pool, then click View drives. Click the failed or missing drive, then click Replace in its info panel.
The Replace Drive dialog opens. Read any message it shows:

Click the Replacement Drive list and pick your new drive.

Click Replace Drive.
Tip: If the dialog says You need to have a suitable unused drive candidate available to replace a drive, HexOS did not find a drive it can use. Check that the new drive is connected, is the same size as the failed drive or bigger, and is not part of another pool. On the Storage screen, the new drive should show under Available drives.
The rebuild starts right away. Depending on the size of your drives and your hardware, it can take minutes, hours or even days. The pool shows a problem until the rebuild is done.
Warning: Avoid restarting the server or moving drives until the rebuild finishes. A restart can lose progress and start the rebuild over.
When the rebuild is done, the pool shows as healthy again. If you left the failed drive connected, you can now shut down the server and remove it.
Help: If the rebuild does not start, or the pool still shows a problem after it finishes, ask for help on our Discord and include a screenshot of the pool's info panel.