Replacing TrueNAS Boot Mirror Fails

I am attempting to replaced a degraded USB drive in my TrueNAS boot pool.

I removed the degraded device (both within the GUI and physically from the server itself).
Now I am attempting to attach a new device to restore the mirrored aspect of the boot pool.

I am receiving this error message:

Error: [EFAULT] [EFAULT] Command gpart create -s gpt /dev/da1 failed (code 1): gpart: geom 'da1': File exists

From what I can tell - it is telling me a file exists. I formatted this entire disk on my laptop before attaching it to the TrueNAS server. I did format on a Linux (PopOS) laptop. After recieving this error message, I went over to Storage → Disks within the TrueNAS webUI and selected this new USB drive and clicked wipe (quick method) and it provides me with the same error message again.

Error: [EFAULT] Command gpart create -s gpt /dev/da1 failed (code 1): gpart: geom 'da1': File exists

Anyone have any advice on this one? TIA.

Make sure the replacement boot drive is blank and has NO partitions on it.

1 Like

In windows open a command prompt as administrator.

type: Diskpart

type: list disk

type: select disk # (number of the USB device)

type: clean

That will “clean” off all the formatting data so that the disk is fresh.

You can also do similar within Freenas/Truesnas in the Disks section, click on the disk you want to erase and go over to the buttons on the right side to find the option to erase everything (might be in Tom’s video above and my description is a little foggy because I don’t do this very often).

Finally you can use a tool like Partition Magic, Universal Boot Disk, or other open source disk tool to zero the disk out, but this adds write cycles.

Thanks for the ideas.

Unfortunately I don’t have a Windows computer to test that on. I tried to wipe out the USB drive using the Wipe function within the TrueNAS GUI, as well as using gpart destroy -F via SSHing into the TrueNAS. Neither of these options were successful.

What ended up being successful was actually leaving the “use all disk space” checkbox unchecked.
For context: I am talking about when you are performing the steps necessary to add a device to the boot pool as described in the documentation here. After clicking “attach” there is an option to “use all disk space” on the new device. I had previously been checking that box because I simply assumed why would I not want to use all disk space? Not sure- assuming always gets me in trouble! But I tried without checking the aforementioned box and it was successful.

Is the new drive bigger than the other drive?

There could have been a marginal difference, but they were both 16GB drives.

I remember I checked the block size to ensure the new one was not smaller. I can’t remember if they were the same size or the new one was larger.

Bigger is normally fine, but smaller may not work.