[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: on BIOS problems with disks larger than 2 TB
From:       John Baldwin <jhb () freebsd ! org>
Date:       2016-08-15 17:15:51
Message-ID: 3259742.YBnQU2zACB () ralph ! baldwin ! cx
[Download RAW message or body]

On Friday, August 12, 2016 10:44:04 PM Warner Losh wrote:
> On Fri, Aug 12, 2016 at 2:58 PM, Andriy Gapon <avg@freebsd.org> wrote:
> > On 12/08/2016 22:18, John Baldwin wrote:
> >> Hmm, I'm not sure how easy it is to handle this case (i.e. how do you know
> >> if an LBA beyond the size is really legit due to truncation vs coming from
> >> corrupted metadata).  Related is that tsoome's bcache stuff wants to know
> >> where the end of the disk is (to avoid reading off the end), so just
> >> ignoring the size is not easy.
> >
> > One idea that I have in mind but haven't really explored yet is for GPT
> > formatted disks.  Basically, if a GPT label hints that the disk size is larger
> > than what BIOS reports, then we could try to read a backup label and if it
> > matches what we expect, then we could adjust the size.
> >
> > Hmm, I think I recall that a long time ago some BIOSes used to do something
> > similar with MBR :-)
> 
> I think we should just trust the GPT bounds and ignore the actual size
> of the disk.
> If this is incorrect, we'll get I/O errors to indicate something is
> wrong. Doesn't
> matter what's wrong, at the end of the day, and many different
> pathologies present
> as the same error. We should ignore the total size of the disk reported by BIOS
> routines because they lie to stay compatible with the long-dead hand
> of the past.

Well, we don't always have a GPT for one, and not all BIOS'es lie.  We can
always just start with what the BIOS says and override it if we find a valid
GPT that indicates a larger size (which is what Andriy suggested I believe).

-- 
John Baldwin
_______________________________________________
freebsd-hackers@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic