From owner-freebsd-hackers Wed Jan 3 06:10:24 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA09091 for hackers-outgoing; Wed, 3 Jan 1996 06:10:24 -0800 (PST) Received: from tfs.com (tfs.com [140.145.250.1]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id GAA09086 for ; Wed, 3 Jan 1996 06:10:21 -0800 (PST) Received: from critter.tfs.com by tfs.com (smail3.1.28.1) with SMTP id m0tXTtJ-0003vsC; Wed, 3 Jan 96 06:10 PST Received: from localhost.tfs.com (localhost.tfs.com [127.0.0.1]) by critter.tfs.com (8.6.12/8.6.12) with SMTP id PAA01360; Wed, 3 Jan 1996 15:10:09 +0100 X-Authentication-Warning: critter.tfs.com: Host localhost.tfs.com didn't use HELO protocol To: Michael Smith cc: bde@zeta.org.au, jkh@time.cdrom.com, freebsd-hackers@freebsd.org, obrien@cs.ucdavis.edu Subject: Re: X for install In-reply-to: Your message of "Thu, 04 Jan 1996 00:08:30 +1030." <199601031338.AAA07790@genesis.atrad.adelaide.edu.au> Date: Wed, 03 Jan 1996 15:10:08 +0100 Message-ID: <1358.820678208@critter.tfs.com> From: Poul-Henning Kamp Sender: owner-hackers@freebsd.org Precedence: bulk > 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.