gpart restore seems to hang on corrupted secondary GPT label
Marco Steinbach
coco at executive-computing.de
Sun Feb 20 19:38:30 UTC 2011
Hi,
gpart restore seems to hang upon restoring the secondary GPT table on a
drive formerly used as startup and system disc in a Mac OSX system.
Oddly, I was already able to mount the drive and back up data to it
before, where I simply ignored the warning (which I'm not exactly proud
of now), disklabeled and newfs'ed the drive and went on.
The backed up data is of no importance, and I could probably simply dd
out the gpt data, but I tried gpart restore, which simply sits (see
truss output) and seems to wait.
I'm in a position of being able to try and test this with different
revisions, if someone wants me to.
gatekeeper# uname -a
FreeBSD gatekeeper.c0c0.intra 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #0:
Thu Dec 23 18:43:57 UTC 2010
root at c3host.c0c0.intra:/usr/obj/usr/src/sys/GATEKEEPER i386
Connecting the drive yields:
da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
da0: <SAMSUNG HD502HI > Fixed Direct Access SCSI-2 device
da0: 40.000MB/s transfers
da0: 476940MB (976773168 512 byte sectors: 255H 63S/T 60801C)
GEOM: da0: the secondary GPT table is corrupt or invalid.
GEOM: da0: using the primary only -- recovery suggested.
GEOM: ufsid/4d2665945e9460e3: the secondary GPT table is corrupt or invalid.
GEOM: ufsid/4d2665945e9460e3: using the primary only -- recovery suggested.
gatekeeper# gpart status
Name Status Components
mirror/gatemirrors1 OK mirror/gatemirror
mirror/gatemirrors1a OK mirror/gatemirrors1
ad2s1 OK ad2
ad2s1d OK ad2s1
da1s1 OK da1
ufsid/4d2665945e9460e3p1 CORRUPT ufsid/4d2665945e9460e3
gatekeeper# gpart delete -i 4 ufsid/4d2665945e9460e3
gpart: table 'ufsid/4d2665945e9460e3' is corrupt: Operation not permitted
gatekeeper# truss gpart restore ufsid/4d2665945e9460e3
[...]
sigaction(SIGINT,{ 0x281e3880 0x0 ss_t },0x0)
= 0 (0x0)
fstat(0,{ mode=crw--w---- ,inode=153,size=0,blksize=4096 }) = 0 (0x0)
ioctl(0,TIOCGETA,0xbfbfb170)
= 0 (0x0)
I've left it sitting there for about twenty minutes, no change.
gatekeeper# gpart list ufsid/4d2665945e9460e3
Geom name: ufsid/4d2665945e9460e3
state: CORRUPT
fwheads: 255
fwsectors: 63
last: 976773134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ufsid/4d2665945e9460e3p1
Mediasize: 209715200 (200M)
Sectorsize: 512
Mode: r0w0e0
rawuuid: 86bd4e71-aa40-43a8-9107-7d1ee6841157
rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
label: EFI System Partition
length: 209715200
offset: 20480
type: efi
index: 1
end: 409639
start: 40
2. Name: ufsid/4d2665945e9460e3p2
Mediasize: 21474836480 (20G)
Sectorsize: 512
Mode: r0w0e0
rawuuid: 3855b6d8-8e41-4b8b-acad-abfe0c1a4622
rawtype: 48465300-0000-11aa-aa11-00306543ecac
label: Untitled
length: 21474836480
offset: 209735680
type: apple-hfs
index: 2
end: 42352679
start: 409640
3. Name: ufsid/4d2665945e9460e3p3
Mediasize: 21474836480 (20G)
Sectorsize: 512
Mode: r0w0e0
rawuuid: 9ac84f93-6efc-4d3e-906b-9f6ef82df2aa
rawtype: 48465300-0000-11aa-aa11-00306543ecac
label: Untitled
length: 21474836480
offset: 21818789888
type: apple-hfs
index: 3
end: 84557863
start: 42614824
4. Name: ufsid/4d2665945e9460e3p4
Mediasize: 456545779712 (425G)
Sectorsize: 512
Mode: r0w0e0
rawuuid: 23a79a2e-d7ac-4b56-994b-42586020b598
rawtype: 48465300-0000-11aa-aa11-00306543ecac
label: Untitled
length: 456545779712
offset: 43427844096
type: apple-hfs
index: 4
end: 976510983
start: 84820008
Consumers:
1. Name: ufsid/4d2665945e9460e3
Mediasize: 500107862016 (466G)
Sectorsize: 512
Mode: r0w0e0
MfG CoCo
More information about the freebsd-geom
mailing list