2001-10-01 06:25:29

by Evan Harris

[permalink] [raw]
Subject: Re: RAID5: mkraid --force /dev/md0 doesn't work properly


Ok, thanks. I did that and it worked. But I have (unfortunately) one more
question about how raid disks are used. I've now remade the restarted the
raid, having left the oldest drive (/dev/sde1) as a failed-disk. I do a
raidhotadd /dev/md0 /dev/sde1, and this starts the raid parity rebuild and
gives this status in /proc/mdstat:

md0 : active raid5 sde1[6] sdi1[5] sdh1[4] sdg1[3] sdf1[2] sdd1[0]
179203840 blocks level 5, 256k chunk, algorithm 0 [6/5] [U_UUUU]
[=>...................] recovery = 8.4% (3023688/35840768)
finish=88.9min speed=6148K/sec

Now, my question is: the hotadd seems to have reordered the disks, so when
the rebuild is completed, do I need to reorder my raidtab to reflect this?
Like this?

device /dev/sdd1
raid-disk 0
device /dev/sdf1
raid-disk 1
device /dev/sdg1
raid-disk 2
device /dev/sdh1
raid-disk 3
device /dev/sdi1
raid-disk 4
device /dev/sde1
raid-disk 5

Or does the kernel still keep the drives in order as the raidtab already is,
even though they seem to be out of order in the syslog and /proc/mdstat? If
I have to force the recreation of the superblocks at some later point, which
way will keep the data from being lost?

Thanks. Evan

--
| Evan Harris - Consultant, Harris Enterprises - [email protected]
|
| Custom Solutions for your Software, Networking, and Telephony Needs

On Mon, 1 Oct 2001, Jakob ?stergaard wrote:

> On Sun, Sep 30, 2001 at 07:51:25PM -0500, Evan Harris wrote:
> >
> > Thanks for the fast reply!
> >
> > I'm not sure I understand why drive 5 should be failed. It is one of the
> > four disks with the most recently correct superblocks. The disk with the
> > oldest superblock is #1. Can you point me to documentation which explains
> > this better? I'm a little afraid of doing that without reading more on it,
> > since it seems to mark yet another of the 4 remaining "good" drives as
> > "bad".
>
> Oh, sorry, of course the oldest disk should be marked as failed.
>
> But the way you mark a disk failed is to replace "raid-disk" with "failed-disk".
>
> What you did in your configuration was to say that sde1 was disk 1, and sdi1 was
> disk 5 *AND* disk 1 *AND* it was failed.
>
> Replace "raid-disk" with "failed-disk" for the device that you want to mark
> as failed. Don't touch the numbers.
>
> Cheers,
>
> --
> ................................................................
> : [email protected] : And I see the elder races, :
> :.........................: putrid forms of man :
> : Jakob ?stergaard : See him rise and claim the earth, :
> : OZ9ABN : his downfall is at hand. :
> :.........................:............{Konkhra}...............:
>


2001-10-01 07:36:58

by Peter Svensson

[permalink] [raw]
Subject: Re: RAID5: mkraid --force /dev/md0 doesn't work properly

On Mon, 1 Oct 2001, Evan Harris wrote:

>
> md0 : active raid5 sde1[6] sdi1[5] sdh1[4] sdg1[3] sdf1[2] sdd1[0]
> 179203840 blocks level 5, 256k chunk, algorithm 0 [6/5] [U_UUUU]
> [=>...................] recovery = 8.4% (3023688/35840768)
> finish=88.9min speed=6148K/sec
>
> Now, my question is: the hotadd seems to have reordered the disks, so when
> the rebuild is completed, do I need to reorder my raidtab to reflect this?
> Like this?

Once the resync has completed the hotadded disk will drop into its slot.
Ie there is no need to change the numbers in /etc/raidtab, they wil be
correct once the array has recovered.

Peter
--
Peter Svensson ! Pgp key available by finger, fingerprint:
<[email protected]> ! 8A E9 20 98 C1 FF 43 E3 07 FD B9 0A 80 72 70 AF
------------------------------------------------------------------------
Remember, Luke, your source will be with you... always...