SCIENTIFIC-LINUX-USERS Archives

June 2008

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Samuel Halicke <[log in to unmask]>
Reply To:
Samuel Halicke <[log in to unmask]>
Date:
Thu, 19 Jun 2008 13:10:31 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (33 lines)
On Jun 19, 2008, at 11:50 AM, Timmy wrote:

> [snip]
>
> So, I face a problem:  How to REBUILD / CLONE sda to sdb with Linux  
> command mdadm??  :((
>
>
> Timmy

The "simplest" route is to just use dd(1):

dd if=/dev/sda of=/dev/sdb bs=1M conv=notrunc,noerror,sync 2>&1 | tee / 
tmp/dd-errors.log

This will create an exact, bootable clone, including partition tables  
and UUID. It may take a long time, and there is no progress indicator  
with dd, but it works. If there are errors, you can check the file tee  
writes. See the dd manpage for more details.

Other alternatives include partimage, available here: http://www.partimage.org/Main_Page 
  -- and also, the mdadm command itself -- the short version: set up  
RAID 1, partitions to Linux raid autodetect, put the first drive (your  
everyday drive) as the first in the set and the second as the mirror.  
The md driver should automatically rebuild the mirror for you. Just  
make sure you partition the disks the same way. There's plenty of  
information on the web about working with md/mdadm.

--
Samuel Halicke		[log in to unmask]
FNAL/CD/SF/FEF		FCC/252/U
(T): 630.840.4308	(P): 630.266.0042

ATOM RSS1 RSS2