Gentoo Archives: gentoo-user

From: Mark Knecht <markknecht@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Duplicate identical Hard Disk
Date: Fri, 02 Apr 2010 02:09:59
Message-Id: t2y5bdc1c8b1004011909safb81de5ub910fe0ca1a2c4a1@mail.gmail.com
In Reply to: Re: [gentoo-user] Duplicate identical Hard Disk by Joseph
1 On Thu, Apr 1, 2010 at 6:40 PM, Joseph <syscon780@×××××.com> wrote:
2 > On 04/01/10 17:43, Mark Knecht wrote:
3 >>
4 >> On Thu, Apr 1, 2010 at 4:02 PM, Paul Hartman
5 >> <paul.hartman+gentoo@×××××.com> wrote:
6 >>>
7 >>> On Thu, Apr 1, 2010 at 5:48 PM, Joseph <syscon780@×××××.com> wrote:
8 >>>>
9 >>>> I have two identical HD in the box and want to duplicate sda to sdb;
10 >>>> sdb is not even partitioned.
11 >>>> I think I could do:
12 >>>> dd if=/dev/sda of=/dev/sdb
13 >>>> but I need to boot from CD isn't it?
14 >>>
15 >>> Yes, basically, boot from USB or CD and use ddrescue to clone it, then
16 >>> edit your fstab and I think you should be good.
17 >>>
18 >>> RAID1 would help if a drive physically dies, but if you had any
19 >>> filesystem corruption or anything you'd just have an identically
20 >>> corrupt copy on the second disk.
21 >>
22 >> A big part of my struggles over the last few days has been with mdadm
23 >> & RAID1. I'm learning that we don't want to send someone down that
24 >> path unless he has the right sort of disks. I'm having to deal with
25 >> returns and reordering due to this.
26 >>
27 >> People should be aware of what is really required to do RAID before
28 >> they get started so they don't duplicate my trials. I wasn't and I'm
29 >> paying for it. (Almost literally if I don't get the drives in the
30 >> mail!) ;-)
31 >>
32 >> Cheers,
33 >> Mark
34 >
35 > So what you are folks saying is to stay away from RAID-1, beside as Paul
36 > mention if I get any corruption and/or configuration (due to ebuild) with
37 > RAID I'll be screwed anyhow.
38 > So my best option is bootable CD and:
39 > dd if=/dev/sda of=/dev/sdb
40 >
41 > But I'm kind of confused as to how to edit the "sdb" second drive.
42 > I know I'll have to edit at lest: grub.conf and fstab
43 > But how?
44 >
45 > 1.) Both disk are bootable, (have a boot sector) if I disconnect first one
46 > sda, I think the second one will be recognize automatically as "sda" isn't
47 > it?
48 > 2.) If configure second drive after copying as "sdb" will it still boot if
49 > fist disk is disconnected?
50 > --
51 > Joseph
52 >
53 >
54
55 With only 2 disks I personally think you're on the right path. With 3
56 disks I'm personally planning on RAID1 using 3 copies.
57
58 If you disconnect the first disk (current sda) then most likely the
59 original second disk (old sdb) becomes the new first disk. (sda) In
60 that case no edits are required. However if you make them both
61 bootable then assuming your BIOS supports it you can tell it to boot
62 from the second disk. If you want the second disk booting to use the
63 second disk's copy of Gentoo then you need to edit things to use sdb,
64 not sda. that's probably overly complicated for what you are trying to
65 do. I say make the copy, then disconnect the first drive physically
66 and give it a try.
67
68 This all presumes that you comtinue down this path with by hand copies.
69
70 My comment about RAID was that I am learning the hard (alas expensive)
71 way that not all disks can actually do RAID, at least not Linux
72 software RAID, and really be usable.
73
74 Cheers,
75 Mark

Replies

Subject Author
Re: [gentoo-user] Duplicate identical Hard Disk Dan Cowsill <danthehat@×××××.com>