From owner-freebsd-questions Tue Jan 15 21:19:25 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail4.nc.rr.com (fe4.southeast.rr.com [24.93.67.51]) by hub.freebsd.org (Postfix) with ESMTP id B7D9737B402 for ; Tue, 15 Jan 2002 21:19:22 -0800 (PST) Received: from there ([66.57.85.154]) by mail4.nc.rr.com with Microsoft SMTPSVC(5.5.1877.687.68); Wed, 16 Jan 2002 00:19:22 -0500 Content-Type: text/plain; charset="iso-8859-1" From: Brian T.Schellenberger To: "Christopher J. Umina" , Subject: Re: NewFS Date: Wed, 16 Jan 2002 00:18:55 -0500 X-Mailer: KMail [version 1.3] References: <009801c19e48$560f9420$0301a8c0@uminafamily.com> In-Reply-To: <009801c19e48$560f9420$0301a8c0@uminafamily.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: <01b892219051012FE4@mail4.nc.rr.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tuesday 15 January 2002 11:43 pm, Christopher J. Umina wrote: > Hey guys, > > I just ran newfs on two mounted drives by mistake (ad0 and ad1 instead > of da0 and da1) and I can't use the data on the disks anymore. The return > of the df command shows that the space on those drives is taken up the same > as before, but when I try to use it it says bad file descriptor. I ran > fsck and fsck -y on one of them but they didn't seem to do anything. I > also ran disklabel on the same one that I ran the fscks on and I cannot use > the data still. The one I used the fscks on I can cd into and I can see > the directores that were originally in there, but I can't cd to them. Is > there any way in the world to fix this? I really would love that data > back. No, that's a pretty deadly thing to do, I fear. Though I thought that newfs complained about mounted systems - ? If it doesn't, it most certainly ought to. (But I don't feel like trying it to find out!) Hope you have recent backups. The glimmerings of "stuff" that you see is just from commands that have cached the previous state of the disk parition into memory, most likely. What's out there now won't be likely to have recoverable data. That said, newfs doesn't actually wipe every byte of data so you could get some bits back, but it pretty much destroys every last piece of file system information. * (Unless you were somehow lucky enough to use different superblock offsets for the two filesystems. In that case it might be possible to recover a bit more.) My advice: never use newfs directly except under really unusual circumstances. If you need to do it with any regularity it's best to create an alias / shell script / op command to do it in the correct way so you aren't subject the effects of disastrous typos like this. Hope somebody else with serious wizardy knowledge has some better news for you. > > Christopher J. Umina -- Brian T. Schellenberger . . . . . . . bts@wnt.sas.com (work) Brian, the man from Babble-On . . . . bts@babbleon.org (personal) http://www.babbleon.org -------> Free Dmitry Sklyarov! (let him go home) <----------- http://www.eff.org http://www.programming-freedom.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message