telling mdadm to use spare drive.
telling mdadm to use spare drive.
am 04.11.2007 17:05:02 von Janek Kozicki
Hi,
I finished copying all data from old disc hdc to my shiny new
RAID5 array (/dev/hda3 /dev/sda3 missing). Next step is to create a
partition on hdc and add it to the array. And so I did this:
# mdadm --add /dev/md1 /dev/hdc3
But then I had a problem - the /dev/hdc3 was a spare, it didn't
resync automatically:
# mdadm -D /dev/md1
[....]
Number Major Minor RaidDevice State
0 3 3 0 active sync /dev/hda3
1 8 3 1 active sync /dev/sda3
2 0 0 2 removed
3 22 3 - spare /dev/hdc3
I wanted to tell mdadm to use the spare device, and I wasn't sure how
to do this, so I tried following:
# mdadm --stop /dev/md1
# mdadm --assemble --update=resync /dev/md1 /dev/hda3 /dev/sda3 /dev/hdc3
Now, 'mdadm -D /dev/md1' says:
[...]
Number Major Minor RaidDevice State
0 3 3 0 active sync /dev/hda3
1 8 3 1 active sync /dev/sda3
3 22 3 2 spare rebuilding /dev/hdc3
I'm writing here just because I want to be sure that I added this new
device correctly, I don't want to make any stupid mistake here...
# cat /proc/mdstat
md1 : active raid5 hda3[0] hdc3[3] sda3[1]
966807296 blocks super 1.1 level 5, 128k chunk, algorithm 2 [3/2] [UU_]
[=>...................] recovery = 6.2% (30068096/483403648) finish=254.9min speed=29639K/sec
bitmap: 8/8 pages [32KB], 32768KB chunk
Was there a better way to do this, is it OK?
--
Janek Kozicki |
-
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
man mdadm - suggested correction.
am 05.11.2007 11:58:03 von Janek Kozicki
Hello,
I did read 'man mdadm' from top to bottom, but I totally forgot to
look into /usr/share/doc/mdadm !
And there is much more - FAQs, recipes, etc!
Can you please add do the manual under 'SEE ALSO' a reference
to /usr/share/doc/mdadm ?
thanks :-)
--
Janek Kozicki |
-
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
man mdadm - suggested correction.
am 05.11.2007 11:58:15 von Janek Kozicki
Hello,
I did read 'man mdadm' from top to bottom, but I totally forgot to
look into /usr/share/doc/mdadm !
And there is much more - FAQs, recipes, etc!
Can you please add to the manual under 'SEE ALSO' a reference
to /usr/share/doc/mdadm ?
thanks :-)
--
Janek Kozicki |
-
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
Re: man mdadm - suggested correction.
am 05.11.2007 12:04:29 von Janek Kozicki
Janek Kozicki said: (by the date of Mon, 5 Nov 2007 11:58:15 +0100)
> I did read 'man mdadm' from top to bottom, but I totally forgot to
> look into /usr/share/doc/mdadm !
PS: this why I asked so much questions on this list ;-)
--
Janek Kozicki |
-
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
Re: man mdadm - suggested correction.
am 05.11.2007 19:08:55 von Michael Tokarev
Janek Kozicki wrote:
[]
> Can you please add do the manual under 'SEE ALSO' a reference
> to /usr/share/doc/mdadm ?
/usr/share/doc/mdadm is Debian-specific (well.. not sure it's really
Debian (or something derived from it) -- some other distros may use
the same naming scheme, too). Other distributions may place the
files into a different directory, or not ship them at all, or ship
them in alternative package.
In any case, say, on Debian a user always knows that other misc.
docs are in /usr/share/doc/$package - even if no other links are
provided in the manpage. Users familiar with other distributions
knows where/how to find other docs there.
/mjt
-
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
Re: telling mdadm to use spare drive.
am 07.11.2007 10:17:51 von Goswin von Brederlow
Janek Kozicki writes:
> Hi,
>
> I finished copying all data from old disc hdc to my shiny new
> RAID5 array (/dev/hda3 /dev/sda3 missing). Next step is to create a
> partition on hdc and add it to the array. And so I did this:
>
> # mdadm --add /dev/md1 /dev/hdc3
>
> But then I had a problem - the /dev/hdc3 was a spare, it didn't
> resync automatically:
Strange. That is exactly how I always do it and it always just worked.
mdadm should start syncing on any spare as soon as a disk fails or you
add the spare to a degraded array afaik. No special "start now"
interaction needed.
MfG
Goswin
-
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
Re: telling mdadm to use spare drive.
am 07.11.2007 18:26:02 von Janek Kozicki
Goswin von Brederlow said: (by the date of Wed, 07 Nov 2007 10:17:51 +0100)
> Strange. That is exactly how I always do it and it always just worked.
> mdadm should start syncing on any spare as soon as a disk fails or you
> add the spare to a degraded array afaik. No special "start now"
> interaction needed.
Thanks for your confirmation. I cannot explain this behaviour - I
just started using mdadm. If anybody here wants, I can remove the
drive and add this again, to see if I can duplicate this "bug" (?).
If so - then tell me what debug information you do need and I will
give it to you.
Anyway, it seems that this command
mdadm --assemble --update=resync /dev/md1 /dev/hda3 /dev/sda3 /dev/hdc3
worked, becasue `mdadm -D /dev/md1` says that array is in
"State : active" (not degraded).
best regards
--
Janek Kozicki |
-
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
Re: telling mdadm to use spare drive.
am 07.11.2007 20:13:19 von Richard Scobie
Janek Kozicki wrote:
> Goswin von Brederlow said: (by the date of Wed, 07 Nov 2007 10:17:51 +0100)
>
>
>>Strange. That is exactly how I always do it and it always just worked.
>>mdadm should start syncing on any spare as soon as a disk fails or you
>>add the spare to a degraded array afaik. No special "start now"
>>interaction needed.
>
>
> Thanks for your confirmation. I cannot explain this behaviour - I
> just started using mdadm. If anybody here wants, I can remove the
> drive and add this again, to see if I can duplicate this "bug" (?).
> If so - then tell me what debug information you do need and I will
> give it to you.
What kernel and RAID level is this?
If it's RAID 1, I seem to recall there was a relatively recently fixed
bug for this.
Regards,
Richard
-
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
Re: telling mdadm to use spare drive.
am 08.11.2007 21:28:04 von Janek Kozicki
Richard Scobie said: (by the date of Thu, 08 Nov 2007 08:13:19 +1300)
> What kernel and RAID level is this?
>
> If it's RAID 1, I seem to recall there was a relatively recently fixed
> bug for this.
debian etch, stock install
Linux 2.6.18-5-k7 #1 SMP i686 GNU/Linux
The problem was with was RAID 5.
But also I have RAID 1 there, and after --add the drives
automatically resynced.
--
Janek Kozicki |
-
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
Re: telling mdadm to use spare drive.
am 08.11.2007 22:32:08 von Richard Scobie
Janek Kozicki wrote:
> Richard Scobie said: (by the date of Thu, 08 Nov 2007 08:13:19 +1300)
>
>
>>What kernel and RAID level is this?
>>
>>If it's RAID 1, I seem to recall there was a relatively recently fixed
>>bug for this.
>
>
> debian etch, stock install
> Linux 2.6.18-5-k7 #1 SMP i686 GNU/Linux
>
> The problem was with was RAID 5.
>
> But also I have RAID 1 there, and after --add the drives
> automatically resynced.
>
OK.
This was the bug I was thinking of:
http://marc.info/?l=linux-raid&m=116003247912732&w=2
Regards,
Richard
-
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
Re: telling mdadm to use spare drive.
am 09.11.2007 10:50:49 von Janek Kozicki
Richard Scobie said: (by the date of Fri, 09 Nov 2007 10:32:08 +1300)
> This was the bug I was thinking of:
>
> http://marc.info/?l=linux-raid&m=116003247912732&w=2
This bug says that it only with mdadm 1.x:
"If a drive is added to a raid1 using older tools
(mdadm-1.x or raidtools) then it will be included
in the array without any resync happening."
But I have here:
# mdadm --version
mdadm - v2.5.6 - 9 November 2006
maybe I stumbled on another bug?
--
Janek Kozicki |
-
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