Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Mar 2017 00:28:27 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 218026] sbin/gpart: can't/won't keep secondary GPT table in sync with the primary table
Message-ID:  <bug-218026-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D218026

            Bug ID: 218026
           Summary: sbin/gpart: can't/won't keep secondary GPT table in
                    sync with the primary table
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: misc
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: portmaster@bsdforge.com

OK this is for a USB3 stick I use for dumps, restores && jails.
So nothing important on it, or anything. :-(
Here's the messages I receive:
GEOM: new disk da0
GEOM: new disk cd0
GEOM: da0: the secondary GPT table is corrupt or invalid.
GEOM: da0: using the primary only -- recovery suggested.
GEOM: diskid/DISK-E600665E1DC77749: the secondary GPT table is corrupt or
invalid.
GEOM: diskid/DISK-E600665E1DC77749: using the primary only -- recovery
suggested.

which is understandable if the device hadn't been dismounted
properly, or the system had crashed, powered off unexpectedly.
But that's not the case. The stick is always in, and is mounted
as any other system drive/slice/partition.

# gpart show da0
=3D>       40  247463856  da0  GPT  (118G)
         40  247463856    1  freebsd-ufs  (118G)

# gpart list da0
Geom name: da0
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 247463895
first: 40
entries: 152
scheme: GPT
Providers:
1. Name: da0p1
   Mediasize: 126701494272 (118G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 20480
   Mode: r1w1e2
   rawuuid: 30ca1b6e-0df1-11e7-b26e-3497f69fd18f
   rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
   label: jails
   length: 126701494272
   offset: 20480
   type: freebsd-ufs
   index: 1
   end: 247463895
   start: 40
Consumers:
1. Name: da0
   Mediasize: 126701535232 (118G)
   Sectorsize: 512
   Mode: r1w1e3

I use this to archive all the servers I maintain locally,
as well as for build jails. This never presented any trouble
on an RELENG_11 box I originally used on.

The method to partition/format the drive:
gpart destroy -F da0
gpart create -s GPT da0
gpart add -t freebsd-ufs -l jails da0
newfs -U -o time
fsck /dev/gpt/jails
mount /jails

everything returns as one would expect *except* on the
after a reboot. Where it returns:
GEOM: new disk da0
GEOM: new disk cd0
GEOM: da0: the secondary GPT table is corrupt or invalid.
GEOM: da0: using the primary only -- recovery suggested.
GEOM: diskid/DISK-E600665E1DC77749: the secondary GPT table is corrupt or
invalid.
GEOM: diskid/DISK-E600665E1DC77749: using the primary only -- recovery
suggested.

gpart recover da0 brings it from CORRUPT to OK. But this shouldn't happen.

Suggestions? Thoughts? ...?

Thanks!

--Chris
 OH!
FreeBSD 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r314700:
Sun Mar 5 09:01:30 PST 2017 :/usr/obj/usr/src/sys/TESTKERN amd64

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-218026-8>