Mailing List Archive


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

Re: [tlug] Replacing software-raided disks with dd, underlying-partitions-and-all: Will this work?



On Thu, Mar 25, 2010 at 23:01, Edmund Edgar <lists@example.com> wrote:
[...]
2) Replace the dead disk (sda) in server 1 with a new, bigger disk,
boot from a LiveCD and do:

dd if=/dev/sdb of=/dev/sda

I would personally suggest to simply copy the boot sector and partition table, and let the MD driver take care of replicating the data. It *should* be as easy as:

Copy the boot record and partition table
# dd if=/dev/sdb of=/dev/sda bs=512 count=1

Make sure the OS sees the new partitions on SDA by re-copying the partition tables (but this won't touch the boot sector, so, you should do both)
# sfdisk --dump /dev/sdb | sfdisk /dev/sda

Attach all the devices and wait for MD to do its job
# mdadm --manage /dev/md0 --add /dev/sda1
# mdadm --manage /dev/md1 --add /dev/sda7
...

Rather than DDing the whole disk. I don't know whether DDing the whole disk without doing the proper "mdadm" stuff works or not!

Good luck!

    Pier


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links