Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

7.0-RELEASE, panic and double digit partitions

2 views
Skip to first unread message

Tim Middleton

unread,
Apr 16, 2008, 2:26:10 AM4/16/08
to
Upgraded my 6.3 to 7.0 last weekend. Good-bye stability. Several
(seemingly disk IO) related panics later, I find one of my drives'
slices had disappeared. I quickly discovered the partition table of
the drive appears to have been changed. It took me a lot longer to
realize that actually the partition table of the problematic drive
actually appears now a duplicate of the partition table on another
(working) drive....

The working drive is "ad10", and the wrecked drive is "ad1"... is it
possible that some code somewhere does not expect double digit drive
device names, and got confused between ad1 and ad10? It seems quite a
coincidence that the "1" now has 10's partition table.

The only thing i can think that might have done it is fsck that ran
after the last panic. But does fsck modify partition tables? I don't
know. I fear that fsck (or something related) did some terrible evil
to my poor drive.

No backup of the partition apparently overwritten table to consult.

I have scanned the broken drive with sysutils/testdisk. It only finds
the disklabel on the first slice. (All 4 slices previously defined,
though only slice 1 and slice 4 were being used.)

Overlooking my recovery struggles, I'm most worried now that there
really is a nastby bug somewhere that may affect others with similarly
numbered drive device names, so would appreciate it if someone with
some actual knowledge of the code/systems involved may consider
this... (should i dump this in a PR?)

The evidence:

ad1: 152627MB <WDC WD1600JB-00EVA0 15.05R15> at ata0-slave UDMA100
ad10: 476940MB <Seagate ST3500320AS SD15> at ata5-master SATA150

Excerpt from fstab (to show which slices were being used):

/dev/ad1s1d /drives/ad1s1d ufs rw,noexec,noatime 2 2
/dev/ad1s4d /drives/ad1s4d ufs rw,noexec,noatime 2 2

As I say, slice 1 and 4 were in use. Slice 2 and 3 I believe were old
linux partitions, long unused I seem to recall (the drive is old). I
can still
mount/access ad1s1d (read-only until i sort more of this out), though
the disklabel complains about the disk size (output below).

/dev/ad10s1a / ufs rw 1 1
/dev/ad10s1b none swap sw 0 0
/dev/ad10s1d /var ufs rw 2 2
/dev/ad10s1e /tmp ufs rw 2 2
/dev/ad10s1f /usr ufs rw 2 2
/dev/ad10s1g /home ufs rw 2 2

Only using slice 1 on ad10, though slice 2 exists taking up the rest
of the disk space for planned future use. Drive which acquired the
device name "ad10" is new, just installed this weekend and a fresh 7.0-
RELEASE istalled on it.

Output of fdisk for the two drives (ad1 is clearly wrong as it is only
a 160 gig drive, as can be seen from the kernel message above):

******* Working on device /dev/ad1 *******
parameters extracted from in-core disklabel are:
cylinders=310101 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=310101 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 629137467 (307196 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 629137530, size 347630535 (169741 Meg), flag 0
beg: cyl 1023/ head 255/ sector 63;
end: cyl 1023/ head 254/ sector 63
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

******* Working on device /dev/ad10 *******
parameters extracted from in-core disklabel are:
cylinders=969021 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=969021 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 629137467 (307196 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 629137530, size 347630535 (169741 Meg), flag 0
beg: cyl 1023/ head 255/ sector 63;
end: cyl 1023/ head 254/ sector 63
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

Finally, the output of the disklabels:

# /dev/ad1s1:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
c: 41929587 0 unused 0 0 # "raw" part,
don't edit
d: 41929587 0 4.2BSD 0 0 0
disklabel: partition c doesn't cover the whole unit!
disklabel: An incorrect partition c may cause problems for standard
system utilities

disklabel: /dev/ad1s2 read: Input/output error

# /dev/ad10s1:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 2097152 0 4.2BSD 2048 16384 28528
b: 4194304 2097152 swap
c: 629137467 0 unused 0 0 # "raw" part,
don't edit
d: 4194304 6291456 4.2BSD 2048 16384 28528
e: 4194304 10485760 4.2BSD 2048 16384 28528
f: 46137344 14680064 4.2BSD 2048 16384 28528
g: 568320059 60817408 4.2BSD 2048 16384 28528

# /dev/ad10s2:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
c: 347630535 0 unused 0 0 # "raw" part,
don't edit

Any other helpful info I could provide?

0 new messages