All of lore.kernel.org
 help / color / mirror / Atom feed
* how to add third drive to RAID1 made of two drives without destroying data
@ 2005-10-22 16:53 Juraj Holtak
  2005-10-22 18:18 ` Chase Venters
  0 siblings, 1 reply; 3+ messages in thread
From: Juraj Holtak @ 2005-10-22 16:53 UTC (permalink / raw)
  To: linux-raid

Hello,

I have a working RAID1 with 2 large SATA drives and I`m using AHCI on
ICH6 chipset.
Three days ago, one drive just mysteriously failed

Oct 19 22:45:37 xaser kernel: ata1: error occurred, port reset
Oct 19 22:48:09 xaser kernel: ata2: status=0x01 { Error }
Oct 19 22:48:09 xaser kernel: ata2: error=0x40 { UncorrectableError }
Oct 19 22:48:09 xaser kernel: ata1: error occurred, port reset
Oct 19 22:48:09 xaser kernel: ata2: status=0x01 { Error }
Oct 19 22:48:09 xaser kernel: ata2: error=0x40 { UncorrectableError }
Oct 19 22:48:09 xaser kernel: SCSI error : <1 0 0 0> return code =
0x8000002
Oct 19 22:48:09 xaser kernel: sdb: Current: sense key: Medium Error
Oct 19 22:48:09 xaser kernel:     Additional sense: Unrecovered read
error - aut
o reallocate failed
Oct 19 22:48:09 xaser kernel: end_request: I/O error, dev sdb, sector
440990889
Oct 19 22:48:09 xaser kernel: raid1: Disk failure on sdb9, disabling
device.

The drive appeared dead to all my attempts to get it to work without
power cycle.
Today, the replacement drive was shipped, so I powercycled the machine
and *wonder wonder* the drive was back. So I `badblocks` and resynced
again and its working perfect.

I know I can use the "new" drive I bought today as spare, but I really
miss the point of a spare for raid1. I think, it makes much more sense,
to build in the drive as a live one, so instead of RAID1 made of 2
drives, I`ll get RAID1 made of 3 drives.

I use mdadm to manage the drives. If I use --manage --add and add the
drive(partition) to the array, it becomes a spare disk and this is not
what I want it to do.

Is there a way to upgrade my raid, without destroying data?

cheers,
juraj


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

* Re: how to add third drive to RAID1 made of two drives without destroying data
  2005-10-22 16:53 how to add third drive to RAID1 made of two drives without destroying data Juraj Holtak
@ 2005-10-22 18:18 ` Chase Venters
  2005-10-22 18:59   ` Juraj Holtak
  0 siblings, 1 reply; 3+ messages in thread
From: Chase Venters @ 2005-10-22 18:18 UTC (permalink / raw)
  To: Juraj Holtak; +Cc: linux-raid

On Saturday 22 October 2005 11:52 am, Juraj Holtak wrote:
> I know I can use the "new" drive I bought today as spare, but I really
> miss the point of a spare for raid1. I think, it makes much more sense,
> to build in the drive as a live one, so instead of RAID1 made of 2
> drives, I`ll get RAID1 made of 3 drives.
>
> I use mdadm to manage the drives. If I use --manage --add and add the
> drive(partition) to the array, it becomes a spare disk and this is not
> what I want it to do.
>
> Is there a way to upgrade my raid, without destroying data?

Indeed. Check mdadm --grow:

Usage: mdadm --grow device options

This usage causes mdadm to attempt to reconfigure a running array.
This is only possibly if the kernel being used supports a particular
reconfiguration.  This version only supports changing the number of
devices in a RAID1, and changing the active size of all devices in
a RAID1/4/5/6.

Options that are valid with the grow (-G --grow) mode are:
  --size=        -z   : Change the active size of devices in an array.
                      : This is useful if all devices have been replaced
                      : with larger devices.
  --raid-disks=  -n   : Change the number of active devices in a RAID1
                      : array.

I haven't done it before personally, but I'd imagine:

mdadm --grow /dev/md0 --raid-disks=3 

would be a good start (if not the total solution).

Cheers,
Chase

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

* Re: how to add third drive to RAID1 made of two drives without destroying data
  2005-10-22 18:18 ` Chase Venters
@ 2005-10-22 18:59   ` Juraj Holtak
  0 siblings, 0 replies; 3+ messages in thread
From: Juraj Holtak @ 2005-10-22 18:59 UTC (permalink / raw)
  To: Chase Venters; +Cc: linux-raid

Am Samstag, den 22.10.2005, 13:18 -0500 schrieb Chase Venters:

> Indeed. Check mdadm --grow:

I did

mdadm --grow /dev/md9 -n3
mdadm --manage /dev/md9 --add /dev/sdc9

Works like a charm. Thank you.

cheers,
juraj


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

end of thread, other threads:[~2005-10-22 18:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-22 16:53 how to add third drive to RAID1 made of two drives without destroying data Juraj Holtak
2005-10-22 18:18 ` Chase Venters
2005-10-22 18:59   ` Juraj Holtak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.