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)

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
sretalla submitted a new resource:

Deleting a Zombie Pool (a pool where you didn't export it first and the disks are now gone) - How to delete a pool stuck in the GUI as the Export/Disconnect doesn't work when the disks are 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...

Read more about this resource...
 

Vincent Jansen

Explorer
Joined
May 16, 2014
Messages
82
I read the article but I have one question. My original pool was 5x 6tb disks. If i create the sparsefile, what size should I make it. 30TB or 6TB?
 

Vincent Jansen

Explorer
Joined
May 16, 2014
Messages
82
would it look something like this:

truncate -s 30T /root/sparsefile

zpool create -f -m /mnt RaidzDisk4 /root/sparsefile

****Then go to the GUI and disconnect/export it****

rm /root/sparsefile
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You don't necessarily need to match the size, but since it's a sparsefile, it will be the same size in any case as long as you don't write anything to it.

Those commands look OK to me.
 

Vincent Jansen

Explorer
Joined
May 16, 2014
Messages
82
You don't necessarily need to match the size, but since it's a sparsefile, it will be the same size in any case as long as you don't write anything to it.

Those commands look OK to me.

root@Collection14:~ # truncate -s 30T /root/sparsefile
root@Collection14:~ # zpool create -f -m /mnt RaidzDisk4 /root/sparsefile
mountpoint '/mnt' exists and is not empty
use '-m' option to provide a different default
root@Collection14:~ #
 

Vincent Jansen

Explorer
Joined
May 16, 2014
Messages
82
I assumed i missed a / after mnt, so I changed it. and now I get this.

root@Collection14:~ # zpool create -f -m /mnt/RaidzDisk4 /root/sparsefile
missing vdev specification
usage:
create [-fnd] [-o property=value] ...
[-O file-system-property=value] ...
[-m mountpoint] [-R root] <pool> <vdev> ...
root@Collection14:~ #
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
That should be zpool create -f -m /mnt/RaidzDisk4 RaidzDisk4 /root/sparsefile

I've updated the resource... I thought some time back I had to remove the poolname from the /mnt/poolname part, but I'm now reminded it's not the case.
 
Last edited:

Vincent Jansen

Explorer
Joined
May 16, 2014
Messages
82
I tried it but it does not add the sparefile in the pool. When trying to remove via gui I still get the same error at 20%
 

Vincent Jansen

Explorer
Joined
May 16, 2014
Messages
82
root@Collection14:~ # truncate -s 30T /root/sparsefile
root@Collection14:~ # zpool create -f -m /mnt RaidzDisk4 /root/sparsefile
mountpoint '/mnt' exists and is not empty
use '-m' option to provide a different default
root@Collection14:~ # zpool create -f -m /mnt/RaidzDisk4 /root/sparsefile
missing vdev specification
usage:
create [-fnd] [-o property=value] ... [-O file-system-property=value] ...
[-m mountpoint] [-R root] <pool> <vdev> ...
root@Collection14:~ # ls
.bashrc .history .profile .warning samba
.cshrc .k5login .shrc .zlogin sparsefile
.gdbinit .login .ssh .zshrc syslog
root@Collection14:~ # zpool create -f -m /mnt/RaidzDisk4 RaidZDisk4 /root/sparsefile
root@Collection14:~ # zpool create -f -m /mnt/RaidzDisk4 RaidzDisk4 /root/sparsefile
invalid vdev specification
the following errors must be manually repaired:
/root/sparsefile is part of active pool 'RaidZDisk4'
root@Collection14:~ #
 

Attachments

  • Screenshot 2023-07-17 at 17.55.05.png
    Screenshot 2023-07-17 at 17.55.05.png
    29.4 KB · Views: 80

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
zpool destroy RaidZDisk4

Looks like you didn't match your pool name... Capital Z instead of the lower case you needed...

Maybe you just followed my typo. Sorry for that.
 

Vincent Jansen

Explorer
Joined
May 16, 2014
Messages
82
how to I unmount it and re mount it to the correct one?
I dont know how to fix this. I also dont see a new pool with the capital Z version of the name.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
See my last post, destroy the one made with the wrong name and create it again with the right spelling.
 

Vincent Jansen

Explorer
Joined
May 16, 2014
Messages
82
I removed the sparsefile. then:

root@Collection14:~ # truncate -s 30T /root/sparsefile
root@Collection14:~ # ls
.bashrc .history .profile .warning samba
.cshrc .k5login .shrc .zlogin sparsefile
.gdbinit .login .ssh .zshrc syslog
root@Collection14:~ # zpool create -f -m /mnt/RaidzDisk4 /root/sparsefile
missing vdev specification
usage:
create [-fnd] [-o property=value] ...
[-O file-system-property=value] ...
[-m mountpoint] [-R root] <pool> <vdev> ...
root@Collection14:~ #
 

Vincent Jansen

Explorer
Joined
May 16, 2014
Messages
82
Strange, it does seem to be mounted but its not visible in the gui.

root@Collection14:/mnt # ls
md_size RaidzDisk2 RaidzDisk4 RaidzDisk6
RaidzDisk1 RaidzDisk3 RaidzDisk5
root@Collection14:/mnt #
 

samarium

Contributor
Joined
Apr 8, 2023
Messages
192
If you are just really matching the pool name, then size is probably irrelevant, and maybe confusing?
Seems like structure is irrelevant?
So event 1G would be sufficient, enough for some ZFS data structures. I've used that for a non TN pool before.
Even a real disk if you wanted to, though I don't know why.
 

Vincent Jansen

Explorer
Joined
May 16, 2014
Messages
82
If you are just really matching the pool name, then size is probably irrelevant, and maybe confusing?
Seems like structure is irrelevant?
So event 1G would be sufficient, enough for some ZFS data structures. I've used that for a non TN pool before.
Even a real disk if you wanted to, though I don't know why.
so, if I add one spare disk to the pool, that should work also?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You missed the pool name in the command. You should see it twice, once together with /mnt/... And then a space and the pool name again
 

Vincent Jansen

Explorer
Joined
May 16, 2014
Messages
82
You missed the pool name in the command. You should see it twice, once together with /mnt/... And then a space and the pool name again
Okey some progress. Its mounted and visible in the gui onder the pool. However, when I try to "Export/disconnect pool: 'RaidzDisk4'"
I still get the error message :

report_problem Error exporting/disconnecting pool.

Document is empty, line 1, column 1 (, line 1)

so it still doesnt want to remove it.

Expanding on the error:

Error: Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/middlewared/job.py", line 367, in run
await self.future
File "/usr/local/lib/python3.8/site-packages/middlewared/job.py", line 403, in __run_body
rv = await self.method(*([self] + args))
File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 973, in nf
return await f(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/pool.py", line 1555, in export
await self.middleware.call('iscsi.global.terminate_luns_for_pool', pool['name'])
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1238, in call
return await self._call(
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1195, in _call
return await methodobj(*prepared_call.args)
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/iscsi_/global_freebsd.py", line 48, in terminate_luns_for_pool
for lun in etree.fromstring(cp.stdout).xpath('//lun'):
File "src/lxml/etree.pyx", line 3235, in lxml.etree.fromstring
File "src/lxml/parser.pxi", line 1876, in lxml.etree._parseMemoryDocument
File "src/lxml/parser.pxi", line 1757, in lxml.etree._parseDoc
File "src/lxml/parser.pxi", line 1068, in lxml.etree._BaseParser._parseUnicodeDoc
File "src/lxml/parser.pxi", line 601, in lxml.etree._ParserContext._handleParseResultDoc
File "src/lxml/parser.pxi", line 711, in lxml.etree._handleParseResult
File "src/lxml/parser.pxi", line 640, in lxml.etree._raiseParseError
File "<string>", line 1
lxml.etree.XMLSyntaxError: Document is empty, line 1, column 1
 

samarium

Contributor
Joined
Apr 8, 2023
Messages
192
Not sure what you mean, or what possible utility in this situation?
spare is a specific term for ZFS, it is the zvdev that holds the hot spares.
I you mean can you use an unused disk to create a pool with the required specific name that is a different question.
If the specific name is the only requirement, then I don't see why you not, however as the webui already things it knows that name you will need to use zpool create just like with the sparse file. However I don't know the the specific name is the only requirement, that is just a hypothesis following the thread.
 
Top