[TriLUG] HDD Migration

Brian Weaver brianweaver at nc.rr.com
Thu Jan 6 12:50:26 EST 2005


Keep in mind that any "copy" command you use is like to get rid of any
"sparce" space in the files. If you use cp you might want to use the
'--sparse' option. The rsync command also has some options for handing
sparse files as well.

The dd command automatically handles sparse files because it simply
copies the disk blocks, but as Shane pointed out you get all the
fragmentation from the original disc too.

-Weave

Marty Ferguson [marty.ferguson at fergusonlx.nextelbroadband.net] wrote on Wed, Jan 05, 2005 at 04:33:32PM -0500:
> 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)
> >
> -- 
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
> TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc

-- 
It is by caffeine alone I set my mind in motion. It is by the juice of
the coffee bean that thoughts acquire speed, the lips acquire stains,
stains become a warning. It is by caffeine alone I set my mind in motion.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://www.trilug.org/pipermail/trilug/attachments/20050106/391261f3/attachment.pgp>


More information about the TriLUG mailing list