* Can't start raid 5 when device names have changed
@ 2003-01-10 3:35 bugzilla
2003-01-10 9:49 ` Stephan van Hienen
2003-01-13 19:21 ` Neil Brown
0 siblings, 2 replies; 4+ messages in thread
From: bugzilla @ 2003-01-10 3:35 UTC (permalink / raw)
To: linux-raid
This is reported on http://bugzilla.redhat.com/bugzilla as bug # 81258
Description of problem:
I have a raid 5 with 4 disks. sda1, sda2, sda3, sda4
I have added 2 disks to my system.
The new disks are sdb and sdd. At first they did not have a valid partion
table. I got this error on both disks:
md: could not lock sdb1, zero-size? Marking faulty.
md: could not import sdb1, trying to run array nevertheless.
[events: 00000004]
md: could not lock sdd1, zero-size? Marking faulty.
md: could not import sdd1, trying to run array nevertheless.
That should not be a problem because the raid 5 disks are now sda1, sdc1, sde1
and sdf1.
I did change raidtab before I shutdown to add the new disks. The system seems
to ignore raidtab for existing arrays. Must only use the file when you use
mkraid.
I have since partitioned the 2 disks sdb and sdd with type fd.
raidstart still fails.
I have created a raid 1 array on the 2 disks sdb and sdd. I did not need to
use the force option with mkraid.
The OS is on 2 IDE disks (hda and hdb).
/dev/md0 is swap
/dev/md1 is /
/dev/md2 is /boot
/dev/md3 is the problem array.
/dev/md4 is the array on the 2 new disks.
Here is a copy of my raidtab file:
raiddev /dev/md1
raid-level 1
nr-raid-disks 2
chunk-size 64k
persistent-superblock 1
nr-spare-disks 0
device /dev/hda2
raid-disk 0
device /dev/hdb3
raid-disk 1
raiddev /dev/md2
raid-level 1
nr-raid-disks 2
chunk-size 64k
persistent-superblock 1
nr-spare-disks 0
device /dev/hda1
raid-disk 0
device /dev/hdb1
raid-disk 1
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
chunk-size 64k
persistent-superblock 1
nr-spare-disks 0
device /dev/hda3
raid-disk 0
device /dev/hdb2
raid-disk 1
raiddev /dev/md3
raid-level 5
parity-algorithm left-symmetric
nr-raid-disks 4
chunk-size 64k
persistent-superblock 1
nr-spare-disks 0
device /dev/sda1
raid-disk 0
device /dev/sdc1
raid-disk 1
device /dev/sde1
raid-disk 2
device /dev/sdf1
raid-disk 3
raiddev /dev/md4
raid-level 1
#parity-algorithm left-symmetric
nr-raid-disks 2
chunk-size 64k
persistent-superblock 1
nr-spare-disks 0
device /dev/sdb1
raid-disk 0
device /dev/sdd1
raid-disk 1
I did remove the 2 new disks. Then my device names were back to normal. The
array /dev/md3 did come up after a re-boot. /dev/md4 did not (as expected,
the drives had no power)!
Please help! I can resolve the problem by addressing the new disks so they
will be sde and sdf. But this seems like it could be a major problem for
others in the future. You should be able to add disks to a system without
such problems.
I will keep the disks configured like this for a while. If someone wants me
to try something I will. If I lose data I don't care. I have 2 or more
backups.
Thanks.
------- Additional Comment #1 From Mr Watkins on 2003-01-09 22:20 -------
I will be trashing the array soon. I will re-create it with 7 disks. If
anyone wants to debug this issue, they need to start within the next few
days. I may play first, add a hot spare, fail a drive, raidhotadd. Stuff
like that. I want to determine if this stuff is top notch, or not.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can't start raid 5 when device names have changed
2003-01-10 3:35 Can't start raid 5 when device names have changed bugzilla
@ 2003-01-10 9:49 ` Stephan van Hienen
2003-01-13 19:21 ` Neil Brown
1 sibling, 0 replies; 4+ messages in thread
From: Stephan van Hienen @ 2003-01-10 9:49 UTC (permalink / raw)
To: bugzilla; +Cc: linux-raid
On Thu, 9 Jan 2003 bugzilla@watkins-home.com wrote:
> Please help! I can resolve the problem by addressing the new disks so they
> will be sde and sdf. But this seems like it could be a major problem for
> others in the future. You should be able to add disks to a system without
> such problems.
Hi,
solution is to use mdadm :
mdadm -A /dev/md3 --force /dev/sda1 /dev/sdc1 /dev/sde1 /dev/sdf1
(make sure these are the correct disks with mdadm -Q /dev/sda1 (and
sdc1...))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can't start raid 5 when device names have changed
[not found] <200301101352.h0ADqhr03685@dns1.watkins-home.com>
@ 2003-01-13 8:56 ` Stephan van Hienen
0 siblings, 0 replies; 4+ messages in thread
From: Stephan van Hienen @ 2003-01-13 8:56 UTC (permalink / raw)
To: bugzilla; +Cc: linux-raid
On Fri, 10 Jan 2003 bugzilla@watkins-home.com wrote:
>
> But I have a question...
> >From what I have read the "persistent-superblock 1" should allow device names to change. Is there a bug someone needs to fix?
don't know
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can't start raid 5 when device names have changed
2003-01-10 3:35 Can't start raid 5 when device names have changed bugzilla
2003-01-10 9:49 ` Stephan van Hienen
@ 2003-01-13 19:21 ` Neil Brown
1 sibling, 0 replies; 4+ messages in thread
From: Neil Brown @ 2003-01-13 19:21 UTC (permalink / raw)
To: bugzilla; +Cc: linux-raid
On Thursday January 9, bugzilla@watkins-home.com wrote:
> This is reported on http://bugzilla.redhat.com/bugzilla as bug # 81258
>
> Description of problem:
> I have a raid 5 with 4 disks. sda1, sda2, sda3, sda4
Hmm... These ar partitions on the same disc. I assume a typos...
> I have added 2 disks to my system.
> The new disks are sdb and sdd. At first they did not have a valid partion
> table. I got this error on both disks:
> md: could not lock sdb1, zero-size? Marking faulty.
> md: could not import sdb1, trying to run array nevertheless.
> [events: 00000004]
> md: could not lock sdd1, zero-size? Marking faulty.
> md: could not import sdd1, trying to run array nevertheless.
>
> That should not be a problem because the raid 5 disks are now sda1, sdc1, sde1
> and sdf1.
>
> I did change raidtab before I shutdown to add the new disks. The system seems
> to ignore raidtab for existing arrays. Must only use the file when you use
> mkraid.
>
> I have since partitioned the 2 disks sdb and sdd with type fd.
> raidstart still fails.
raidstart is fundamentally broken.
What it does is read raidtab, find the first device name mentioned for
an array, and tell the kernel to load a raid array based on that
device.
The kernel then reads the raid superblock off that device, extracts a
list of device major/minor numbers from that superblock and tries to
build a raid array from these devices.
So obviously if:
- The first device listed in raidtab has failed or
- any device has changed major/minor number
then the process will fail.
I strongly recommend: never use raidstart. I recommend distributions
don't even distribute it.
You should either use the raidautodetect partition type, or use mdadm
to assemble raid arrays. raidstart just isn't a workable option in
general.
NeilBrown
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-01-13 19:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-10 3:35 Can't start raid 5 when device names have changed bugzilla
2003-01-10 9:49 ` Stephan van Hienen
2003-01-13 19:21 ` Neil Brown
[not found] <200301101352.h0ADqhr03685@dns1.watkins-home.com>
2003-01-13 8:56 ` Stephan van Hienen
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).