[mythtv-users] How do I "clone" the HD on a FE?

Marc drayson at net1plus.com
Sat Oct 13 04:05:14 UTC 2007


On 10/12/07, Steve MacLaren <scram69 at gmail.com> wrote:
>
>
> On 10/11/07, John Drescher <drescherjm at gmail.com> wrote:
> > > Create a raid 1 array (using mdadm) with a missing disk then copy the
> > > data using the rsync command above. Then modify your system to boot
> > > off the raid1 array. Then when all this works add the  original disk
> > > to the raid array using mdadm.
> > >
> > The original step should have said "create the raid 1 array using the
> > new disk and a missing disk using mdadm"
> >
> > John
> >
>
>
> Ok, I think I understand.  However, I currently have a 40GB drive that
> contains the system, and an 80GB drive I'd like to add.  Can I create two
> 40GB partitions on the 80GB drive and use just one of them as the new
"disk"
> for the Raid-1?
>
Yes, you can. Linux raid will work with partitions or whole disks or
even sit on top of lvm mounts if you want.


BTW, The guide on the link from Marc is pretty good and it fills in
the details that I did not. There is one difference between the guide
and what I do is that I boot with the raid 1array in degraded mode
(containing only the new drive) to make sure everything is well before
I overwrite the old drive. I find this a safer approach. About 1 year
ago I did this and had my myth system running in this mode for several
months before I finally added the old drive to the array.

John
_______________________________________________

John,

The guide tells you to do this as well.
Modify /boot/grub/menu.lst and /etc/fstab to make /dev/md0 the root
partition. 
Reboot. 
You should now be running with a degraded RAID on /dev/sdb1: 

Verify the RAID is mounted: 
# df
Verify the RAID status: 
# cat /proc/mdstat
Warning: The following step destroys data on the old drive. Make sure the
new system is behaving properly.
Copy the partition map from the new drive to the old drive: 
# sfdisk -d /dev/sdb | sfdisk /dev/sda
Add the partitions to the live RAID: 
# mdadm /dev/md0 -a /dev/sda1
You can watch the RAID rebuild with: 

# watch -n1 'cat /proc/mdstat'

Marc




More information about the mythtv-users mailing list