Deleting a Zombie Pool (a pool where you didn't export it first and the disks are now gone)

Deleting a Zombie Pool (a pool where you didn't export it first and the disks are now gone)

I once created myself a "Zombie Pool" by yanking out a temporary USB disk I had attached to do a backup/restore, but hadn't exported from the GUI before destroying at the CLI.

This results in the GUI thinking the pool still exists, but isn't currently available, so it remains in the list showing as Unavailable/Offline and there's no option in the GUI to remove it at that point.

So a quick bit of remembering about @danb35 's creating a degraded pool resource gave me a clue about how to approach it (without futzing around getting the USB disk back out and reconnecting it... which for the sake of this exercise we'll pretend is just lost or something, not easily within reach and I'm just too lazy to do it as "facts" would indicate)

So what we'll do is create a "fake" pool with the same name and then export it from the GUI.

First create a sparsefile of the same size (doesn't matter as it's sparse and won't take any real amount of space):
truncate -s 1T /root/sparsefile

Then create your pool (in my case called tmp... make sure to match the name of the Zombie here /mnt X ):
zpool create -f -m /mnt/tmp tmp /root/sparsefile

Then go to the GUI and disconnect/export it. (doesn't matter if you select to wipe or not, don't bother)

Then you can remove the no longer needed sparsefile:
rm /root/sparsefile

This process works on both TrueNAS CORE and SCALE

Example of what you might see in the GUI:
screenshot-2023-07-17-at-15-57-47-png.68449

picture credit: @Vincent Jansen
  • Like
Reactions: Vincent Jansen
Author
sretalla
Views
700
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from sretalla

Top