linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to auto rebuild array?
@ 2005-07-12 13:46 bart
  2005-07-13 20:45 ` Rui Santos
       [not found] ` <42D567F7.7010408@ruisantos.com>
  0 siblings, 2 replies; 5+ messages in thread
From: bart @ 2005-07-12 13:46 UTC (permalink / raw)
  To: linux-raid@vger.kernel.org

Hi,

I have the problem that after a power failure I get the message:

Jul 12 15:29:17 kernel: md: created md3
Jul 12 15:29:17 kernel: md: bind<hda4>
Jul 12 15:29:17 kernel: md: bind<hdb4>
Jul 12 15:29:17 kernel: md: bind<hde4>
Jul 12 15:29:17 kernel: md: bind<hdf4>
Jul 12 15:29:17 kernel: md: running: <hdf4><hde4><hdb4><hda4>
Jul 12 15:29:17 kernel: md: kicking non-fresh hde4 from array!
Jul 12 15:29:17 kernel: md: unbind<hde4>

I understand that hde4 is not 'fresh' and the array need to be rebuild
but I only can do that with 'mdadm --add /dev/md3 /dev/hde4'. I would
like to have it turned into a hot-spare, in which case a rebuild would
start automatic.

This application runs unattended, so there is nobody there to enter
mdadm commands.... How can I make the rebuild starting automatic
(like a hardware raidcard does)?

Regards,
	Bart

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

* Re: How to auto rebuild array?
  2005-07-12 13:46 How to auto rebuild array? bart
@ 2005-07-13 20:45 ` Rui Santos
       [not found] ` <42D567F7.7010408@ruisantos.com>
  1 sibling, 0 replies; 5+ messages in thread
From: Rui Santos @ 2005-07-13 20:45 UTC (permalink / raw)
  To: linux-raid

Hi Bart,

   Is that a RAID1 ou RAID5?

   Can you give the output of these commands?

   mdadm --misc -D /dev/md3
   mdadm --misc -E /dev/hd{a,b,e,f}4

   One other thing. Are you sure that all you raid partitions are marked 
0xfd ?

   Also attach you mdadm.conf/raidconf file, if you have any...

Regards,
Rui Santos

bart@ardistech.com wrote:

>Hi,
>
>I have the problem that after a power failure I get the message:
>
>Jul 12 15:29:17 kernel: md: created md3
>Jul 12 15:29:17 kernel: md: bind<hda4>
>Jul 12 15:29:17 kernel: md: bind<hdb4>
>Jul 12 15:29:17 kernel: md: bind<hde4>
>Jul 12 15:29:17 kernel: md: bind<hdf4>
>Jul 12 15:29:17 kernel: md: running: <hdf4><hde4><hdb4><hda4>
>Jul 12 15:29:17 kernel: md: kicking non-fresh hde4 from array!
>Jul 12 15:29:17 kernel: md: unbind<hde4>
>
>I understand that hde4 is not 'fresh' and the array need to be rebuild
>but I only can do that with 'mdadm --add /dev/md3 /dev/hde4'. I would
>like to have it turned into a hot-spare, in which case a rebuild would
>start automatic.
>
>This application runs unattended, so there is nobody there to enter
>mdadm commands.... How can I make the rebuild starting automatic
>(like a hardware raidcard does)?
>
>Regards,
>	Bart
>-
>To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>  
>


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

* Re: How to auto rebuild array?
       [not found] ` <42D567F7.7010408@ruisantos.com>
@ 2005-07-14  6:54   ` bart
  2005-07-15  8:57     ` Rui Santos
  0 siblings, 1 reply; 5+ messages in thread
From: bart @ 2005-07-14  6:54 UTC (permalink / raw)
  To: Rui Santos; +Cc: linux-raid@vger.kernel.org

Hi Rui,

>     Is that a RAID1 ou RAID5?
> 
It's a RAID5, but the problem also happends on RAID1.

>     Can you give the output of these commands?
> 
>     mdadm --misc -D /dev/md3
>     mdadm --misc -E /dev/hda4
>     mdadm --misc -E /dev/hdb4
>     mdadm --misc -E /dev/hde4
>     mdadm --misc -E /dev/hdf4
> 
>     One other thing. Are you sure that all you raid partitions are
> marked 0xfd ?
> 
There are 0xfd partitions with persistent superblock.

>     Also attach you mdadm.conf/raidconf file, if you have any...
> 
I don't use a /etc/mdadm/mdadm.conf file, the raid is started during kernel
boot with raid autodetect. That's when the 'kicking non-fresh drive' print
occurs. When this happened 'mdadm --detail' will not display the kicked disk
in the list of array disks anymore, also the mdadm deamon only will get the
name of the array that's degraded, not the name of the kicked device :(

I made a script that runs after reboot as fix, it will hott-add the kicked
disks back to the array. It seems to fix the problem.

Regards,
		Bart


-----------------------------------------------------
#! /bin/bash

DEVLIST=`ls /dev/hd??`
for dev in $DEVLIST; do
	 result=`mdadm --query $dev | grep mismatch`
	 if [ -n "$result" ]; then
		raid=/dev/`echo $result | awk 'BEGIN {FS="[ .]"} {print $9}'`
		echo $raid needs $dev added
		mdadm --add $raid $dev
	 fi
done
-----------------------------------------------------




> >
> >I have the problem that after a power failure I get the message:
> >
> >Jul 12 15:29:17 kernel: md: created md3
> >Jul 12 15:29:17 kernel: md: bind<hda4>
> >Jul 12 15:29:17 kernel: md: bind<hdb4>
> >Jul 12 15:29:17 kernel: md: bind<hde4>
> >Jul 12 15:29:17 kernel: md: bind<hdf4>
> >Jul 12 15:29:17 kernel: md: running: <hdf4><hde4><hdb4><hda4>
> >Jul 12 15:29:17 kernel: md: kicking non-fresh hde4 from array!
> >Jul 12 15:29:17 kernel: md: unbind<hde4>
> >
> >I understand that hde4 is not 'fresh' and the array need to be rebuild
> >but I only can do that with 'mdadm --add /dev/md3 /dev/hde4'. I would
> >like to have it turned into a hot-spare, in which case a rebuild would
> >start automatic.
> >
> >This application runs unattended, so there is nobody there to enter
> >mdadm commands.... How can I make the rebuild starting automatic
> >(like a hardware raidcard does)?
> >

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

* Re: How to auto rebuild array?
  2005-07-14  6:54   ` bart
@ 2005-07-15  8:57     ` Rui Santos
  2005-07-15 10:04       ` bart
  0 siblings, 1 reply; 5+ messages in thread
From: Rui Santos @ 2005-07-15  8:57 UTC (permalink / raw)
  To: linux-raid

Hi Bart,

    Nevertheless, i could realy use those commands outputs.

Rui


bart@ardistech.com wrote:

>Hi Rui,
>
>  
>
>>    Is that a RAID1 ou RAID5?
>>
>>    
>>
>It's a RAID5, but the problem also happends on RAID1.
>
>  
>
>>    Can you give the output of these commands?
>>
>>    mdadm --misc -D /dev/md3
>>    mdadm --misc -E /dev/hda4
>>    mdadm --misc -E /dev/hdb4
>>    mdadm --misc -E /dev/hde4
>>    mdadm --misc -E /dev/hdf4
>>
>>    One other thing. Are you sure that all you raid partitions are
>>marked 0xfd ?
>>
>>    
>>
>There are 0xfd partitions with persistent superblock.
>
>  
>
>>    Also attach you mdadm.conf/raidconf file, if you have any...
>>
>>    
>>
>I don't use a /etc/mdadm/mdadm.conf file, the raid is started during kernel
>boot with raid autodetect. That's when the 'kicking non-fresh drive' print
>occurs. When this happened 'mdadm --detail' will not display the kicked disk
>in the list of array disks anymore, also the mdadm deamon only will get the
>name of the array that's degraded, not the name of the kicked device :(
>
>I made a script that runs after reboot as fix, it will hott-add the kicked
>disks back to the array. It seems to fix the problem.
>
>Regards,
>		Bart
>
>
>-----------------------------------------------------
>#! /bin/bash
>
>DEVLIST=`ls /dev/hd??`
>for dev in $DEVLIST; do
>	 result=`mdadm --query $dev | grep mismatch`
>	 if [ -n "$result" ]; then
>		raid=/dev/`echo $result | awk 'BEGIN {FS="[ .]"} {print $9}'`
>		echo $raid needs $dev added
>		mdadm --add $raid $dev
>	 fi
>done
>-----------------------------------------------------
>
>
>
>
>  
>
>>>I have the problem that after a power failure I get the message:
>>>
>>>Jul 12 15:29:17 kernel: md: created md3
>>>Jul 12 15:29:17 kernel: md: bind<hda4>
>>>Jul 12 15:29:17 kernel: md: bind<hdb4>
>>>Jul 12 15:29:17 kernel: md: bind<hde4>
>>>Jul 12 15:29:17 kernel: md: bind<hdf4>
>>>Jul 12 15:29:17 kernel: md: running: <hdf4><hde4><hdb4><hda4>
>>>Jul 12 15:29:17 kernel: md: kicking non-fresh hde4 from array!
>>>Jul 12 15:29:17 kernel: md: unbind<hde4>
>>>
>>>I understand that hde4 is not 'fresh' and the array need to be rebuild
>>>but I only can do that with 'mdadm --add /dev/md3 /dev/hde4'. I would
>>>like to have it turned into a hot-spare, in which case a rebuild would
>>>start automatic.
>>>
>>>This application runs unattended, so there is nobody there to enter
>>>mdadm commands.... How can I make the rebuild starting automatic
>>>(like a hardware raidcard does)?
>>>
>>>      
>>>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>  
>


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

* Re: How to auto rebuild array?
  2005-07-15  8:57     ` Rui Santos
@ 2005-07-15 10:04       ` bart
  0 siblings, 0 replies; 5+ messages in thread
From: bart @ 2005-07-15 10:04 UTC (permalink / raw)
  To: Rui Santos; +Cc: linux-raid@vger.kernel.org

Hi Rui,

>  Nevertheless, i could realy use those commands outputs.
> 
Below are the command outputs for the RAID1 set when /dev/hdb3 was
kicked during raid autodetect.

Cheers,
	Bart


--------------------------------------------------------------------
# cat /proc/mdstat 
Personalities : [linear] [raid0] [raid1] [raid5] 
md1 : active raid1 hdb2[1] hda2[0]
      99904 blocks [2/2] [UU]
      
md2 : active raid1 hda3[0]
      999936 blocks [2/1] [U_]


# mdadm --misc -D /dev/md2
/dev/md2:
        Version : 00.90.01
  Creation Time : Tue Jul  5 09:15:31 2005
     Raid Level : raid1
     Array Size : 999936 (976.50 MiB 1023.93 MB)
    Device Size : 999936 (976.50 MiB 1023.93 MB)
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 2
    Persistence : Superblock is persistent

    Update Time : Fri Jul 15 12:03:17 2005
          State : clean, degraded
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           UUID : 1c03c211:3bbbdacf:20ff8e96:29bd37e7
         Events : 0.211375

    Number   Major   Minor   RaidDevice State
       0       3        3        0      active sync   /dev/.static/dev/hda3
       1       0        0        -      removed


# mdadm --misc -E /dev/hda3
/dev/hda3:
          Magic : a92b4efc
        Version : 00.90.01
           UUID : 1c03c211:3bbbdacf:20ff8e96:29bd37e7
  Creation Time : Tue Jul  5 09:15:31 2005
     Raid Level : raid1
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 2

    Update Time : Fri Jul 15 12:03:17 2005
          State : clean
 Active Devices : 1
Working Devices : 1
 Failed Devices : 1
  Spare Devices : 0
       Checksum : d15f25b8 - correct
         Events : 0.211375


      Number   Major   Minor   RaidDevice State
this     0       3        3        0      active sync   /dev/.static/dev/hda3

   0     0       3        3        0      active sync   /dev/.static/dev/hda3
   1     1       0        0        1      faulty removed

# mdadm --misc -E /dev/hdb3
/dev/hdb3:
          Magic : a92b4efc
        Version : 00.90.01
           UUID : 1c03c211:3bbbdacf:20ff8e96:29bd37e7
  Creation Time : Tue Jul  5 09:15:31 2005
     Raid Level : raid1
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 2

    Update Time : Fri Jul 15 11:25:42 2005
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : d15f1c9a - correct
         Events : 0.211268


      Number   Major   Minor   RaidDevice State
this     1       3       67        1      active sync   /dev/.static/dev/hdb3

   0     0       3        3        0      active sync   /dev/.static/dev/hda3
   1     1       3       67        1      active sync   /dev/.static/dev/hdb3

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

end of thread, other threads:[~2005-07-15 10:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-12 13:46 How to auto rebuild array? bart
2005-07-13 20:45 ` Rui Santos
     [not found] ` <42D567F7.7010408@ruisantos.com>
2005-07-14  6:54   ` bart
2005-07-15  8:57     ` Rui Santos
2005-07-15 10:04       ` bart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).