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 ?
pgpK2X9uCl2vz.pgp
Description: PGP signature
