From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1NxWs6-0007Uy-77 for garchives@archives.gentoo.org; Fri, 02 Apr 2010 02:44:34 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 12EFEE078A; Fri, 2 Apr 2010 02:43:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5B5A7E078A for ; Fri, 2 Apr 2010 02:43:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id B6EEE1B4041 for ; Fri, 2 Apr 2010 02:43:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Score: -2.985 X-Spam-Level: X-Spam-Status: No, score=-2.985 required=5.5 tests=[AWL=-0.386, BAYES_00=-2.599] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IO7Vg8aN9Oua for ; Fri, 2 Apr 2010 02:43:41 +0000 (UTC) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by smtp.gentoo.org (Postfix) with ESMTP id A605B1B4003 for ; Fri, 2 Apr 2010 02:43:40 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NxWr7-0003k7-TT for gentoo-user@gentoo.org; Fri, 02 Apr 2010 04:43:33 +0200 Received: from adsl-69-234-177-132.dsl.irvnca.pacbell.net ([69.234.177.132]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 02 Apr 2010 04:43:33 +0200 Received: from w41ter by adsl-69-234-177-132.dsl.irvnca.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 02 Apr 2010 04:43:33 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: walt Subject: [gentoo-user] Re: Duplicate identical Hard Disk Date: Thu, 01 Apr 2010 19:47:09 -0700 Message-ID: References: <20100401224820.GA5637@syscon4.inet> <20100402014000.GD5637@syscon4.inet> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: adsl-69-234-177-132.dsl.irvnca.pacbell.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a4pre) Gecko/20100401 Thunderbird/3.2a1pre In-Reply-To: <20100402014000.GD5637@syscon4.inet> X-Archives-Salt: ce7236b8-747f-4369-aa41-c6ca6e3949df X-Archives-Hash: 3db26e5f68cee22853c1afd4587474f3 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 >> wrote: >>> On Thu, Apr 1, 2010 at 5:48 PM, Joseph 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).