Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: Cloning a system drive
Date: Sun, 07 Oct 2007 09:46:32
Message-Id: pan.2007.10.07.09.33.54@cox.net
In Reply to: Re: [gentoo-amd64] Re: Cloning a system drive by Peter Davoust
1 "Peter Davoust" <worldgnat@×××××.com> posted
2 7c08b4dd0710062149p7c7548aai7ba062ea4e17d2a3@××××××××××.com, excerpted
3 below, on Sun, 07 Oct 2007 00:49:11 -0400:
4
5 > This may be a little noobish, and it may have been said, but can't you
6 > just install the new drive, partition it identically to the original
7 > drive and then...
8 >
9 > dd if=/dev/hda1 of=/dev/hdb1
10 > dd if=/dev/hda2 of=/dev/hdb2
11 >
12 > so on and so forth until you've got everything copied? Or event just
13 >
14 > dd if=/dev/hda of=/dev/hdb
15 >
16 > Wouldn't that work?
17
18 It should, you're right.
19
20 However, that's a direct image straight across, fragmented files, even
21 filesystem corruption if it exists on the source, and it's nice to take
22 the opportunity to copy file-by file so everything gets defragmented and
23 all the file nodes get organized, if possible, particularly since few
24 Linux filesystems /have/ a defrag. Few need it very badly as long as a
25 decent amount of free-space is kept on each filesystem (50% is great, 25%
26 minimum for best operation, 10% and performance /does/ start to suffer),
27 but it's still nice to organize it, getting files all in one piece and
28 directories all located together, while one can.
29
30 Also, new drives are generally larger and it's nice to be able to take
31 the opportunity to reorganize the partitions.
32
33 All those are reasons I like my simple partition/mkfs/copy-the-files-over
34 method, but some folks don't seem to like that idea for whatever reason.
35 <shrug>
36
37 --
38 Duncan - List replies preferred. No HTML msgs.
39 "Every nonfree program has a lord, a master --
40 and if you use the program, he is your master." Richard Stallman
41
42 --
43 gentoo-amd64@g.o mailing list