From owner-freebsd-questions@FreeBSD.ORG Mon Apr 3 14:17:49 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDC3D16A401 for ; Mon, 3 Apr 2006 14:17:49 +0000 (UTC) (envelope-from gayn.winters@bristolsystems.com) Received: from fed1rmmtao04.cox.net (fed1rmmtao04.cox.net [68.230.241.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id D58F843D66 for ; Mon, 3 Apr 2006 14:17:46 +0000 (GMT) (envelope-from gayn.winters@bristolsystems.com) Received: from workdog ([68.5.182.86]) by fed1rmmtao04.cox.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20060403141746.ZNOV17690.fed1rmmtao04.cox.net@workdog>; Mon, 3 Apr 2006 10:17:46 -0400 From: "Gayn Winters" To: "'Edwin D. Vinas'" , Date: Mon, 3 Apr 2006 07:16:13 -0700 Organization: Bristol Systems Inc. Message-ID: <042501c65729$2a084ae0$6501a8c0@workdog> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 In-Reply-To: <36f5bbba0604022243x6bb2fc56l5037df386a737f4a@mail.gmail.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Cc: Subject: RE: How to recover /usr and /home directory X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gayn.winters@bristolsystems.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Apr 2006 14:17:50 -0000 > [mailto:owner-freebsd-questions@freebsd.org] On Behalf Of > Edwin D. Vinas > Sent: Sunday, April 02, 2006 10:43 PM > To: freebsd-questions@freebsd.org > Subject: How to recover /usr and /home directory > > > Hi, > > I have a previous 40GB HDD which crashed during power outage > and now no > longer repairable. Before I installed a new HDD, I can still see the > contents of that defective hard disk when booting from a > single user mode. > Now, I set it up as slave and installed a new FreeBSD on the > new master HDD. > But then, when I mounted the old hard disk, I can no longer > see any content > in my /usr and /home directories. These directories are the > ones with "hard > error reading" blocks which made FreeBSD not to continue > booting due to > unending and irrepariable fsck commands on this filesystem. > All my website > files and programs are on that old HDD especially in the /usr > directory. > Does the new setup master/slave have somehow caused those > files hidden? How > do I mount even the fragmented blocks? Any suggestion on how > I can recover > my files? Why is FreeBSD so susceptible to fragmentations > when suddenly > turned off or when there is a power outage? > > This is what I don't like with FreeBSD; it does not care too > much on data! > Even the fsck doesn't tell you that the hard disk is no > longer usable as it > will still prompt you to do fsck over and over again. And > now, my /usr and > /home suddenly disappeared when mounted. I can still see these two > directories last week but now it seems they're gone. > > > Thanks. > Edwin I assume your old /usr and /home are (or were) partitions. Check /etc/fstab and your disklabels for accuracy now. If bsdlabel can't find the partitions on your old disk, then you can try using /usr/ports/sysutils/scan_ffs to rebuild your disklabels if necessary. You'll then need to rerun fsck to see what you can salvage. Regarding fsck itself, I suppose one could add intelligence for fsck to issue ever increasingly stern and obnoxious warnings to backup your data ... Good luck on your recovery effort, -gayn Bristol Systems Inc. 714/532-6776 www.bristolsystems.com