[GLLUG] Suggestions on hardware migration?
Matt Graham
danceswithcrows at usa.net
Tue Jul 12 15:55:24 EDT 2005
On Tuesday 12 July 2005 15:19, after a long battle with technology,
STeve Andre' wrote:
> On Tuesday 12 July 2005 13:39, Matt Graham wrote:
> > On Tuesday 12 July 2005 12:51, after a long battle with technology,
> > Lachniet, Mark wrote:
> > > So what I was thinking is to just do a dd copy (e.g. 'dd
> > > if=/dev/hda of=/dev/hdc bs=512') to just move the whole thing
> > > over intact
> > Nope. For one thing, you never use bs=512 for moving large amounts
> > of data. For another thing, dd is the worst backup method in
> > existence. You should hook both disks up to the same machine,
> > cfdisk the new disk, mke2fs (or mkreiserfs) the partitions on the
> > new disk, then cp -a each filesystem.
> Um, dd is the fastest possible way to clone disks,
dd copies *everything*, including the parts of the disk that aren't
actually being used. If your filesystems have significant chunks of
empty space on them, dd does more I/O than you need. I/O is slow.
> But dd can take raw devices and scoop up large quantities of disk,
> which really is the fastest way to *clone* a disk.
There are many gotchas with dd. Since "disk geometry" is still
important on the x86, and 2 otherwise identical disks can report
differing disk geometries depending on jumper positions and the phase
of the moon, it's not as reliable as filesystem-based methods.
> Doing a 'cp -a' won't keep permissions, unless -a implies something
> different on Linux than BSD systems.
Yes. Linux uses GNU cp, where -a is short for --archive and is
equivalent to -dpPR in non-GNU cp.
> When I want to move all the files from one partition to another I use
> tar:
This approach is really a hangover from the days when cp didn't always
handle device files, symlinks, sockets, FIFOs, and so forth properly.
There was recently a col.misc thread on the tar vs. cp thing;
http://groups.google.com/advanced_group_search , Message-ID
1120910252.012174.291690 at g44g2000cwa.googlegroups.com for what several
people had to say on the subject. GNU cp handles special files
properly; BSD cp should do that by now but you never know what those
crazy BSDers have been smoking :-) .
> dd on the other hand is the best possible tool to clone two exactly
> similar disks. For that purpose nothing can be faster.
Depends on things. If you have an 80G disk with 78G of files on it,
cloning the disk with dd may actually be faster than using
filesystem-based methods. If you have an 80G disk with 40G of files on
it, cloning via filesystem-based methods will be almost twice as fast
as using dd.
--
"Assembly of God". Haven't you ever wondered what goes on in a place
like that? What kinds of parts does God need? --Slacquer
There is no Darkness in Eternity/But only Light too dim for us to see
More information about the linux-user
mailing list