From owner-freebsd-fs Mon Jun 7 2:26:48 1999 Delivered-To: freebsd-fs@freebsd.org Received: from rhea.king.ac.uk (rhea.king.ac.uk [141.241.231.2]) by hub.freebsd.org (Postfix) with SMTP id 50E9A15028 for ; Mon, 7 Jun 1999 02:26:44 -0700 (PDT) (envelope-from K980705@atlas.kingston.ac.uk) Received: from atlas.king.ac.uk (actually host fad.king.ac.uk) by rhea.king.ac.uk with SMTP (XT-PP) with ESMTP; Mon, 7 Jun 1999 10:27:29 +0100 Received: from TE0/SpoolDir by atlas.king.ac.uk (Mercury 1.44); 7 Jun 99 10:26:28 +0000 Received: from SpoolDir by TE0 (Mercury 1.44); 7 Jun 99 10:26:26 +0000 From: James ANNESLEY To: FREEBSD-FS@FREEBSD.ORG Date: Mon, 7 Jun 1999 10:26:23 GMT0BST MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: crashed disk X-mailer: Pegasus Mail v3.40 (NDS) Message-ID: <49B9191B29@atlas.king.ac.uk> Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Dear Fs goup, I attempted to create a new partition on a disk drive in RedHat 5.0. This didn't work. Instead my other hard disk became unusable. When attempting to fix this in FreeBSD 2.2.6, I was interested to find that the disklabel for this crashed disk was different from that stored in the FreeBsd system. Even after a new FreeBSD installation. I have noticed similar comments in this forum; to the effect that the disklabel stored on the disk is different from the one stored in FreeBSD for the same disk. I used: $disklabel wd2 and $disklabel -r wd2 Can any one shed any light on the matter? I solved the problem by using DOS fdisk and formating the drive again. James To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Mon Jun 7 6:11:16 1999 Delivered-To: freebsd-fs@freebsd.org Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.26.10.9]) by hub.freebsd.org (Postfix) with ESMTP id 6C7A214D12 for ; Mon, 7 Jun 1999 06:11:12 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id XAA17525; Mon, 7 Jun 1999 23:11:10 +1000 Date: Mon, 7 Jun 1999 23:11:10 +1000 From: Bruce Evans Message-Id: <199906071311.XAA17525@godzilla.zeta.org.au> To: FREEBSD-FS@FreeBSD.ORG, K980705@atlas.kingston.ac.uk Subject: Re: crashed disk Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >I have noticed similar comments in this forum; to the effect that the >disklabel stored on the disk is different from the one stored in >FreeBSD for the same disk. >I used: > >$disklabel wd2 > >and > >$disklabel -r wd2 > >Can any one shed any light on the matter? This is probably caused by disklabel(8)'s search for the label being inconsistent with the kernel's search, and the label not being in its usual place because you moved it using fdisk or the disk is a foreign one. disklabel(8) searches for the label at each 16-byte boundary in the entire "boot area" (8K beginning at byte offset 0 in the slice). The kernel searches at each 4-byte boundary in the sector at sector offset LABELSECTOR in the slice. On i386's, LABELSECTOR is 1 and the sector size is normally 512 (other sizes are unusual but possible), so the kernel's search area is quite different from disklabel(8)'s. There is normally no problem because sector 0 doesn't contain a label for disklabel(8) to find, and disklabel -r isn't very useful anyway (except for writing the initial label, when there is no problem). Labels not in their standard place on a slice will also appear to be different because i/o for them is not snooped on. The kernel converts offsets in labels from absolute to relative even for raw i/o, so that `disklabel -r' and copying of whole slices works right. The conversions aren't done for misplaced labels or for copying whole disks. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message