SVN r221788: GEOM_PART: integrity check failed (da0, MBR); Western Digital "My Book"

Andrey V. Elsukov bu7cher at yandex.ru
Mon May 16 06:31:46 UTC 2011


On 16.05.2011 9:35, Brandon Gooch wrote:
> Woah. OK, so:
> 
> $ sudo geom disk list da0
> Geom name: da0
> Providers:
> 1. Name: da0
>    Mediasize: 2000365289472 (1.8T)
>    Sectorsize: 512
>    Mode: r0w0e0
>    descr: WD My Book 1130
>    ident: 5743415A4134343831393132
>    fwsectors: 63
>    fwheads: 255
> 
> Not seeing much from this. What exactly do you mean by the partition
> being "out of bounds"? Do you mean that the partition has been
> configured to be larger than the actual size of the disk?

So, i reproduce your problem:
# dd if=/dev/zero of=./disk oseek=3906963455 count=1
# mdconfig -f ./disk
# dd if=./mbr of=/dev/md0
# geom md list
Geom name: md0
Providers:
1. Name: md0
   Mediasize: 2000365289472 (1.8T)
   Sectorsize: 512
   Mode: r0w0e0
   file: /usr/home/devel/disk
   type: vnode
   length: 2000365289472
   fwsectors: 0
   fwheads: 0
   unit: 0

Your disk has mediasize = 2000365289472 bytes.
This is 2000365289472/512 = 3906963456 sectors.
This means that the first usable sector is 0 and
the last = 3906963456 - 1 = 3906963455.

But MBR does recalculation of available space and
aligns it to SectorsPerTrack:
last = 3906963456 - (3906963456 % 63) - 1 = 3906963395 sectors.

This value is smaller than value specified in MBR and integrity
check fails.

#gpart list md0
Geom name: md0
modified: false
state: CORRUPT
fwheads: 255
fwsectors: 63
>>>>>>>>>last: 3906963395
>>>>>>>>>first: 63
entries: 4
scheme: MBR
Providers:
1. Name: md0s1
   Mediasize: 2000364240896 (1.8T)
   Sectorsize: 512
   Mode: r0w0e0
   rawtype: 7
   length: 2000364240896
   offset: 1048576
   type: ntfs
   index: 1
>>>>>>>>>   end: 3906963455
>>>>>>>>>   start: 2048
Consumers:
1. Name: md0
   Mediasize: 2000365289472 (1.8T)
   Sectorsize: 512
   Mode: r0w0e0

-- 
WBR, Andrey V. Elsukov

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20110516/9428780a/signature.pgp


More information about the freebsd-geom mailing list