Replacing disk of a pool failed with [EZFS_BADDEV] cannot replace xxx with /dev/disk/by-partuuid/9yyy5: /dev/disk/by-partuuid/9yyy5 is busy

Hi there,

I am running TrueNAS 25.10.1 using four disks as 1 x RAIDZ1 | 4 wide.

Recently the SATA-connector-case of the SATA-cable of a disk broke (don’t ask why :see_no_evil_monkey: ) and the disk was not available for the pool. I have replaced the cable and the pool has been resilvered.

However, the pool still was not healthy (2 ZFS errors for that disk) and I have started a scrub - the pool was still unhealthy.

Then I have wiped the disk on a different machine, i.e. erased the partitions, created a new GPT, but no complete overwrite).

When I put the disk back and replaces it via the TrueNAS-GUI, I get the error

[EZFS_BADDEV] cannot replace 10238661761904762511 with /dev/disk/by-partuuid/3d63fb18-0be6-4269-b484-0eb7ba7ffb8d: /dev/disk/by-partuuid/3d63fb18-0be6-4269-b484-0eb7ba7ffb8d is busy

I searched a bit in this forum but I have only found BADDEV-errors complaining about too small disks - but this error is complaining about a busy disk.

I assume it is related to the serial number of the disk (it is still the same :slight_smile: ) and the TrueNAS still knows about that disk by its serial number.

Is there any chance that I may use that disk again on my TrueNAS system?

Best Regards

Gerd

Well, I have to answer my question myself: Yes, it is possible!
If you get once into the same situation you have to replace the disk by an actual spare disk. I did this and after re-silvering the pool was healthy again.
However, I wanted to verify that the previous disk did not get damaged when the SATA-cable broke, I replaced the replacement again by the original disk. The re-silvering did not show any errors.
The problem seems to be that you cannot detach a disk from a pool - except you are actually replacing that disk (the button “detach” only appears if the replacement has been started).