Re: duplicate software raid with dd?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il giorno gio, 08/06/2006 alle 19.28 -0400, Neal Becker ha scritto:
> I have 2 drives setup with lvm.  They are basically raid 0 (striped).  One
> is dying.
> 
> I wonder if could duplicate the partitions to a new drive using dd.  I need
> to copy the lvm identity as well.  I'm guessing that is in the boot block
> of the drive?
> 
> So if I have sda, with partitions sda1, sda2, then if I use dd to
> copy /dev/sda, /dev/sda1, /dev/sda2, then swap the drives and I'm good?
You must pay attention to some things.
For first, sda1 and sda2 are partitions.
sda is the entire disk
So, if you copy sda, automatically copy the boot record and partitions
definitions, and data of sda1 and sda2.
You copy also eventual free space.
So if you do not have free unpartitioned space, and you have an equal or
bigger disk on which copy data, you can use 
dd if=/dev/sda

otherwise you can use sda1 and sda2

LVM Info are in partitions and not in disks.

If you have LVM alreay configured, you can use also the /dev/vg/lv that
is similar to partitions.
So if you can reconfigure LVM on the other disc, you can copy only info
about LV and not entire disk.
I think it's best in your case, because of raid 0 used between sda1 and
sda2.
It's not usefull and performance is not good.

About performance you have to be care about dd that is like a sequential
block read.
So you can choose a blocksize in dd options that is better for you and
it depends on disk types, controllers (USB 1 or 2) and free RAM.

Bye
 Ambrogio


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux