Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Apr 2006 07:16:13 -0700
From:      "Gayn Winters" <gayn.winters@bristolsystems.com>
To:        "'Edwin D. Vinas'" <xmisoy@gmail.com>, <freebsd-questions@freebsd.org>
Subject:   RE: How to recover /usr and /home directory
Message-ID:  <042501c65729$2a084ae0$6501a8c0@workdog>
In-Reply-To: <36f5bbba0604022243x6bb2fc56l5037df386a737f4a@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> [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 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?042501c65729$2a084ae0$6501a8c0>