From: unruh on

I have a raid 0 array, with two partitions, /dev/sdb3 and /dev/sda3 as
parts of that raid 0 array. Disk sdb3 has gone bad (a whole bunch of bad
sectors in previously good data-- and the errors are all on sdb.) so I
have to replace it. Now I have a backup of most of the data (
unfortunately it got done only after the disk started going bad, so some
files are gone for good, but I can live with that). How do I go about
replacing disk b? I assume that there is no way of doing it directly--
ie I have lost all of the data on both disks, and the data that sits on
sda3 is useless. But do I put in the new disk, partition it to have a
sdb3 of the same size as before, and use mdadm to create a new array?
Will the fact that sda3 was a member of that old array cause problems?
Do I reformat sda3?

Once I have the new array set up, I have to restore from the backup I
presume.

(I am using a raid0 to get the speed. Pictures flowing down a GB
ethernet from a GiGE camaera need to get dumped to disk so to get a fast
enough disk transfer to handle full speed GiGE, I need the raid0)

Thanks
Bill Unruh
From: Robert Heller on
At Wed, 14 Apr 2010 00:52:40 GMT unruh <unruh(a)wormhole.physics.ubc.ca> wrote:

>
>
> I have a raid 0 array, with two partitions, /dev/sdb3 and /dev/sda3 as
> parts of that raid 0 array. Disk sdb3 has gone bad (a whole bunch of bad
> sectors in previously good data-- and the errors are all on sdb.) so I
> have to replace it. Now I have a backup of most of the data (
> unfortunately it got done only after the disk started going bad, so some
> files are gone for good, but I can live with that). How do I go about
> replacing disk b? I assume that there is no way of doing it directly--
> ie I have lost all of the data on both disks, and the data that sits on
> sda3 is useless. But do I put in the new disk, partition it to have a
> sdb3 of the same size as before, and use mdadm to create a new array?

Yes.

> Will the fact that sda3 was a member of that old array cause problems?

No, mdadm -C should create the array 'from scratch'.

> Do I reformat sda3?

mdadm will take care of this.

> Once I have the new array set up, I have to restore from the backup I
> presume.

Yes.

>
> (I am using a raid0 to get the speed. Pictures flowing down a GB
> ethernet from a GiGE camaera need to get dumped to disk so to get a fast
> enough disk transfer to handle full speed GiGE, I need the raid0)
>
> Thanks
> Bill Unruh
>

--
Robert Heller -- Get the Deepwoods Software FireFox Toolbar!
Deepwoods Software -- Linux Installation and Administration
http://www.deepsoft.com/ -- Web Hosting, with CGI and Database
heller(a)deepsoft.com -- Contract Programming: C/C++, Tcl/Tk


From: Tomas Pedersen on
On Wed, 14 Apr 2010 00:52:40 +0000, unruh wrote:


> Do I reformat sda3?
>
No point in doing that, since mdadm will overwrite it anyway. You format
your md-device.


Tomas
From: J G Miller on
On Wed, 14 Apr 2010 00:52:40 +0000, Unruh wrote:

> I have a raid 0 array, with two partitions, /dev/sdb3 and /dev/sda3 as
> parts of that raid 0 array.

Just a reminder in case it has been overlooked, but in the partition
tables for the disks, the partitions sda3 and sdb3 should be set to

fd Linux raid auto
From: unruh on
On 2010-04-14, J G Miller <miller(a)yoyo.ORG> wrote:
> On Wed, 14 Apr 2010 00:52:40 +0000, Unruh wrote:
>
>> I have a raid 0 array, with two partitions, /dev/sdb3 and /dev/sda3 as
>> parts of that raid 0 array.
>
> Just a reminder in case it has been overlooked, but in the partition
> tables for the disks, the partitions sda3 and sdb3 should be set to
>
> fd Linux raid auto

Is there a difference between that and 83 Linux ?