NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: RAIDFrame issues ...



Malcolm Herbert writes:
> I've got a 4.0 laptop with a single internal drive wd0.  I've set up the
[snip]
> ... then tried several things to get the re-attached drive synced again:
> 
> |maja[~/projects/rrrchive] 10v>: sudo raidctl -F /dev/sd0a raid0
> |Password:
> |raidctl: ioctl (RAIDFRAME_FAIL_DISK) failed: Invalid argument
[snip]
> ... and tried again to initiate a reconstruction:
> 
> |maja[~/projects/rrrchive] 15v>: sudo raidctl -R /dev/sd0a raid0
> |raidctl: ioctl (RAIDFRAME_REBUILD_IN_PLACE) failed: Invalid argument
> |maja[~/projects/rrrchive] 17v>: sudo raidctl -r component1 raid0
[snip]
> Finally I decided to try and add the reconnected drive, to see if it would do
>  the Right Thing:
> 
> |maja[~/projects/rrrchive] 24v>: sudo raidctl -a /dev/sd0a raid0
> |maja[~/projects/rrrchive] 25v>: raidctl -s raid0
> |Components:
> |           /dev/wd0a: optimal
> |          component1: spared
> |Spares:
> |           /dev/sd0a: failed
> |           /dev/sd0a: spare
> |Component label for /dev/wd0a:
[snip]
> 
> ... ?  the device is listed twice, once as failed, once as spared?
[snip]
> 
> ... so I'm stumped - I would guess that if I removed the disk, rebooted
> the host and added it again it might work, but I'd prefer to see if I
> can get it working without the reboot.
>
> Was there something I should have done that I didn't?  Any thoughts?
> I'm surprised that none of the remove device commands did anything ...

The short answer is that the RAIDframe code's handling of spare disks 
isn't full-featured enough to do what you're trying to do.  The spare 
disk handling code needs to be gutted and replaced (to make used 
spares full members of the RAID set) and then things would work how 
you wanted.  Right now the only way to make a spare disk a full 
member of the RAID set is to reboot. 

As for why /dev/sd0a is listed twice when added the second time, 
well, that's how the spare code works right now -- as far as it's 
concerned that's a different, new disk.  (and, really, that's about 
the best it can guess.  Of course, having two disks with the same 
name is going to make it impossible to rebuild to the second one :(
Nothing that a reboot couldn't fix, but that's somewhat sub-optimal. )

Later...

Greg Oster




Home | Main Index | Thread Index | Old Index