Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Sep 1997 22:02:44 -0700 (PDT)
From:      Doug White <dwhite@gdi.uoregon.edu>
To:        Nick Johnson <spatula@gulf.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Crash recovery
Message-ID:  <Pine.BSF.3.96.970905215916.7395Q-100000@localhost>
In-Reply-To: <Pine.BSI.3.96.970904211112.13517C-100000@pompano.pcola.gulf.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 4 Sep 1997, Nick Johnson wrote:

> I had a disk crash, but only lost 200 or so sectors.  I am limping this
> drive along until my replacement disk comes.  The new disk is of the same
> type and configuration.
> 
> The drive in question has an evil operating system on the first partition
> and FreeBSD on the second.
> 
> Here is my plan:
> 
> dd if=/dev/wd0 of=/dev/wd1 bs=128k
> bad144 -s /dev/wd1s2

No, this isn't a great idea IMHO.  You'd be better to disklabel & newfs
the new disk, then use `tar cf - * | tar xf -' or dump/restore to copy the
files. Tar will preserve the permissions.  Check the tar man page though
before beginning.

dd'ing the filesystem is asking for trouble; it seems like a horrible hack
and bound to fail because of simple errors or filesystem/disk
inconsistencies.

> 1) dd may not copy over the partition information (not a big deal, as I
> can always partition the new drive exactly like the old one)
> 2) bad144... does anyone know if it will replace the old bad sector table?
> dd will most likely copy over the bad sector table, which will be invalid
> for the new disk.

Well, don't use dd and you won't have that problem.

> If anyone can shed some light on these issues, please drop me a note.

If this is a Western Digital drive, see Western Digital's site for a 
program to help out with bad sector remapping.

Doug White                              | University of Oregon  
Internet:  dwhite@resnet.uoregon.edu    | Residence Networking Assistant
http://gladstone.uoregon.edu/~dwhite    | Computer Science Major
Spam routed to /dev/null by Procmail    | Death to Cyberpromo




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.970905215916.7395Q-100000>