ZFS pool missing from gui but visible in CLI

Status
Not open for further replies.
A

AskewDread

Guest
Hey, as the title says i have a ZFS pool called "stripe" its not showing up in webgui but of i type zpool status it shows up correctly in there

Code:
  pool: stripe
 state: ONLINE
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        stripe      ONLINE       0     0     0
          raidz1    ONLINE       0     0     0
            da0p2   ONLINE       0     0     0
            da2p2   ONLINE       0     0     0
            da1p2   ONLINE       0     0     0

errors: No known data errors


This is mounted and i can use the drive quite happily...

Now its not showing whatso ever in the webgui, i saw on another post http://forums.freenas.org/showthread.php?2474-how-to-remove-non-existent-volume-from-freenas to see what the sqlite output says so i have included that just in case it helps you

Code:
[root@freenas] ~# sqlite3 /data/freenas-v1.db "select * from storage_disk;"
Disabled|Always On|{uuid}010b6e50-e74a-11e0-b9cf-001517800c69|1|Disabled|Auto|Member of newmirror mirror|2||3|ada0
Disabled|Always On|{uuid}01519d5d-e74a-11e0-b9cf-001517800c69|1|Disabled|Auto|Member of newmirror mirror|2||4|ada1
Disabled|Always On|{uuid}cea36764-e758-11e0-86fc-001517800c69|1|Disabled|Auto|Member of Staging stripe|3||5|ada5
Disabled|Always On|{uuid}7a655fe2-faf5-11e0-96c6-001517800c69|1|Disabled|Auto|Member of stripe raidz|4||6|ada2
Disabled|Always On|{uuid}7acf3156-faf5-11e0-96c6-001517800c69|1|Disabled|Auto|Member of stripe raidz|4||7|ada3
Disabled|Always On|{uuid}7b203ff8-faf5-11e0-96c6-001517800c69|1|Disabled|Auto|Member of stripe raidz|4||8|ada4
[root@freenas] ~#  sqlite3 /data/freenas-v1.db "select * from storage_diskgroup;"
2|newmirrormirror|mirror|2
3|Stagingstripe|stripe|3
4|striperaidz|raidz|4


Does anyone have anyidea how i can get it to show again? i have run the import and auto import and neither of them show any disks
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Hi AskewDread,

Thanks for posting the output, it saves a lot of time. Did you export your pool from the command line first, before trying to import it from the GUI?

EDIT: I forgot, you must also make sure its exported from the GUI (View All Volumes IF there & click red-X, do not click wipe disks) as well as the command line before trying to import it again.
 
A

AskewDread

Guest
Hey, its not showing in View All Volumes, just my other 2 zpool stripes
i have done zpool export stripe which has made it disappear in CLI but the gui still cant seem to see it

i also got this in CLI when i imported it again? not sure if it matters
cannot mount '/stripe': failed to create mountpoint

i forgot to mention, this stripe is currently blank, so if theres an easier way to make them show up in gui as standalone disks and just recreate the stripe thats fine aswel
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
i also got this in CLI when i imported it again? not sure if it matters
cannot mount '/stripe': failed to create mountpoint

That's completely normal, the mountpoint usually gets created by the GUI, so you need to make it manually to mount from the command line.

its not showing in View All Volumes, just my other 2 zpool stripes

Ok, I figured as much, that's why I'm glad you posted the database output. I helped someone with this before, I need to look up the steps and post back. You'll need to clean out those disks from the database, if you know how to do that with sqlite3 give it a try (backup your database to be safe). I'll post back in a bit, gotta find my notes.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
One more thing, can you post the output from this?

sqlite3 /data/freenas-v1.db "select * from storage_volume;"
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Did you change disk controllers or something? I notice in the zpool output your disks are listed as da0, da1, da1, but the database has them as ada2, ada3, ada4.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Based on my last post I think this should fix your problem:

  • mount -uw /
  • cp /data/freenas-v1.db /data/freenas-v1.db.bak
  • sqlite3 /data/freenas-v1.db
    (Don't type the sqlite> part below)
  • sqlite> .header on
  • sqlite> .mode line
  • sqlite> update storage_disk set disk_name='da0' where disk_name='ada2';
  • sqlite> update storage_disk set disk_name='da1' where disk_name='ada3';
  • sqlite> update storage_disk set disk_name='da2' where disk_name='ada4';
  • sqlite> press (control-D)
  • reboot
 
A

AskewDread

Guest
yeah we added a sata3 controller, figured it wouldnt be this much problem :P
i get the following when i try the updates

sqlite> update storage_disk set disk_name=da0 where disk_name=ada2;
Error: no such column: da0
sqlite> update storage_disk set disk_name=da1 where disk_name=ada3;
Error: no such column: da1
 
A

AskewDread

Guest
ah,
sqlite> update storage_disk set disk_name = 'da0' where disk_name = 'ada2';
sqlite> update storage_disk set disk_name = 'da1' where disk_name = 'ada3';
sqlite> update storage_disk set disk_name = 'da2' where disk_name = 'ada4';
has worked correctly, ill have to shut down a few servers using iscsi to reboot it so will try that later and let you know how it goes, unless theres someway to make the gui read it without rebooting?
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
yeah we added a sata3 controller, figured it wouldnt be this much problem :P

It shouldn't be, but the GUI needs some work, it doesn't update the database properly for a few things.

Let me double check the SQL and post back.

EDIT: I see you got it while I was posting, great job, forgot about the quotes.
 
A

AskewDread

Guest
ok cool, will arrange a reboot later and let you know how it goes :) thanks for the help
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
You're welcome. Looking forward to hearing how it turns out. I think what would have been the correct thing to do would have been to export your pool before replacing the controller, and then the import would have worked correctly.
 
A

AskewDread

Guest
Hey,

I took a look in the db and noticed the pool was missing from storage_mountpoints
so i ran
INSERT INTO storage_mountpoint VALUES('/mnt/stripe',0,'rw',4,4);
which then got it to show so i deleted the array and created a brand new one with the disks to make sure the db is all nice and clean and it seems to be working perfectly :)
ill still reboot it later at some point but for now its working beautifully :D
ill keep that in mind for next time i upgrade one... thanks for all the help
 
Status
Not open for further replies.
Top