[linux-lvm] waah waah - disaster recovery

Paul Pianta pantz at lqt.ca
Fri Feb 11 20:37:39 UTC 2005


On Fri, 2005-02-11 at 19:43 +0000, Rosenstrauch, David wrote:
> 
> > Does anyone have any ideas on how I might be able to restore/mount
> > the /dev/md2 partition - even if it is just enough to copy the data
> > elsewhere??
> > 
> > thanks
> > 
> > pantz
> 
> Basically just dd the data from the partition on the bad disk to the partition
> on the new disk (e.g., "dd if=/dev/hda2 of=/dev/hdb3").  Theoretically, you've
> now got a copy of the original partition, and theoretically LVM should be able
> to use it just like the old one.  Do fsck's on all the relevant partitions
> and/or LV's once you're done with this, as there could be glitches that
> occurred.

Wow - thanks for the quick responses guys! Wouldn't have anything to do
with mooching about on a Friday afternoon, catching up on emails coz the
work you have to do can wait until Monday ;)

I am attempting a bit of a combination of the two suggestions.

Editing /etc/fstab to not mount the dodgy partition got me to boot into
the system ok - but running fsck gives LOTS of bad looking errors and it
just loops on the same bad sector and I have to reboot the machine to
get out of it.

I am now dd'ing the dodgy partition to a new drive that I installed in
the machine.

My question now is a bit off topic but what would be the recommended way
of dd'ing my corrupt /dev/hdc5 partition to the new /dev/hda drive. 

- Should I have created a partition on /dev/hda exactly the same size
as /dev/hdc5 and then done a 'dd if=/dev/hdc5 of=/dev/hda1'?

- Will 'dd if=/dev/hdc5 of=/dev/hda' give me something mountable later?

- Should I have dd'ed the partition to a file in a partition /dev/hda1
on the new disk and loop mounted it after?

Sorry for being OT but I am just interested ...

thanks

pantz






More information about the linux-lvm mailing list