cloning a drive [was: war story]

William Park opengeometry-FFYn/CNdgSA at public.gmane.org
Wed Jul 27 06:57:33 UTC 2011


On Wed, Jul 27, 2011 at 01:05:29AM -0400, D. Hugh Redelmeier wrote:
> So I replaced the 1.5T Seagate 7200.11 drive with a 2T WD EARS drive.
> 
> I cloned the old disk onto the new drive with a dd (took about 9
> hours).
> 
> Then I remembered: EARS drives secretly have large sectors.  (Although
> the standard allows drives to declare larger-than-512 sectors, WD
> chose not to do this.  Dumb.)
> 
> So my cloned drive would have bad performance for the half of the
> partitions that were not aligned on an actual sector boundary.
> 
> Recent Linux distros align partitions on large boundaries to get around
> this problem, and a worse one for SSDs.
> 
> Anyway, wiped out the partition table on the new drive and used
> gparted to create larger but similar partitions.  I'm now dd'ing each
> partition to do the cloning.
> 
> I'll do an resize2fs to make each filesystem use its whole partition.
> 
> Then I'll boot from a grub disk to boot the system (grub is probably
> not bootable on the new disk) and then ask grub to re-install itself.
> 
> Is there a better way?

I've always been uncomfortable using 'dd', because I always needed to
reinstall lilo/grub afterwards.  If 'dd' copied faithfully, then I
wouldn't have to reinstall bootloader.  Also, newer filesystem may have
newer info or bugfix which older filesystem doesn't have.

How about 'mkfs' first, then 'cp -ax' ?
-- 
William
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list