[CentOS] (no subject) software Raid as backup disk

Wed Feb 21 19:37:40 UTC 2007
John Allen <john.allen at dublinux.net>

dan1 wrote:
>> Hello,
>>
>> I would like to replace one of the disks in a raid 1 array (software 
>> raid) in centos 4.4 for the purpose of >saving the removed drive as a 
>> backup of the system.  Replace it with a new disk and have the raod 
>> >resync.  That way the removed disk can be used to restore the system 
>> to that point in time if something >dramatic occured.
>>
>> I have a number of questions, I can’t find the answers to and I don't 
>> have a system I can play with to see >how the software behaves:
>>
>> 1) Do I need to partition the replacement drive or will the system do 
>> it after reboot?
>>
>>
>> 2) Should I break the raid before replacement or just shutdown, 
>> replace and reboot?
>>
>>
>> 3) I have also read that acronis 10 rescue CD can be booted and take 
>> a system image that way but I >have not tried that yet..
>>
>> In general, are these approaches a good idea for generating an 
>> offsite image backup??
>>
>> Any help or input would be appreciated.
>>
>> Thank you,
>>
>> -ed-
>
>
> Hello, Ed.
> We will most probably have to talk together. I have the exact same 
> purpose than you have. I am working like this since several years and 
> it is absolutely great (with mdadm software raid 1).
> I do even go further: I synchronise remotely a complete system on a 
> local software raid system with rsync and then I can boot up the 
> backuped system whenever I want, and it will just be a working and 
> bootable backup mirror, on another system. But it is not always so 
> easy, problems do arise doing this, and I am working on it.
>
> To answer your questions:
>
> 1) You need to fdisk your partitions yourself on the disk, exactly the 
> same way the source partitions have been done, it is not done 
> automatically. Once this is done, you need to add the partitions to 
> the working md array. It takes time to synchronise everything. All 
> depends on the speed of your disk transfer, but if you have about 
> 50Mbytes/sec, you need more than a hour for a 200 Gbytes array.
>
Use sfdisk to partition the new disk

eg.
sfdisk -l /dev/hda | sfdisk /dev/hdb

[snipped]