Wiping a disk that is in a pool

Woke up this morning to a notification saying that one of my drives has failed its overnight long S.M.A.R.T test. No problem, I have spares and am using raidz2 so I hope to just throw a spare in, resilver, and be good to go.
However, my drives are under warranty, and to get a replacement I need to return the bad one. I would like to wipe this drive before I send it back, but they are SAS and the only HBA I have is in my truenas server. Is there any way for me to format the faulty drive before I remove it from my system? I have off-lined the disk, but the wipe option is not present in the UI (I believe because its still part of the pool).
I’ve done some reading of forum posts but want to be careful before doing anything hasty as I don’t want to accidentally destroy the pool.
I’m using 24.10-RC2 (am very impressed with it btw).

You can use the CLI to wipe the drive any way you want (dd if=/dev/zero of=…, badblocks, whatever). Triple check the command before hitting “Enter”.

Consider, however, that as a single drive out a raidz2 it would be essentially impossible to retrieve files from it. Metadata could leak file names, but file chunks would be of limited value.

1 Like

What have you done so far? It sounds like you have not yet replaced the failing drive with a new one. Before any wiping (preferably via the GUI, since it at least has a rudimentary safety check), you should be at a point where your RAIDZ2 vdev is fully resilvered and healthy, as is your pool.

Do you not have enough room in the server to keep the failed drive inside?

Thank you, I was reluctant to do anything through the CLI without reassurance from someone who knows better.
Thank you also for the second piece of info. This had occurred to me but, again, I wanted to hear it from someone more knowledgable before I just sent the drive away.
I may do a single pass with shred, but will likely just put the spare in and return as is.

As yet, I had offlined the drive to see if the wipe option appeared, and bought it back online when it did not.
As you suspect, I have 8 drives on an HBA that only supports 8 drives.
I, perhaps naively, don’t believe 2 more drives will fail while I am doing this procedure, though I know that resilvering can expose other dying drives.

Just to finish this up, I followed the advice of @etorix.
I took the drive offline and used dd in tmux (started with shred but it was incredibly slow).
At some point in the wipe, the drive was re-detected as one that was not in the pool and its entry in the pool list became a long number, and this was what I clicked to replace the failing drive.
When finished, I put the new drive in, ran a S.M.A.R.T test and replaced the removed drive through the GUI.
All back up and running with the new drive in place now. Probably wasn’t necessary, but not that hard if anyone else is in a similar situation.

2 Likes