From owner-freebsd-questions@FreeBSD.ORG Wed Feb 7 13:03:16 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1CE4D16A401 for ; Wed, 7 Feb 2007 13:03:16 +0000 (UTC) (envelope-from pieter@degoeje.nl) Received: from smtp.utwente.nl (smtp2.utsp.utwente.nl [130.89.2.9]) by mx1.freebsd.org (Postfix) with ESMTP id 96D2213C491 for ; Wed, 7 Feb 2007 13:03:15 +0000 (UTC) (envelope-from pieter@degoeje.nl) Received: from nox.student.utwente.nl (nox.student.utwente.nl [130.89.165.91]) by smtp.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id l17D38ox021190; Wed, 7 Feb 2007 14:03:08 +0100 From: Pieter de Goeje To: freebsd-questions@freebsd.org Date: Wed, 7 Feb 2007 14:03:08 +0100 User-Agent: KMail/1.9.5 References: <70063950702061806s281130c4labc112a018c2a19e@mail.gmail.com> In-Reply-To: <70063950702061806s281130c4labc112a018c2a19e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200702071403.08184.pieter@degoeje.nl> X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact helpdesk@ITBE.utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-UTwente-MailScanner-From: pieter@degoeje.nl X-Spam-Status: No Cc: Jerry McAllister , Marty Landman Subject: Re: recovery after power outage X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Feb 2007 13:03:16 -0000 On Wednesday 07 February 2007 03:06, Marty Landman wrote: > Jerry McAllister wrote: > > Well, do as it says - choose a shell and run fsck manually. > > Heh, for starters I assumed (always a bad thing) that fsck wasn't available > because I did a 'which fsck' and got 'which not found' as a response. But > fsck itself is there. > > > Just run /sbin/fsck /dev/ad1s1c. Actually that would be a somewhat > > unusual address - what they call a 'dangerously dedicated' disk. ad1s1c is a partition that contains the entire disk or slice in this case. Dangerously dedicated is when you have no slices: ad1a, ad1b, ad1c etc. You should _only_ fsck the individual partitions (ad0s1a), never the complete disk (ad0) or individual slices (ad0s1). You may risk destroying your filesystem(s) if you do so. Unless ofcourse you know what you're doing and you have placed a filesystem directly on either the disk or the slice it self. > > Can you explain or point me to more info on why that was a poor choice on > my part? To explain more this is a 250 GB hard drive which is the primary > slave and is mostly used as a data repository and shared via samba on my > home office lan. Your filesystem layout seems perfectly fine. > > > But I think fsck should be able to work through it. > > snip > > > It the manual fscks don't work, then you may have to try some > > extreme tactics to recover things on that partition or abandon > > snip > > > If you end up rebuilding the drive, then the next time make a > > FreeBSD slice and then make a partition within that slice to > > avoid that 'dangerously dedicated' config. > > I am not getting past this error with fsck. Get 16 lines saying: > > ad1: FAILURE - READ_DMA status=51 error=40 > LBA=xxx This is not an error of fsck but an error of the ata subsystem. It says that something went wrong while doing disk I/O. > > for xxx in [191..206] > > then a msg listing disk sectors that can't be read 128 through 143 and > finally: > > /dev/ad1s1c: NOT LABELED AS A BSD FILE SYSTEM (unused) Yes, ad1s1c is normally not used as a filesystem, so you would better not fsck it. > > If I can recover the disk which has about 60GB's used out of 250GB and lose > a few sectors it's really not a bad deal probably, but how do I go about > trying at this point? > > Also it won't reboot now, although I've run fsck complete including on > ads0. Do I have to edit /etc/fstab so ads1 isn't mounted to get a good > boot? Unfortunately /usr isn't getting mounted and I have not editor > available afaik. It should not be necessary to edit /etc/fstab. However after what you've described above it might be necessary to restore the partition table, mbr and slice table to get your system booting again. > > Marty If you have any more questions about the FreeBSD filesystem, please don't hesitate to ask. Regards, Pieter de Goeje