Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2011 11:14:32 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        "Andrey V. Elsukov" <bu7cher@yandex.ru>
Cc:        Brandon Gooch <jamesbrandongooch@gmail.com>, "Andrey V. Elsukov" <ae@freebsd.org>, Marcel Moolenaar <marcel@freebsd.org>, freebsd-geom@freebsd.org
Subject:   Re: SVN r221788: GEOM_PART: integrity check failed (da0, MBR); Western Digital "My Book"
Message-ID:  <20110516081432.GH48734@deviant.kiev.zoral.com.ua>
In-Reply-To: <4DD0C4CA.6040604@yandex.ru>
References:  <BANLkTim6d96Nrg%2Bayu5LF_vOEDguZN0TFg@mail.gmail.com> <4DD0A7A3.6020002@FreeBSD.org> <BANLkTinCRKXTYFg5Sy_uTE_TwX8kdLsi8g@mail.gmail.com> <4DD0B274.8080209@FreeBSD.org> <BANLkTi=L0-0vJftwDgvLG=P5epxGrBknKw@mail.gmail.com> <4DD0C4CA.6040604@yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Mon, May 16, 2011 at 10:31:38AM +0400, Andrey V. Elsukov wrote:
> 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
Could you, please, add the appropriate diagnostic to the kernel output
for each failure case ? 

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEARECAAYFAk3Q3OgACgkQC3+MBN1Mb4iIjwCgsXDnwg/NkamAPDmUqEbil+mx
S/QAn1DBTOdFSv6DEPrOapTWk2fznxKg
=nStk
-----END PGP SIGNATURE-----

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