Boot mirror: primary GPT table is corrupt or invalid

Status
Not open for further replies.

IceBoosteR

Guru
Joined
Sep 27, 2016
Messages
503
Hello guys,

today I have a problem with my boot pool. this pool is mirrored with 2 usb sticks. One 16GB and another one with 32GB. Both connected via USB 3.0.
I was restarting my nas today and observed, that the boot pool got dragraded. I have tried different thing, other port etc. and found the following issue:
Code:
GEOM: da1: the primary GPT table is corrupt or invalid.
GEOM: da1: using the secondary instead -- recovery strongly advised.


So after searching around and 3 resilverings (formated the stick before) I have booted gparted live and destoryed everything on the faulty usb stick.
After pressing the replace button in the GUI for the faulty drive I observed the message again:
Code:
GEOM: da1: the primary GPT table is corrupt or invalid.
GEOM: da1: using the secondary instead -- recovery strongly advised.

Again I was erasing everything, resilvered, nothing helps

Code:
[root@freenas] ~# gpart list da1
Geom name: da1
modified: true
state: OK
fwheads: 255
fwsectors: 63
last: 60062466
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: da1p1
  Mediasize: 524288 (512K)
  Sectorsize: 512
  Stripesize: 0
  Stripeoffset: 17408
  Mode: r0w0e0
  rawuuid: b02e7fb8-7f67-11e7-81ac-1866da308b0d
  rawtype: 21686148-6449-6e6f-744e-656564454649
  label: (null)
  length: 524288
  offset: 17408
  type: bios-boot
  index: 1
  end: 1057
  start: 34
2. Name: da1p2
  Mediasize: 30751436800 (29G)
  Sectorsize: 512
  Stripesize: 0
  Stripeoffset: 544768
  Mode: r1w1e1
  rawuuid: b046e8f7-7f67-11e7-81ac-1866da308b0d
  rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
  label: (null)
  length: 30751436800
  offset: 544768
  type: freebsd-zfs
  index: 2
  end: 60062463
  start: 1064
Consumers:
1. Name: da1
  Mediasize: 30752000000 (29G)
  Sectorsize: 512
  Mode: r2w2e3


Code:
zpool status
  pool: freenas-boot
state: ONLINE
  scan: scrub repaired 0 in 0h1m with 0 errors on Sat Aug 12 16:17:21 2017
config:

  NAME  STATE  READ WRITE CKSUM
  freenas-boot  ONLINE  0  0  0
  mirror-0  ONLINE  0  0  0
  da0p2  ONLINE  0  0  0
  da1p2  ONLINE  0  0  0



This seems to be healty and I run
Code:
gpart recover /dev/da1
da1 recovering is not needed



From this I am fine with that. But the problem now is, I cannot boot from da1.
When I start my NAS only with da1 connected (should be a mirror of da0...) the NAS cannot boot (Dell T20) from that usb stick as the BIOS cannot find a bootable partition or so.
Nothing to worry yet, data is safe and everything redundant, but in case of failure I cannot boot my server.

Some more info
Code:
da1 at umass-sim1 bus 1 scbus6 target 0 lun 0
da1: <SanDisk Ultra USB 3.0 1.00> Removable Direct Access SPC-4 SCSI device
da1: Serial Number 4C530001150619101593
da1: 400.000MB/s transfers
da1: 29327MB (60062500 512 byte sectors)
da1: quirks=0x2<NO_6_BYTE>



Any ideas what to do?

Regards
IceBoosteR
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I'm thinking that you must have a backup of your configuration file so I would do the following...

Install a SSD. Okay, that is what I'd do. ;)

In your situation I would recommend you wipe out both USB Flash drives and reinstall FreeNAS on them as a mirror, as soon as you can then restore your configuration file. That "should" do it. Also, you may need to replace the suspect flash drive with a different flash drive. After all that you could test to see if your system will boot from either single drive.
 

IceBoosteR

Guru
Joined
Sep 27, 2016
Messages
503
I'm thinking that you must have a backup of your configuration file so I would do the following...

Install a SSD. Okay, that is what I'd do. ;)

In your situation I would recommend you wipe out both USB Flash drives and reinstall FreeNAS on them as a mirror, as soon as you can then restore your configuration file. That "should" do it. Also, you may need to replace the suspect flash drive with a different flash drive. After all that you could test to see if your system will boot from either single drive.
Hi,

the flash drive is new, bought it 1 month ago as I was had only one single drive as boot and want redundancy :)
But well, thats a lot of work again ...
And I can not figure out why the heck it is doing that. Maybe the server itself is too stupid to boot from it. Under Windows this sticks works fine (just for testing, after that I was cleaning it with gparted).
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
If I understand you correctly, you did try to boot the stick by itself and it failed. Did you also go into the BIOS to ensure it was looking to boot from that specific USB device? You should not assume that there is a USB failover, generally there is not.
 

IceBoosteR

Guru
Joined
Sep 27, 2016
Messages
503
If I understand you correctly, you did try to boot the stick by itself and it failed. Did you also go into the BIOS to ensure it was looking to boot from that specific USB device? You should not assume that there is a USB failover, generally there is not.
Yes thats true. In the BIOS USB-Boot is enabled, I cannot select specific devices here. I did also a Dell-Healthcheck. Evenrything fine, and the UEFI/BIOS is also able to see the stick.
Maybe the BIOS settings are really the problem. I can test it in the week, the NAS is currently under heavy use :)
But that would not explain, why on earth the device was set as "UNKNOWN" on the first boot today ...
Best wishes
Ice
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I would be curious to hear if you figure this out, if the boot device can be any bootable USB in any USB port location.
 
Status
Not open for further replies.
Top