Drive not recognized as part of pool after reboot.

Status
Not open for further replies.

kalfalfa

Cadet
Joined
Sep 7, 2012
Messages
2
Hi,

I just recently replaced a drive that started showing errors in a zpool. re-silver seemed to go fine and the pool was happy, but after I reboot I'm now getting this:
Code:
[patrick@freenas] /mnt/R2-D2/gptbackup# zpool status
  pool: R2-D2
 state: DEGRADED
status: One or more devices could not be opened.  Sufficient replicas exist for
	the pool to continue functioning in a degraded state.
action: Attach the missing device and online it using 'zpool online'.
   see: http://www.sun.com/msg/ZFS-8000-2Q
 scrub: none requested
config:

	NAME                      STATE     READ WRITE CKSUM
	R2-D2                     DEGRADED     0     0     0
	  raidz1                  DEGRADED     0     0     0
	    ada0                  ONLINE       0     0     0
	    13234550278812065178  UNAVAIL      0     0     0  was /dev/ada2
	    ada1                  ONLINE       0     0     0
	    ada3                  ONLINE       0     0     0

And this:
Code:
[patrick@freenas] /mnt/R2-D2/gptbackup# gpart show
=>     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)

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

=>        34  2930277101  ada4  GPT  (1.4T)
          34  2930277101     1  freebsd-ufs  (1.4T)

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


and during boot, this:

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


Now, I'm not sure why ada2 is showing up as having partitions - I'm using ada0-ada3 in the raidz as full drives, and so none of these should have a partition table - or at least that's how I understand it. For some reason, the ZFS sybsystem isn't recognizing that ada2 is still part of the pool.

How do I get FreeNAS to realize that this volume is part of a zpool? Why is it finding a 'secondary GPT table'? I have never partitioned this drive....

Does FreeNAS auto-create partitions on a new blank drive - this freebsd-swap and freebsd-zfs? This pool was originally created in FreeNAS 7 and then imported into FreeNAS 8 and has been running happily until now.

I did have some trouble when I had to replace the drive - the system absolutely refused to replace the drive with the GUI - I would get messages like 'Disk replacement failed: "cannot replace 13234550278812065178 with gptid/837a9ef7-f90c-11e1-b3bf-bcaec52caf32: device is too small' - it seems that maybe the GUI doesn't properly support pools that use the entire drive? I had to do the replace from command line.

Thanks for any pointers,
-Patrick
 

kalfalfa

Cadet
Joined
Sep 7, 2012
Messages
2
I think what may of happend, is that the drive got resilvered into the pool, but for some reason the secondary GPT table remained - and during reboot, the system picked this up and recreated the primary table.

So what I've done is to wipe primary and secondary tables:

Code:
dd if=/dev/zero of=/dev/ada2 bs=4096 count=1
dd if=/dev/zero of=/dev/ada2 seek=3907029135 count=1


Then reboot.

At this point, the drive shows no partitions, but is still not recognized as part of the pool - what exactly determines whether a drive is recognized?

At any rate, I've done a

Code:
zpool replace R2-D2 ada2


and that worked, and it's reslivering - lets hope that things come back properly after a reboot this time.....

-Patrick
 
Status
Not open for further replies.
Top