Unable to access pool

Status
Not open for further replies.

Dooldeniya

Dabbler
Joined
Jan 18, 2012
Messages
32
I have a mirrored pool (named vault) of which one drive has become corrupted. I exported it from the GUI and detached it and then re attached it but during the resilvering process it stopped responding and I restarted the system. Now I am not able to access the pool at all. I have tried to auto import it via the GUI and it has not worked either. Any advice would be appreciated. I am on freenas 8.03 multimedia release. see below for some additional data:

Camcontrol devlist
Code:
<SAMSUNG HD204UI 1AQ10001>         at scbus0 target 0 lun 0 (ada0,pass0)
<SAMSUNG HD204UI 1AQ10001>         at scbus1 target 0 lun 0 (ada1,pass1)
<Lexar USB Flash Drive 1100>       at scbus6 target 0 lun 0 (da0,pass2)


gpart show
Code:

=>     63  7831467  da0  MBR  (3.7G)
       63  1930257    1  freebsd  [active]  (943M)
  1930320       63       - free -  (32K)
  1930383  1930257    2  freebsd  (943M)
  3860640     3024    3  freebsd  (1.5M)
  3863664    41328    4  freebsd  (20M)
  3904992  3926538       - free -  (1.9G)

=>      0  1930257  da0s1  BSD  (943M)
        0       16         - free -  (8.0K)
       16  1930241      1  !0  (943M)

=>        34  3907029101  ada0  GPT  (1.8T) [CORRUPT]
          34          94        - free -  (47K)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  3902834703     2  freebsd-zfs  (1.8T)

=>        63  3907029105  ada1  MBR  (1.8T)
          63        1985        - free -  (993K)
        2048  1953513472     1  !142  (932G)
  1953515520  1953513648        - free -  (932G)


zpool import vault
Code:
cannot import 'vault': one or more devices is currently unavailable
 

Dooldeniya

Dabbler
Joined
Jan 18, 2012
Messages
32
looks like I might be rebuilding this from scratch... anything else I should try before starting over?

zpool import
Code:

  pool: vault
    id: 16286990911602270661
 state: UNAVAIL
status: One or more devices contains corrupted data.
action: The pool cannot be imported due to damaged devices or data.
   see: http://www.sun.com/msg/ZFS-8000-5E
config:

	vault       UNAVAIL  insufficient replicas
	  mirror    FAULTED  corrupted data
	    ada0p2  FAULTED  corrupted data
	    ada1    FAULTED  corrupted data
 

William Grzybowski

Wizard
iXsystems
Joined
May 27, 2011
Messages
1,754
As a _last_ resource you might want to try:

# zpool import -FX vault

This might take a while (several hours)
 

Dooldeniya

Dabbler
Joined
Jan 18, 2012
Messages
32
got the following error:

Code:
# zpool import -FX vault
invalid option 'X'
usage:
	import [-d dir] [-D]
	import [-o mntopts] [-o property=value] ... 
	    [-d dir | -c cachefile] [-D] [-f] [-R root] -a
	import [-o mntopts] [-o property=value] ... 
	    [-d dir | -c cachefile] [-D] [-f] [-R root] <pool | id> [newpool]
 

Dooldeniya

Dabbler
Joined
Jan 18, 2012
Messages
32
got it to import but can't access the files. Is there a way to detach the corrupted drive?

Code:
# zpool status
  pool: vault
 state: UNAVAIL
status: One or more devices could not be opened.  There are insufficient
	replicas for the pool to continue functioning.
action: Attach the missing device and online it using 'zpool online'.
   see: http://www.sun.com/msg/ZFS-8000-3C
 scrub: none requested
config:

	NAME        STATE     READ WRITE CKSUM
	vault       UNAVAIL      0     0     1  insufficient replicas
	  mirror    FAULTED      0     0     6  corrupted data
	    ada0p2  FAULTED      0     0     6  corrupted data
	    ada1    UNAVAIL      0     0     0  cannot open


When I try zpool detach vault ada0p2 I get the following error:

Code:
# zpool detach vault ada0p2
cannot open 'vault': pool is unavailable
 

William Grzybowski

Wizard
iXsystems
Joined
May 27, 2011
Messages
1,754
I guess not...
Try booting FreeBSD 9 and import with -FX...

Not sure what else to do besides that.
 

Dooldeniya

Dabbler
Joined
Jan 18, 2012
Messages
32
Thanks for the suggestion. I was able to boot FreeBSD 9 and import the pool. I have full access to the data but am getting the following error when I ran a scrub...

Code:
GEOM: ada0: the primary GPT table is corrupt or invalid.
GEOM: ada0: using the secondary instead -- recovery strongly advised


I ran gpart recover /dev/ada0 which told me that the it was recovered (using instructions from protosd's blog -- http://protosd.blogspot.com/2011/12/useful-commands-for-diagnosingmanaging.html). However when I import the pool back and run the scrub process again it gives the same error message as above. Is it safe to operate with this error? Any thoughts on what could be done to correct the error?
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Code:
GEOM: ada0: the primary GPT table is corrupt or invalid.
GEOM: ada0: using the secondary instead -- recovery strongly advised
Is it safe to operate with this error? Any thoughts on what could be done to correct the error?

No, you should fix the error. Did you try doing "sysctl kern.geom.debugflags=0x10" before doing the gpart recover command?


EDIT: Never mind about the gpart show, I missed that.
 

Dooldeniya

Dabbler
Joined
Jan 18, 2012
Messages
32
Yes, I did the "sysctl kern.geom.debugflags=0x10" prior to the recover command. got the message kern.geom.debugflags: 16 -> 16. Then I ran gpart recover /dev/ada0 and got the response "ada recovered". However, once I import the pool back from the CLI and export it (to import back via the GUI) I get the same message that is posted above.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
Yes, I did the "sysctl kern.geom.debugflags=0x10" prior to the recover command
Have your rebooted? I seem to remember I needed to reboot after doing this to wipe one of my disks before I could do anything else with it.
 
Status
Not open for further replies.
Top