From mi@rtfm.ziplink.net Thu Aug 27 06:53:12 1998 Received: from localhost.ziplink.net (kot.ne.mediaone.net [24.128.29.55]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA14249 for ; Thu, 27 Aug 1998 06:53:11 -0700 (PDT) (envelope-from mi@rtfm.ziplink.net) Received: from rtfm.ziplink.net (mi@rtfm [199.232.255.52]) by localhost.ziplink.net (8.8.8/8.8.7) with ESMTP id NAA01754 for ; Thu, 27 Aug 1998 13:52:19 GMT (envelope-from mi@rtfm.ziplink.net) Received: (from mi@localhost) by rtfm.ziplink.net (8.9.1/8.8.5) id JAA07837; Thu, 27 Aug 1998 09:52:18 -0400 (EDT) Message-Id: <199808271352.JAA07837@rtfm.ziplink.net> Date: Thu, 27 Aug 1998 09:52:18 -0400 (EDT) From: Mikhail Teterin Reply-To: mi@aldan.algebra.com To: FreeBSD-gnats-submit@freebsd.org Subject: disklabel misbehaving on seriously sick disks X-Send-Pr-Version: 3.2 >Number: 7756 >Category: bin >Synopsis: disklabel misbehaving on seriously sick disks >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Aug 27 07:00:00 PDT 1998 >Closed-Date: Thu Jul 26 19:15:36 PDT 2001 >Last-Modified: Thu Jul 26 19:18:52 PDT 2001 >Originator: Mikhail Teterin >Release: FreeBSD 3.0-CURRENT i386 >Organization: >Environment: A disk with hosed partition table(s) >Description: My attempts to disklabel -r -w sd1 auto where resulting in "No space on device" and similar non-sense. When I tried to use disklabel from 2.2.6-STABLE, it simply segfaulted. It seemed from reading the man-page, that `-w' should just write the table out after figuring the parameters out _without reading the disk_. >How-To-Repeat: Hard -- you need to hose your disk in some special way. My machine did it for me and would not tell me how. >Fix: Nuke the first several sectors with ``dd if=/dev/zero ...'' I had a swap partition on that disk prior to the precious file system I tried to restore, so I did not worry about nuking too much. After this, I was able to auto-create the disklabel and edit it to access my FS. I used to mount it as sd1s1e. Well, now it is /dev/sd1e, but I prefer it this way -- shorter... >Release-Note: >Audit-Trail: State-Changed-From-To: open->closed State-Changed-By: mike State-Changed-When: Sat Jul 21 22:19:52 PDT 2001 State-Changed-Why: It would be next to impossible to fix this problem, as even the originator can't reproduce it. http://www.FreeBSD.org/cgi/query-pr.cgi?pr=7756 State-Changed-From-To: closed->suspended State-Changed-By: mike State-Changed-When: Mon Jul 23 16:43:14 PDT 2001 State-Changed-Why: Re-opened at the originator's request. I don't see how we can fix this problem with the amount of details in the PR, but the originator seems to think so. Awaiting fix and committer. http://www.FreeBSD.org/cgi/query-pr.cgi?pr=7756 From: Mike Barcroft To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: bin/7756: disklabel misbehaving on seriously sick disks Date: Mon, 23 Jul 2001 20:04:02 -0400 Adding to Audit-Trail. ----- Forwarded message from Mikhail Teterin ----- X-UIDL: 0e42d5eb7bf39e4917d3ed0b52a90c41 Delivered-To: mike@freebsd.org Date: Mon, 23 Jul 2001 12:50:54 -0400 (EDT) From: Mikhail Teterin Subject: Re: bin/7756: disklabel misbehaving on seriously sick disks To: mike@FreeBSD.org Cc: freebsd-bugs@FreeBSD.org In-Reply-To: <200107220521.f6M5L4Z54704@freefall.freebsd.org> On 21 Jul, mike@FreeBSD.org wrote: > Synopsis: disklabel misbehaving on seriously sick disks > > State-Changed-From-To: open->closed > State-Changed-By: mike > State-Changed-When: Sat Jul 21 22:19:52 PDT 2001 > State-Changed-Why: > > It would be next to impossible to fix this problem, as even the > originator can't reproduce it. Again! I think, the description points to the right direction -- the disklabel is trying to read the disk even though -w is given... Please, don't rush the PR closures the way you do... > http://www.FreeBSD.org/cgi/query-pr.cgi?pr=7756 -- |\__-----__/| _____/ ::::: :::\_____ '__--( ::::::::..::)--__` -mi If you have a / _- \/ :::::::\/ -_ serious knowledge / / :. .::::\ \ about computers -- | ::::::::::::| Ok, let's say you broke keep it in a secret! _|/ ::::____::\|_ the wall with your head "Rules of dating", / /:::::/:_::\::\:.\ What are you going to 'Playboy', ? 1994 | :| ..:(_/ \::|::|::| do in the next cell? | :|:::::. ::|: |::|.:| Stanislaw J. Lec \ |:: :::_/::/: :|:/ ((___\____\____/___/___)) ----- End forwarded message ----- From: Mike Barcroft To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: bin/7756: disklabel misbehaving on seriously sick disks Date: Wed, 25 Jul 2001 23:39:31 -0400 Adding to Audit-Trail. ----- Forwarded message from Mikhail Teterin ----- X-UIDL: 82512ab587867a4f91fab60caaaf45f7 Delivered-To: mike@freebsd.org Date: Tue, 24 Jul 2001 10:28:43 -0400 (EDT) From: Mikhail Teterin Subject: Re: bin/7756: disklabel misbehaving on seriously sick disks To: mike@FreeBSD.org Cc: freebsd-bugs@FreeBSD.org In-Reply-To: <200107232345.f6NNjDS02085@freefall.freebsd.org> On 23 Jul, mike@FreeBSD.org wrote: > Synopsis: disklabel misbehaving on seriously sick disks > > State-Changed-From-To: closed->suspended > State-Changed-By: mike > State-Changed-When: Mon Jul 23 16:43:14 PDT 2001 > State-Changed-Why: > > Re-opened at the originator's request. I don't see how we can fix this > problem with the amount of details in the PR, but the originator seems > to think so. Awaiting fix and committer. The disklabel(8) should be modified, so that when -w is used, the disk is NOT read prior to writing. In my PR, the work around is documented: dd if=/dev/zero ... It should not be neccessary, AFAIU. Thanks for reopening, although, I don't see, why it is being suspended -- it is hardly even analyzed :) -mi ----- End forwarded message ----- From: Mike Barcroft To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: bin/7756: disklabel misbehaving on seriously sick disks Date: Wed, 25 Jul 2001 23:41:20 -0400 Adding to Audit-Trail. ----- Forwarded message from Bruce Evans ----- X-UIDL: 322cab6876710ba0e192e5cb3c34bd2c Delivered-To: mike@freebsd.org Date: Wed, 25 Jul 2001 19:48:18 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Mikhail Teterin Cc: mike@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG Subject: Re: bin/7756: disklabel misbehaving on seriously sick disks In-Reply-To: <200107241428.f6OESiY43239@aldan.algebra.com> On Tue, 24 Jul 2001, Mikhail Teterin wrote: > On 23 Jul, mike@FreeBSD.org wrote: > > Re-opened at the originator's request. I don't see how we can fix this > > problem with the amount of details in the PR, but the originator seems > > to think so. Awaiting fix and committer. > > The disklabel(8) should be modified, so that when -w is used, the disk > is NOT read prior to writing. No. `disklabel -w' doesn't read the label, but open(2) does. Then attempts to write a broken label using either ioctl(2) or write(2) fail. Anyway, `disklabel -w -B' must read the disk on i386's to preserve the partition^W slice table. The example in the PR (disklabel -w [-r] -B da0s1) attempts to apply the "auto" label (which was only for the whole disk slice at the time of the PR) to the first FreeBSD slice. This fails unless the disk has no slice table or the FreeBSD slice covers the whole disk. The example should work in RELENG_4 and -current. > In my PR, the work around is documented: > > dd if=/dev/zero ... This "works" by clobbering the slice table. This should be fixed someday. Bruce ----- End forwarded message ----- From: Mike Barcroft To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: bin/7756: disklabel misbehaving on seriously sick disks Date: Thu, 26 Jul 2001 22:24:58 -0400 Adding to Audit-Trail. ----- Forwarded message from Mikhail Teterin ----- X-UIDL: 97ccbd5365a32a61429bfa56a4e8e375 Delivered-To: mike@freebsd.org Date: Thu, 26 Jul 2001 02:58:40 -0400 (EDT) From: Mikhail Teterin Subject: Re: bin/7756: disklabel misbehaving on seriously sick disks To: bde@zeta.org.au Cc: mike@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG In-Reply-To: On 25 Jul, Bruce Evans wrote: [...] > The example should work in RELENG_4 and -current. > >> In my PR, the work around is documented: >> >> dd if=/dev/zero ... > > This "works" by clobbering the slice table. This should be fixed someday. So, I take it, the PR should remain open? -mi ----- End forwarded message ----- From: Mike Barcroft To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: bin/7756: disklabel misbehaving on seriously sick disks Date: Thu, 26 Jul 2001 22:26:38 -0400 Adding to Audit-Trail. ----- Forwarded message from Bruce Evans ----- X-UIDL: 6bba9ac2b14121d5b4680209bd350931 Delivered-To: mike@freebsd.org Date: Fri, 27 Jul 2001 02:00:28 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Mikhail Teterin Cc: mike@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG Subject: Re: bin/7756: disklabel misbehaving on seriously sick disks In-Reply-To: <200107260658.f6Q6wfY09656@aldan.algebra.com> On Thu, 26 Jul 2001, Mikhail Teterin wrote: > On 25 Jul, Bruce Evans wrote: > [...] > > The example should work in RELENG_4 and -current. > > > >> In my PR, the work around is documented: > >> > >> dd if=/dev/zero ... > > > > This "works" by clobbering the slice table. This should be fixed someday. > > So, I take it, the PR should remain open? No. The bugfeatures of write(2) are a different problem. Bruce ----- End forwarded message ----- State-Changed-From-To: suspended->closed State-Changed-By: mike State-Changed-When: Thu Jul 26 19:15:36 PDT 2001 State-Changed-Why: This is expected behaviour; see the Audit-Trail for details. http://www.FreeBSD.org/cgi/query-pr.cgi?pr=7756 >Unformatted: