SOLVED cannot import xxxxxxx no such pool available

Status
Not open for further replies.

DaveY

Contributor
Joined
Dec 1, 2014
Messages
141
Is there a way to manually remove a volume that no longer exists from FreeNAS db? I had a volume that was used for testing and I removed the drives without detaching the volume first. Now whenever the server reboots, it gives me the error:

Code:
cannot import "893473529832834783249" No such pool available


It doesn't seem to be hurting anything, but would love to get it cleaned up.

Thanks
 

Sakuru

Guru
Joined
Nov 20, 2015
Messages
527
Does the pool still show up in the GUI?
 

DaveY

Contributor
Joined
Dec 1, 2014
Messages
141
No, pool not in the GUI, but somehow FreeNAS knows it "used to" have that pool volume and looks for it whenever it reboots.
 

Sakuru

Guru
Joined
Nov 20, 2015
Messages
527
What does this return?
Code:
sqlite3 /data/freenas-v1.db "SELECT * FROM storage_volume;"
 

DaveY

Contributor
Joined
Dec 1, 2014
Messages
141
Code:
sqlite3 /data/freenas-v1.db "SELECT * FROM storage_volume;"
8327756878819696186|BKUP01||ZFS|0|1
3047720033196872024|FS1|4168c586-a7c4-463a-be64-2fb2441f1dda|ZFS|1|2


Boot message:

Code:
Beginning ZFS volume imports

          Importing 8327756878819696186

cannot import '8327756878819696186': no such pool available
cannot import '8327756878819696186': no such pool available
        
          Importing BKUP01
...


I should note that the previous volume was also named BKUP01. The volume ID seems to match
 

Sakuru

Guru
Joined
Nov 20, 2015
Messages
527
WARNING! What I'm about to tell you to do is dangerous. Proceed at your own risk.
Go to System --> General, hit Save Config at the bottom.

I believe this will delete the record from the database:
Code:
sqlite3 /data/freenas-v1.db "DELETE FROM storage_volume WHERE vol_guid = 8327756878819696186;"
 

DaveY

Contributor
Joined
Dec 1, 2014
Messages
141
I currently have 2 ZFS mounts. BKUP01 is one of them. Is it still safe to do the delete?

Code:
zpool status -v
pool: BKUP01
state: ONLINE
  scan: resilvered 1.42M in 0h0m with 0 errors on Mon Sep  5 22:23:48 2016
config:

   NAME  STATE  READ WRITE CKSUM
   BKUP01  ONLINE  0  0  0
    raidz1-0  ONLINE  0  0  0
    gptid/4116aeb3-6dc0-11e6-b1b2-d05099c11f83  ONLINE  0  0  0
    gptid/41dfc9f5-6dc0-11e6-b1b2-d05099c11f83  ONLINE  0  0  0
    gptid/42a39be5-6dc0-11e6-b1b2-d05099c11f83  ONLINE  0  0  0
    gptid/43637624-6dc0-11e6-b1b2-d05099c11f83  ONLINE  0  0  0

errors: No known data errors

  pool: FS1
state: ONLINE
  scan: resilvered 324K in 0h0m with 0 errors on Wed Sep  7 09:36:54 2016
config:

   NAME  STATE  READ WRITE CKSUM
   FS701  ONLINE  0  0  0
    raidz1-0  ONLINE  0  0  0
    gptid/487e0a32-7519-11e6-a6a0-d05099c11f83.eli  ONLINE  0  0  0
    gptid/1a14a197-74bc-11e6-8f01-d05099c11f83.eli  ONLINE  0  0  0
    gptid/1acc935a-74bc-11e6-8f01-d05099c11f83.eli  ONLINE  0  0  0
    gptid/1b7dfc10-74bc-11e6-8f01-d05099c11f83.eli  ONLINE  0  0  0
    gptid/1c3e8a99-74bc-11e6-8f01-d05099c11f83.eli  ONLINE  0  0  0

errors: No known data errors
 

DaveY

Contributor
Joined
Dec 1, 2014
Messages
141
Thx Sakuru. So that fixed it. One side effect is the "real" BKUP01 didn't automount on reboot. After I imported the volume, it automounted just fine.

Weird behavior though. With the wrong BKUP01 record in the database, FreeNAS automatically mounted the "real" BKUP01 after the import error. However, with the record deleted from storage_volume, it didn't try to mount BKUP01 volume at all.

Since I was already mucking with the database, I also tried just updating the storage_volume record with the correct guid instead of deleting it and that seems to work as well.

Thanks again for the fix.
 

Sakuru

Guru
Joined
Nov 20, 2015
Messages
527
Huh, strange. I'm glad it all worked out :)
 
Status
Not open for further replies.
Top