* quick Q re raid reconstruction
@ 2005-12-01 11:53 Eyal Lebedinsky
2005-12-01 21:55 ` Eyal Lebedinsky
2005-12-01 22:07 ` Neil Brown
0 siblings, 2 replies; 6+ messages in thread
From: Eyal Lebedinsky @ 2005-12-01 11:53 UTC (permalink / raw)
To: linux-raid list
I have (had) a 4 disk RAID5 /dev/sd[abcd]1.
sda went bad (really, bad sectors) and is being replaced, hope
to get a replacement tomorrow.
While the array was degraded (but running) sdd failed (controller
trouble) and was marked as failed. The array went down (naturally).
I am rather sure that sdd is healthy - see examine below.
Right now /dev/sd[bcd] are seen as sd[abc] until I install the
missing disk.
I wish to bring the array up (degraded). Whatever I do mdadm
refuses to do so
mdadm --assemble --force /dev/sd{a,b,c}1
should it recognise the array as degraded but good and start it?
Q1) What is the correct command to bring these three up as
degraded?
Q2) When I get the fourth disk, how do I bring the array up
ensuring that the good disks (sd[bcd]) are marked as such
and the fresh one (sda) is reconstructed (rather than one
of the good ones).
In the past in cases where I trusted all four to be good (again,
controller trouble would fail multiple disks) I would just --build
on top of the array and a would not care which one is being
reconstructed.
I assume that the below data does not reflect modified superblocks
due to the attempted --force because the date reflects the failure
event.
# mdadm --examine /dev/sd*1
/dev/sda1:
Magic : a92b4efc
Version : 00.90.02
UUID : 54069710:f9f9ab5b:ae89479a:d7c1852e
Creation Time : Tue Sep 13 00:42:04 2005
Raid Level : raid5
Raid Devices : 4
Total Devices : 4
Preferred Minor : 0
Update Time : Sun Nov 27 15:29:01 2005
State : clean
Active Devices : 2
Working Devices : 3
Failed Devices : 2
Spare Devices : 1
Checksum : 16d99bd5 - correct
Events : 0.492477
Layout : left-symmetric
Chunk Size : 256K
Number Major Minor RaidDevice State
this 1 8 17 1 active sync /dev/.static/dev/sdb1
0 0 0 0 0 removed
1 1 8 17 1 active sync /dev/.static/dev/sdb1
2 2 22 1 2 active sync /dev/.static/dev/hdc1
3 3 0 0 3 faulty removed
4 4 8 1 4 faulty /dev/.static/dev/sda1
/dev/sdb1:
Magic : a92b4efc
Version : 00.90.02
UUID : 54069710:f9f9ab5b:ae89479a:d7c1852e
Creation Time : Tue Sep 13 00:42:04 2005
Raid Level : raid5
Raid Devices : 4
Total Devices : 4
Preferred Minor : 0
Update Time : Sun Nov 27 15:29:01 2005
State : clean
Active Devices : 2
Working Devices : 3
Failed Devices : 2
Spare Devices : 1
Checksum : 16d99bd5 - correct
Events : 0.492477
Layout : left-symmetric
Chunk Size : 256K
Number Major Minor RaidDevice State
this 2 22 1 2 active sync /dev/.static/dev/hdc1
0 0 0 0 0 removed
1 1 8 17 1 active sync /dev/.static/dev/sdb1
2 2 22 1 2 active sync /dev/.static/dev/hdc1
3 3 0 0 3 faulty removed
4 4 8 1 4 faulty /dev/.static/dev/sda1
/dev/sdc1:
Magic : a92b4efc
Version : 00.90.02
UUID : 54069710:f9f9ab5b:ae89479a:d7c1852e
Creation Time : Tue Sep 13 00:42:04 2005
Raid Level : raid5
Raid Devices : 4
Total Devices : 4
Preferred Minor : 0
Update Time : Sun Nov 27 15:29:01 2005
State : clean
Active Devices : 2
Working Devices : 3
Failed Devices : 2
Spare Devices : 1
Checksum : 16d99c17 - correct
Events : 0.492477
Layout : left-symmetric
Chunk Size : 256K
Number Major Minor RaidDevice State
this 5 22 65 5 spare /dev/.static/dev/hdd1
0 0 0 0 0 removed
1 1 8 17 1 active sync /dev/.static/dev/sdb1
2 2 22 1 2 active sync /dev/.static/dev/hdc1
3 3 0 0 3 faulty removed
4 4 8 1 4 faulty /dev/.static/dev/sda1
--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>
attach .zip as .dat
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: quick Q re raid reconstruction
2005-12-01 11:53 quick Q re raid reconstruction Eyal Lebedinsky
@ 2005-12-01 21:55 ` Eyal Lebedinsky
2005-12-01 22:07 ` Neil Brown
1 sibling, 0 replies; 6+ messages in thread
From: Eyal Lebedinsky @ 2005-12-01 21:55 UTC (permalink / raw)
To: linux-raid list
Eyal Lebedinsky wrote:
> I have (had) a 4 disk RAID5 /dev/sd[abcd]1.
[trim]
By this evening this will become urgent, so if anyone can
reply then please do.
To bring it up in degraded mode, can I do a --create and tell
it to use sd[abc] and mark sdd as failed? I can then force
--run. An --assemble with '--failed /dev/sdd1' was not happy
because it could not see sdd (naturally).
With the new disk (sda) added, can I safely do
mdadm --assemble /dev/md0 /dev/sd[bcd]1 --fail /dev/sda1
and maybe --force or --run to bring it up?
TIA
--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>
attach .zip as .dat
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: quick Q re raid reconstruction
2005-12-01 11:53 quick Q re raid reconstruction Eyal Lebedinsky
2005-12-01 21:55 ` Eyal Lebedinsky
@ 2005-12-01 22:07 ` Neil Brown
2005-12-01 22:42 ` Eyal Lebedinsky
1 sibling, 1 reply; 6+ messages in thread
From: Neil Brown @ 2005-12-01 22:07 UTC (permalink / raw)
To: Eyal Lebedinsky; +Cc: linux-raid list
On Thursday December 1, eyal@eyal.emu.id.au wrote:
> I have (had) a 4 disk RAID5 /dev/sd[abcd]1.
>
> sda went bad (really, bad sectors) and is being replaced, hope
> to get a replacement tomorrow.
>
> While the array was degraded (but running) sdd failed (controller
> trouble) and was marked as failed. The array went down (naturally).
> I am rather sure that sdd is healthy - see examine below.
>
> Right now /dev/sd[bcd] are seen as sd[abc] until I install the
> missing disk.
>
> I wish to bring the array up (degraded). Whatever I do mdadm
> refuses to do so
> mdadm --assemble --force /dev/sd{a,b,c}1
> should it recognise the array as degraded but good and start it?
>
> Q1) What is the correct command to bring these three up as
> degraded?
mdadm --assemble --force /dev/mdX /dev/sd[abc]1
However this won't work with the superblocks you have. So
mdadm --create /dev/mdX -l5 -c256 -n4 missing /dev/sda /dev/sdb /dev/sdc
>
> Q2) When I get the fourth disk, how do I bring the array up
> ensuring that the good disks (sd[bcd]) are marked as such
> and the fresh one (sda) is reconstructed (rather than one
> of the good ones).
As above, then
mdadm /dev/mdX --add /dev/newdisk
NeilBrown
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: quick Q re raid reconstruction
2005-12-01 22:07 ` Neil Brown
@ 2005-12-01 22:42 ` Eyal Lebedinsky
2005-12-01 22:56 ` Neil Brown
0 siblings, 1 reply; 6+ messages in thread
From: Eyal Lebedinsky @ 2005-12-01 22:42 UTC (permalink / raw)
To: Neil Brown; +Cc: linux-raid list
Neil Brown wrote:
>>Q1) What is the correct command to bring these three up as
>> degraded?
>
>
> mdadm --assemble --force /dev/mdX /dev/sd[abc]1
>
> However this won't work with the superblocks you have. So
>
> mdadm --create /dev/mdX -l5 -c256 -n4 missing /dev/sda /dev/sdb /dev/sdc
I do not see 'missing' the the mdadm manpage, but maybe Debian is too
far behind?
# mdadm --version
mdadm - v1.9.0 - 04 February 2005
Should I use 2.1 (is it safe to upgrade to it)?
I built it anyway and I do not see 'missing' listed in
mdadm --create --help
Reading the new mdadm.man I can see what .missing' does, good.
I got it up (fsck now running), thanks a lot.
--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>
attach .zip as .dat
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: quick Q re raid reconstruction
2005-12-01 22:42 ` Eyal Lebedinsky
@ 2005-12-01 22:56 ` Neil Brown
2005-12-01 23:06 ` Eyal Lebedinsky
0 siblings, 1 reply; 6+ messages in thread
From: Neil Brown @ 2005-12-01 22:56 UTC (permalink / raw)
To: Eyal Lebedinsky; +Cc: linux-raid list
On Friday December 2, eyal@eyal.emu.id.au wrote:
> Neil Brown wrote:
> >>Q1) What is the correct command to bring these three up as
> >> degraded?
> >
> >
> > mdadm --assemble --force /dev/mdX /dev/sd[abc]1
> >
> > However this won't work with the superblocks you have. So
> >
> > mdadm --create /dev/mdX -l5 -c256 -n4 missing /dev/sda /dev/sdb /dev/sdc
>
> I do not see 'missing' the the mdadm manpage, but maybe Debian is too
> far behind?
It is in the section on "CREATE MODE"
To create a "degraded" array in which some devices are missing, simply
give the word "missing" in place of a device name. This will cause
mdadm to leave the corresponding slot in the array empty. For a RAID4
or RAID5 array at most one slot can be "missing"; for a RAID6 array at
most two slots. For a RAID1 array, only one real device needs to be
given. All of the others can be "missing".
>
> # mdadm --version
> mdadm - v1.9.0 - 04 February 2005
The section I quoted is from the man page for 1.12.0, but that text
certainly predates 1.9.0.
>
> Should I use 2.1 (is it safe to upgrade to it)?
You don't need to, but you can. It is safe to upgrade.
>
> I built it anyway and I do not see 'missing' listed in
> mdadm --create --help
I do.
$ /sbin/mdadm --create --help
Usage: mdadm --create device -chunk=X --level=Y --raid-devices=Z devices
This usage will initialise a new md array, associate some
devices with it, and activate the array. In order to create an
array with some devices missing, use the special word 'missing' in
^^^^^^^
place of the relevant device name.
>
> Reading the new mdadm.man I can see what .missing' does, good.
>
> I got it up (fsck now running), thanks a lot.
Good to hear.
NeilBrown
>
> --
> Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>
> attach .zip as .dat
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: quick Q re raid reconstruction
2005-12-01 22:56 ` Neil Brown
@ 2005-12-01 23:06 ` Eyal Lebedinsky
0 siblings, 0 replies; 6+ messages in thread
From: Eyal Lebedinsky @ 2005-12-01 23:06 UTC (permalink / raw)
To: Neil Brown; +Cc: linux-raid list
Neil Brown wrote:
> On Friday December 2, eyal@eyal.emu.id.au wrote:
>
>>Neil Brown wrote:
>>
>>>>Q1) What is the correct command to bring these three up as
>>>> degraded?
>>>
>>>
>>> mdadm --assemble --force /dev/mdX /dev/sd[abc]1
>>>
>>>However this won't work with the superblocks you have. So
>>>
>>> mdadm --create /dev/mdX -l5 -c256 -n4 missing /dev/sda /dev/sdb /dev/sdc
>>
>>I do not see 'missing' the the mdadm manpage, but maybe Debian is too
>>far behind?
>
>
> It is in the section on "CREATE MODE"
>
> To create a "degraded" array in which some devices are missing, simply
> give the word "missing" in place of a device name. This will cause
> mdadm to leave the corresponding slot in the array empty. For a RAID4
> or RAID5 array at most one slot can be "missing"; for a RAID6 array at
> most two slots. For a RAID1 array, only one real device needs to be
> given. All of the others can be "missing".
>
>
>
>># mdadm --version
>>mdadm - v1.9.0 - 04 February 2005
>
>
> The section I quoted is from the man page for 1.12.0, but that text
> certainly predates 1.9.0.
Here is the Debian (stable) relevant 'man mdadm' section:
CREATE MODE
Usage: mdadm --create device --chunk=X --level=Y
--raid-disks=Z devices
This usage will initialise a new md array, associate some devices with
it, and activate the array.
As devices are added, they are checked to see if they contain raid
superblocks or filesystems. They are also check to see if the variance
in device size exceeds 1%.
If any discrepancy is found, the array will not automatically be run,
though the presence of a --run can override this caution.
The General Management options that are valid with --create are:
--run insist of running the array even if some devices look like they
might be in use.
--readonly
start the array readonly - not supported yet.
Maybe they have their own "special" man page?
>>I built it anyway and I do not see 'missing' listed in
>> mdadm --create --help
>
> I do.
>
> $ /sbin/mdadm --create --help
> Usage: mdadm --create device -chunk=X --level=Y --raid-devices=Z devices
>
> This usage will initialise a new md array, associate some
> devices with it, and activate the array. In order to create an
> array with some devices missing, use the special word 'missing' in
> ^^^^^^^
> place of the relevant device name.
True, I missed it :-(
fsck finished clean too, thanks again.
--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>
attach .zip as .dat
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-12-01 23:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-01 11:53 quick Q re raid reconstruction Eyal Lebedinsky
2005-12-01 21:55 ` Eyal Lebedinsky
2005-12-01 22:07 ` Neil Brown
2005-12-01 22:42 ` Eyal Lebedinsky
2005-12-01 22:56 ` Neil Brown
2005-12-01 23:06 ` Eyal Lebedinsky
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).