public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Duplicate identical Hard Disk
@ 2010-04-01 22:48 Joseph
  2010-04-01 23:02 ` Paul Hartman
  0 siblings, 1 reply; 15+ messages in thread
From: Joseph @ 2010-04-01 22:48 UTC (permalink / raw
  To: gentoo-user

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?

I would like the second disk to function as an identical bootable backup (just in case something will malfunction after emerge :-/)
So I would normally boot from sda but have an ability to boot from sdb, just in case)
So after duplicating the disk I would need to modify the grub, fstab on sdb hard disk.

I'm not even sure if it will do what I need.  What are my other options RAID-1?
RAID-1 will not protect me if something happens after emerge. 

-- 
Joseph



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Duplicate identical Hard Disk
  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
  0 siblings, 1 reply; 15+ messages in thread
From: Paul Hartman @ 2010-04-01 23:02 UTC (permalink / raw
  To: gentoo-user

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.



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Duplicate identical Hard Disk
  2010-04-01 23:02 ` Paul Hartman
@ 2010-04-02  0:43   ` Mark Knecht
  2010-04-02  1:40     ` Joseph
  0 siblings, 1 reply; 15+ messages in thread
From: Mark Knecht @ 2010-04-02  0:43 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Duplicate identical Hard Disk
  2010-04-02  0:43   ` Mark Knecht
@ 2010-04-02  1:40     ` Joseph
  2010-04-02  2:09       ` Mark Knecht
  2010-04-02  2:47       ` walt
  0 siblings, 2 replies; 15+ messages in thread
From: Joseph @ 2010-04-02  1:40 UTC (permalink / raw
  To: gentoo-user

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? 

-- 
Joseph



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Duplicate identical Hard Disk
  2010-04-02  1:40     ` Joseph
@ 2010-04-02  2:09       ` Mark Knecht
  2010-04-02 12:02         ` Dan Cowsill
  2010-04-02  2:47       ` walt
  1 sibling, 1 reply; 15+ messages in thread
From: Mark Knecht @ 2010-04-02  2:09 UTC (permalink / raw
  To: gentoo-user

On Thu, Apr 1, 2010 at 6:40 PM, Joseph <syscon780@gmail.com> 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?
> --
> Joseph
>
>

With only 2 disks I personally think you're on the right path. With 3
disks I'm personally planning on RAID1 using 3 copies.

If you disconnect the first disk (current sda) then most likely the
original second disk (old sdb) becomes the new first disk. (sda) In
that case no edits are required. However if you make them both
bootable then assuming your BIOS supports it you can tell it to boot
from the second disk. If you want the second disk booting to use the
second disk's copy of Gentoo then you need to edit things to use sdb,
not sda. that's probably overly complicated for what you are trying to
do. I say make the copy, then disconnect the first drive physically
and give it a try.

This all presumes that you comtinue down this path with by hand copies.

My comment about RAID was that I am learning the hard (alas expensive)
way that not all disks can actually do RAID, at least not Linux
software RAID, and really be usable.

Cheers,
Mark



^ permalink raw reply	[flat|nested] 15+ messages in thread

* [gentoo-user] Re: Duplicate identical Hard Disk
  2010-04-02  1:40     ` Joseph
  2010-04-02  2:09       ` Mark Knecht
@ 2010-04-02  2:47       ` walt
  2010-04-02  8:42         ` Neil Bothwick
  1 sibling, 1 reply; 15+ messages in thread
From: walt @ 2010-04-02  2:47 UTC (permalink / raw
  To: gentoo-user

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).




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Re: Duplicate identical Hard Disk
  2010-04-02  2:47       ` walt
@ 2010-04-02  8:42         ` Neil Bothwick
  2010-04-02 15:46           ` Joseph
  0 siblings, 1 reply; 15+ messages in thread
From: Neil Bothwick @ 2010-04-02  8:42 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 480 bytes --]

On Thu, 01 Apr 2010 19:47:09 -0700, walt wrote:

> 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',

Check your BIOS first, some allow you to disable individual SATA ports,
so you can disconnect the drive without pulling cables.


-- 
Neil Bothwick

To most people solutions mean finding the answers. But to chemists
solutions are things that are still all mixed up.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Duplicate identical Hard Disk
  2010-04-02  2:09       ` Mark Knecht
@ 2010-04-02 12:02         ` Dan Cowsill
  2010-04-02 14:59           ` Mark Knecht
  0 siblings, 1 reply; 15+ messages in thread
From: Dan Cowsill @ 2010-04-02 12:02 UTC (permalink / raw
  To: gentoo-user

On Thu, Apr 1, 2010 at 10:09 PM, Mark Knecht <markknecht@gmail.com> wrote:
>
> With only 2 disks I personally think you're on the right path. With 3
> disks I'm personally planning on RAID1 using 3 copies.
> ...
> My comment about RAID was that I am learning the hard (alas expensive)
> way that not all disks can actually do RAID, at least not Linux
> software RAID, and really be usable.
>
>

From what I understand of software RAID in linux, it works on block
devices, not disks.  This means if some endeavoring soul was brave
enough to RAID even partitions on a device, it would work as normal.
Perhaps you mean that not all properly functioning disks can do RAID?
What sort of trouble are you running into?

I've successfully deployed both RAID1 and RAID5 on my home media
server for quite some time now.  While the initial time investment in
reading documentation was considerable, since that time I've had no
cause for trouble.  I keep smartmontools looking at the array member
disks and regularly read through monthly smart reports of my drives.

Also, if you have three disks, why not go for RAID5?  It is much
quicker and I believe you'll end up with more space.  It is a bit of a
pain to get mdadm to convert your RAID1 to a RAID5, but it is doable.

DC



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Duplicate identical Hard Disk
  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
  0 siblings, 2 replies; 15+ messages in thread
From: Mark Knecht @ 2010-04-02 14:59 UTC (permalink / raw
  To: gentoo-user

On Fri, Apr 2, 2010 at 5:02 AM, Dan Cowsill <danthehat@gmail.com> wrote:
> On Thu, Apr 1, 2010 at 10:09 PM, Mark Knecht <markknecht@gmail.com> wrote:
>>
>> With only 2 disks I personally think you're on the right path. With 3
>> disks I'm personally planning on RAID1 using 3 copies.
>> ...
>> My comment about RAID was that I am learning the hard (alas expensive)
>> way that not all disks can actually do RAID, at least not Linux
>> software RAID, and really be usable.
>>
>>
>
> From what I understand of software RAID in linux, it works on block
> devices, not disks.  This means if some endeavoring soul was brave
> enough to RAID even partitions on a device, it would work as normal.
> Perhaps you mean that not all properly functioning disks can do RAID?
> What sort of trouble are you running into?
>
> I've successfully deployed both RAID1 and RAID5 on my home media
> server for quite some time now.  While the initial time investment in
> reading documentation was considerable, since that time I've had no
> cause for trouble.  I keep smartmontools looking at the array member
> disks and regularly read through monthly smart reports of my drives.
>
> Also, if you have three disks, why not go for RAID5?  It is much
> quicker and I believe you'll end up with more space.  It is a bit of a
> pain to get mdadm to convert your RAID1 to a RAID5, but it is doable.
>
> DC

Good questions:

1) Yes, you can RAID partitions of drives. That's what I'm doing. You
can look at the Gentoo RAID/LVM Install guide to see an example of
using RAID0 and RAID1 on a single drive.

http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml

2) I'm certainly not suggesting RAID doesn't work. It's just not
working for me, either due to new motherboard hardware or due to the
drives themselves. I'm currently betting it's the drives. The
background info, without getting too deeply into it, is that if the
drive supports SMART and SMART is enabled, then when doing RAID you
need guaranteed Time Limited Error Recovery (TLER) to ensure (I think)
that SMART works doesn't get in the way of the drive responding in the
appropriate amount of time or else the drive will fall out of the RAID
array. Turns out the WD  (according to different mailing list and
forums I've been looking at) has removed TLER on almost all of their
Green drive and some/many/most of the Blue and Black series. They are
supporting this in the RE drives though of which I've obtained two.
They are smaller and more expensive, but built for RAID, so I'm going
to try them out next.

http://en.wikipedia.org/wiki/Time-Limited_Error_Recovery

3) As I understand the subject you are correct about size and speed,
but a 3-disk RAID5 array can stand 1 disk failing whereas a 3-disk
RAID1 array can stand 2 disks failing. For this app (MythTV and seldom
used backup server) I don't need speed and size isn't a huge issue so
I chose 3-disk RAID1. (Note that the HTPC case I'm using supports up
to 3 drives only.) Because multiple drives purchased at the same time
generally come from the same production lot there's an additional
danger that if one drive fails then one more (or all) could fail at
the same time so I'm protecting myself against that. Again, this is
very specific to my current needs which is really to back up another
machine which will be RAID0 as it needs more disk I/O speed to support
12 processor cores.

As always, I'm certainly interested in info and ideas on this subject,
most especially now when I'm buying and building.

Cheers,
Mark



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Re: Duplicate identical Hard Disk
  2010-04-02  8:42         ` Neil Bothwick
@ 2010-04-02 15:46           ` Joseph
  2010-04-02 16:47             ` walt
  0 siblings, 1 reply; 15+ messages in thread
From: Joseph @ 2010-04-02 15:46 UTC (permalink / raw
  To: gentoo-user

On 04/02/10 09:42, Neil Bothwick wrote:
>On Thu, 01 Apr 2010 19:47:09 -0700, walt wrote:
>
>> 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',
>
>Check your BIOS first, some allow you to disable individual SATA ports,
>so you can disconnect the drive without pulling cables.
>
>
>--
>Neil Bothwick

Good suggestion, but I'm not sure my motherboard BIOS supports it.
I have GA-MA790GP-DS4H motherboard, reading from the manual:

it has OnChip SATA Type (SATA2_0 ~ SATA2_3 connectors)
Mode: Native IDE
RAID
AHCI - Advanced Host Controller to enable advanced Serial ATA features such as Native Command Queuing and hot plug.

Is it the one AHCI? I've never used it. 
I'm more interested in configuring it as an auxiliary drive "sdb" to serve as a bootable backup. The box will be installed in a remote location and I'll have 
an ssh access to it.

The box is running in a medical clinic and I'm mostly concern that after the emerge if something happens, I want the user to be able to boot "grub" from 
second drive, and it will be "sdb" (hd1); but during normal operation, when running from "sda" I want to backup some application files to it so "sdb" stays 
current.

-- 
Joseph



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Duplicate identical Hard Disk
  2010-04-02 14:59           ` Mark Knecht
@ 2010-04-02 16:23             ` Joseph
  2010-04-02 16:37             ` [gentoo-user] " walt
  1 sibling, 0 replies; 15+ messages in thread
From: Joseph @ 2010-04-02 16:23 UTC (permalink / raw
  To: gentoo-user

On 04/02/10 07:59, Mark Knecht wrote:
>Good questions:
>
>1) Yes, you can RAID partitions of drives. That's what I'm doing. You
>can look at the Gentoo RAID/LVM Install guide to see an example of
>using RAID0 and RAID1 on a single drive.
>
>http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml
>
>2) I'm certainly not suggesting RAID doesn't work. It's just not
>working for me, either due to new motherboard hardware or due to the
>drives themselves. I'm currently betting it's the drives. The
>background info, without getting too deeply into it, is that if the
>drive supports SMART and SMART is enabled, then when doing RAID you
>need guaranteed Time Limited Error Recovery (TLER) to ensure (I think)
>that SMART works doesn't get in the way of the drive responding in the
>appropriate amount of time or else the drive will fall out of the RAID
>array. Turns out the WD  (according to different mailing list and
>forums I've been looking at) has removed TLER on almost all of their
>Green drive and some/many/most of the Blue and Black series. They are
>supporting this in the RE drives though of which I've obtained two.
>They are smaller and more expensive, but built for RAID, so I'm going
>to try them out next.
>
>http://en.wikipedia.org/wiki/Time-Limited_Error_Recovery
>
>3) As I understand the subject you are correct about size and speed,
>but a 3-disk RAID5 array can stand 1 disk failing whereas a 3-disk
>RAID1 array can stand 2 disks failing. For this app (MythTV and seldom
>used backup server) I don't need speed and size isn't a huge issue so
>I chose 3-disk RAID1. (Note that the HTPC case I'm using supports up
>to 3 drives only.) Because multiple drives purchased at the same time
>generally come from the same production lot there's an additional
>danger that if one drive fails then one more (or all) could fail at
>the same time so I'm protecting myself against that. Again, this is
>very specific to my current needs which is really to back up another
>machine which will be RAID0 as it needs more disk I/O speed to support
>12 processor cores.
>
>As always, I'm certainly interested in info and ideas on this subject,
>most especially now when I'm buying and building.
>
>Cheers,
>Mark

I'm not even sure if any RAID is a solution for me.
My situation is a follow, I've configured Gentoo box for a medical clinic and I'll administer it reportedly via ssh.
One server running Windows XP in VirtualBox and some other Linux programs. 
Server is a quad core ADM and has two identical SATA drives about 600GB
There is another smaller box (Intel ATOM CPU) running Gentoo, this box runs Asterisk and VirtualBox as well, it is a server backup. If something happens to 
mains Server, user just presses "Scroll Lock" twice (KVM), logs in into smaller and runs the main program from there.  So I have a backup in place.

I just want to utilize the second drive of the main server.  I'm mostly concerns about the problems with emerge, not the hard drive failure (I've plenty of 
backups).
So, I think the best option for me is to just mirror the first HD and modify it to use it a sdb. I'm just making steps I need to do:

1.) Boot from external CD
dd if=/dev/sda of=/dev/sdb

2.)
modify (add to) grub.conf on sda
#title boot sda current
title=1st HD sda Kernel Current
root (hd0,0)
kernel /boot/kernel-current root=/dev/sda3

#title boot sdb current
title=2nd HD sdb Kernel Current
root (hd1,0)
kernel /boot/kernel-current root=/dev/sdb3

3.) Modify fstab

Walt has mentioned to use "rdev" but reading man pages it is only i386, and all my boxes running amd64 (x86_64).

What else did I miss. 

-- 
Joseph



^ permalink raw reply	[flat|nested] 15+ messages in thread

* [gentoo-user] Re: Duplicate identical Hard Disk
  2010-04-02 14:59           ` Mark Knecht
  2010-04-02 16:23             ` Joseph
@ 2010-04-02 16:37             ` walt
  2010-04-02 17:38               ` Mark Knecht
  1 sibling, 1 reply; 15+ messages in thread
From: walt @ 2010-04-02 16:37 UTC (permalink / raw
  To: gentoo-user

On 04/02/2010 07:59 AM, Mark Knecht wrote:

>
> 1) Yes, you can RAID partitions of drives. That's what I'm doing. You
> can look at the Gentoo RAID/LVM Install guide to see an example of
> using RAID0 and RAID1 on a single drive.
>
> http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml

Very useful post, thanks.  I'm just nitpicking here about the use of
RAID0 on a single physical drive, which doesn't seem useful IIUC.

RAID0 alternates stripes between two physical drives so that one disk
can be reading/writing while the other disk's heads are seeking, no?

If that is the case, then single-disk RAID0 will just be thrashing the
heads back and forth between stripes on different partitions, making
more work for itself than necessary.

If I'm wrong about this, someone please correct me.




^ permalink raw reply	[flat|nested] 15+ messages in thread

* [gentoo-user] Re: Duplicate identical Hard Disk
  2010-04-02 15:46           ` Joseph
@ 2010-04-02 16:47             ` walt
  2010-04-02 18:01               ` Joseph
  0 siblings, 1 reply; 15+ messages in thread
From: walt @ 2010-04-02 16:47 UTC (permalink / raw
  To: gentoo-user

On 04/02/2010 08:46 AM, Joseph wrote:
> On 04/02/10 09:42, Neil Bothwick wrote:
>> On Thu, 01 Apr 2010 19:47:09 -0700, walt wrote:
>>
>>> 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',
>>
>> Check your BIOS first, some allow you to disable individual SATA ports,
>> so you can disconnect the drive without pulling cables.
>>
>>
>> --
>> Neil Bothwick
>
> Good suggestion, but I'm not sure my motherboard BIOS supports it.
> I have GA-MA790GP-DS4H motherboard, reading from the manual:
>
> it has OnChip SATA Type (SATA2_0 ~ SATA2_3 connectors)
> Mode: Native IDE
> RAID
> AHCI - Advanced Host Controller to enable advanced Serial ATA features such as Native Command Queuing and hot plug.
>
> Is it the one AHCI? I've never used it. I'm more interested in configuring it as an auxiliary drive "sdb" to serve as a bootable backup. The box will be installed in a remote location and I'll have an ssh access to it.
>
> The box is running in a medical clinic and I'm mostly concern that after the emerge if something happens, I want the user to be able to boot "grub" from second drive, and it will be "sdb" (hd1); but during normal operation, when running from "sda" I want
> to backup some application files to it so "sdb" stays current.

Ah, well, having only remote access rules out unplugging cables or changing
BIOS settings unless there is someone at the site who can do those things.

Seems like you would be better off to set up grub on sda so it can boot from
sda by default, but also so a remote user can just choose sdb from grub's menu.
That assumes that sda is physically intact enough to load grub from sda.  You
seem to be more worried about software screwups than hardware failure.  But
you will need to edit the handful of config files on sdb so all the right
filesystems will mount correctly.







^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Re: Duplicate identical Hard Disk
  2010-04-02 16:37             ` [gentoo-user] " walt
@ 2010-04-02 17:38               ` Mark Knecht
  0 siblings, 0 replies; 15+ messages in thread
From: Mark Knecht @ 2010-04-02 17:38 UTC (permalink / raw
  To: gentoo-user

On Fri, Apr 2, 2010 at 9:37 AM, walt <w41ter@gmail.com> wrote:
> On 04/02/2010 07:59 AM, Mark Knecht wrote:
>
>>
>> 1) Yes, you can RAID partitions of drives. That's what I'm doing. You
>> can look at the Gentoo RAID/LVM Install guide to see an example of
>> using RAID0 and RAID1 on a single drive.
>>
>> http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml
>
> Very useful post, thanks.  I'm just nitpicking here about the use of
> RAID0 on a single physical drive, which doesn't seem useful IIUC.
>
> RAID0 alternates stripes between two physical drives so that one disk
> can be reading/writing while the other disk's heads are seeking, no?
>
> If that is the case, then single-disk RAID0 will just be thrashing the
> heads back and forth between stripes on different partitions, making
> more work for itself than necessary.
>
> If I'm wrong about this, someone please correct me.

No, you are correct, RAID0 on a single drive makes no sense. If I
suggested that then I apologize for the confusion. I was only saying
that you can do RAID on one partition but do non-RAID on another. For
instance, /boot is non-RAID and then other partitions are RAID. I may
be wrong but I think that's only possible with software RAID. Not sure
you could do this behind a hardware RAID controller.

sda1 = /boot - non-RAID
sda2, sdb2, sdc2 = swap, but not RAID. The kernel binds them.
sda3, sdb3, sdc3 = RAID /home

or something like that.

In case even that's not clear, I don't think mdadm supports a RAID
array of any type with all the partitions on a single drive. For
instance:

mdadm --create /dev/md1 --level=1 --raid-devices=3 /dev/sda1 /dev/sda2 /dev/sda3

doesn't make any sense to me even if it is supported.

Hope that helps clear things up. ;-)

- Mark



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Re: Duplicate identical Hard Disk
  2010-04-02 16:47             ` walt
@ 2010-04-02 18:01               ` Joseph
  0 siblings, 0 replies; 15+ messages in thread
From: Joseph @ 2010-04-02 18:01 UTC (permalink / raw
  To: gentoo-user

On 04/02/10 09:47, walt wrote:
>On 04/02/2010 08:46 AM, Joseph wrote:
>>On 04/02/10 09:42, Neil Bothwick wrote:
>>>On Thu, 01 Apr 2010 19:47:09 -0700, walt wrote:
>>>
>>>>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',
>>>
>>>Check your BIOS first, some allow you to disable individual SATA ports,
>>>so you can disconnect the drive without pulling cables.
>>>
>>>
>>>--
>>>Neil Bothwick
>>
>>Good suggestion, but I'm not sure my motherboard BIOS supports it.
>>I have GA-MA790GP-DS4H motherboard, reading from the manual:
>>
>>it has OnChip SATA Type (SATA2_0 ~ SATA2_3 connectors)
>>Mode: Native IDE
>>RAID
>>AHCI - Advanced Host Controller to enable advanced Serial ATA features such as Native Command Queuing and hot plug.
>>
>>Is it the one AHCI? I've never used it. I'm more interested in configuring it as an auxiliary drive "sdb" to serve as a bootable backup. The box will be installed in a remote location and I'll have an ssh access to it.
>>
>>The box is running in a medical clinic and I'm mostly concern that after the emerge if something happens, I want the user to be able to boot "grub" from second drive, and it will be "sdb" (hd1); but during normal operation, when running from "sda" I want
>>to backup some application files to it so "sdb" stays current.
>
>Ah, well, having only remote access rules out unplugging cables or changing
>BIOS settings unless there is someone at the site who can do those things.
>
>Seems like you would be better off to set up grub on sda so it can boot from
>sda by default, but also so a remote user can just choose sdb from grub's menu.
>That assumes that sda is physically intact enough to load grub from sda.  You
>seem to be more worried about software screwups than hardware failure.  But
>you will need to edit the handful of config files on sdb so all the right
>filesystems will mount correctly.

As I've mentioned earlier I have enough backups on another system, so I'm not much worry about hardware failure.
 From my years of experience with Gentoo, I'm more worry about things working correctly after emerge :-/
I've made list what I need to do, but I'm not sure if this is all:

1.) Boot from external CD
dd if=/dev/sda of=/dev/sdb

2.)
modify (add to) grub.conf on sda
#title boot sda current
title=1st HD sda Kernel Current
root (hd0,0)
kernel /boot/kernel-current root=/dev/sda3

#title boot sdb current
title=2nd HD sdb Kernel Current
root (hd1,0)
kernel /boot/kernel-current root=/dev/sdb3

3.) Modify fstab

You have mentioned to use "rdev" but reading man pages it is only i386, and all my boxes running amd64 (x86_64).

-- 
Joseph



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-04-02 18:02 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox