public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: walt <w41ter@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: Duplicate identical Hard Disk
Date: Thu, 01 Apr 2010 19:47:09 -0700	[thread overview]
Message-ID: <hp3lka$vtd$1@dough.gmane.org> (raw)
In-Reply-To: <20100402014000.GD5637@syscon4.inet>

On 04/01/2010 06:40 PM, Joseph wrote:
> On 04/01/10 17:43, Mark Knecht wrote:
>> On Thu, Apr 1, 2010 at 4:02 PM, Paul Hartman
>> <paul.hartman+gentoo@gmail.com> wrote:
>>> On Thu, Apr 1, 2010 at 5:48 PM, Joseph <syscon780@gmail.com> wrote:
>>>> I have two identical HD in the box and want to duplicate sda to sdb;
>>>> sdb is not even partitioned.
>>>> I think I could do:
>>>> dd if=/dev/sda of=/dev/sdb
>>>> but I need to boot from CD isn't it?
>>>
>>> Yes, basically, boot from USB or CD and use ddrescue to clone it, then
>>> edit your fstab and I think you should be good.
>>>
>>> RAID1 would help if a drive physically dies, but if you had any
>>> filesystem corruption or anything you'd just have an identically
>>> corrupt copy on the second disk.
>>
>> A big part of my struggles over the last few days has been with mdadm
>> & RAID1. I'm learning that we don't want to send someone down that
>> path unless he has the right sort of disks. I'm having to deal with
>> returns and reordering due to this.
>>
>> People should be aware of what is really required to do RAID before
>> they get started so they don't duplicate my trials. I wasn't and I'm
>> paying for it. (Almost literally if I don't get the drives in the
>> mail!) ;-)
>>
>> Cheers,
>> Mark
>
> So what you are folks saying is to stay away from RAID-1, beside as Paul mention if I get any corruption and/or configuration (due to ebuild) with RAID I'll be screwed anyhow.
> So my best option is bootable CD and:
> dd if=/dev/sda of=/dev/sdb
>
> But I'm kind of confused as to how to edit the "sdb" second drive.
> I know I'll have to edit at lest: grub.conf and fstab
> But how?
>
> 1.) Both disk are bootable, (have a boot sector) if I disconnect first one sda, I think the second one will be recognize automatically as "sda" isn't it?
> 2.) If configure second drive after copying as "sdb" will it still boot if fist disk is disconnected?

In the old days you had to be careful about configuring each drive as either
'master' or 'slave'.  That was the old PATA drives.  Today, most drives are
SATA drives (a very good thing) so you don't have to worry about those silly
jumpers on the back of each drive.  No such thing as 'master' or 'slave' any
more :o)

So, assuming your drives are SATA drives, all you need to do is to unplug
the cable from one drive and the other drive will automatically be sda when
you reboot.  In that case you don't need to edit any files at all because the
drive that you plugged in is automatically sda, no matter which drive it is.

However, if you want to leave both cables connected and change your BIOS to
boot from 'sdb', you will need to edit some of the files on 'sdb', just as
you said, including all appropriate entries in fstab, and the 'root' device
in grub.conf (e.g. change hd0 to hd1), and use the 'rdev' utility to change
the 'root device' in your /boot/vmlinuz-2.6.NN file.  (man rdev).




  parent reply	other threads:[~2010-04-02  2:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-01 22:48 [gentoo-user] Duplicate identical Hard Disk Joseph
2010-04-01 23:02 ` Paul Hartman
2010-04-02  0:43   ` Mark Knecht
2010-04-02  1:40     ` Joseph
2010-04-02  2:09       ` Mark Knecht
2010-04-02 12:02         ` Dan Cowsill
2010-04-02 14:59           ` Mark Knecht
2010-04-02 16:23             ` Joseph
2010-04-02 16:37             ` [gentoo-user] " walt
2010-04-02 17:38               ` Mark Knecht
2010-04-02  2:47       ` walt [this message]
2010-04-02  8:42         ` Neil Bothwick
2010-04-02 15:46           ` Joseph
2010-04-02 16:47             ` walt
2010-04-02 18:01               ` Joseph

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='hp3lka$vtd$1@dough.gmane.org' \
    --to=w41ter@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox