Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Jan 1996 15:10:08 +0100
From:      Poul-Henning Kamp <phk@critter.tfs.com>
To:        Michael Smith <msmith@atrad.adelaide.edu.au>
Cc:        bde@zeta.org.au, jkh@time.cdrom.com, freebsd-hackers@freebsd.org, obrien@cs.ucdavis.edu
Subject:   Re: X for install 
Message-ID:  <1358.820678208@critter.tfs.com>
In-Reply-To: Your message of "Thu, 04 Jan 1996 00:08:30 %2B1030." <199601031338.AAA07790@genesis.atrad.adelaide.edu.au> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Poul-Henning Kamp stands accused of saying:
> > > There are a few "better" ways perhaps to look for more unique things,
> > > but you'll still be screwed by two identical disks with identical
> > > contents 8(
> > 
> > Well my idea was something like:
> > 
> > 	sector = 0
> > 	while (1)
> > 		for all disks the bios knows about
> > 			read $sector
> > 			update checksum[disk]
> > 		if checksums differ
> > 			store checksum[] & $sector
> > 		sector++
> 
> 
> Two 1G disks, one IDE, one SCSI.  Both (miraculously) have identical 
> MBR's, and no contents.  (Think scrubbed disks)

OK OK, put some upper limit on it then :-)

> Or two identical recently-low-level-formatted disks on a single SCSI
> controller in the presence of ID hardwiring.  Or even the same disks
> after they've been labelled and have identical filesystems on them.
> 
> And how much of the disk are you going to read before you give up?
> (Yes, I know a better approach would be to scatter the reads exponentially
> across the disk)
> 
> The problem is not the general case, it's the worst case.  I guess the
> question is whether the worst case is worth worrying about... 8)

No, I doubt that.  I expect the above loop to finish in < 3 sectors
in 99.999% of the cases where it matters.
(if the bios reports same geometry for two disks, then we don't care
if they are identical, since it will not confuse us.  We just need
a signature for each bios-geometry :-)

--
Poul-Henning Kamp           | phk@FreeBSD.ORG       FreeBSD Core-team.
http://www.freebsd.org/~phk | phk@login.dknet.dk    Private mailbox.
whois: [PHK]                | phk@ref.tfs.com       TRW Financial Systems, Inc.
Future will arrive by its own means, progress not so.



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