[TriLUG] HDD Migration

Marty Ferguson marty.ferguson at fergusonlx.nextelbroadband.net
Wed Jan 5 16:33:32 EST 2005


I still like Lance's solution, but for 1 alteration.
Being lazy, I just use
# cp -a
to create a recursive archive copy of the orginial filesystem.
The good thing (compared to dd) is that, since no *nix has a
"defrag" you end up with one big whoppin chunk-o freespace using
cp -a.  dd will duplicate the fragmentation.  The contiguous-ness
probably goes the same for dump | restore into a brand-new mkfs'd
ext3, but I never compared.

M

Every time is too many I would care to mention...
or count on both hands.


Shane O'Donnell wrote:
> Maybe it was because I missed the resize2fs step in the instructions, but I
> can't tell you how many times I've screwed myself using dd to copy drives
> over.
> 
> Most new HDs come with a manufacturer's utility to do this and so far, it's
> worked for me every time.
> 
> Keep in mind that:
> 
>  - "every time" is about 3-4 times 
>  - "every time" includes IDE-only
>  - "every time" usually involves only "home user" filesystems (e.g., fat,
> ext2, etc.)
> 
> Shane "short on experience, long on advice" O.
> 
> -----Original Message-----
> From: trilug-bounces at trilug.org [mailto:trilug-bounces at trilug.org] On Behalf
> Of erik at underhanded.org
> Sent: Wednesday, January 05, 2005 3:23 PM
> To: Triangle Linux Users Group discussion list
> Subject: Re: [TriLUG] HDD Migration
> 
> On Wed, Jan 05, 2005 at 02:19:00PM -0500, Jason Browne wrote:
> 
>>I am trying to get some tips on migrating an install of Linux to another,
>>bigger HDD?  It is a straight 1 HDD to 1 HDD change...  I know I could use
> 
> dd
> 
>>, but I am trying to see if there is a better way.
> 
> 
> dd has worked fine for me many times, as long as you do resize2fs after
> the dump.
> 
> If you recreate your top level directories (/tmp /bin /sbin etc), you
> can use 'cp -a' for most of them with good results.  Don't do it for
> lost+found, proc, dev, and sys(I think sys was special at least) though.
> 
> For dev, just copy over MAKEDEV and any other non device files, along
> with all folders.  Then run MAKEDEV in the new /dev  This is all off the 
> top of my head, and probably quite a bit mroe work then a pure copy, but 
> it went fairly quickly in the few times I did it, and is a good way to 
> make sure everything copied over sanely.
> 
> Or, there's ways of just using tar or cpio to do similiar in one step.
> 
> But as I said, dd is easy, and hasn't screwed up in my experience.  Just
> make sure you shut down as many things as possible to keep your
> filesystem from being too much of a moving target. (log files
> especially)
> 



More information about the TriLUG mailing list