Re: Degraded raid handling

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

 



On Fri, May 18, 2007 at 11:21:55AM -0400, Phillip Susi wrote:
> Heinz Mauelshagen wrote:
> >Sure. The current code tries activating degraded mirrors with a
> >linear mapping. If that needs enhancement, please send patches.
> 
> Ok, so to be sure: if dmraid finds only one disk in the mirror, it will 
> activate it in a degraded state, and update the on disk metadata to 
> indicate the state of the set is inconsistent?  And there is no option 
> to ask it not to degrade the set?

It activates the mirror degraded but doesn't update the ondisk metadata yet.
Use the BIOS to do that.

> 
> Could you suggest a part of the source I might start looking at to add 
> such an option?

format.c and activate.c.

> 
> >>>Use "dmraid -r -c... device-path".
> >>I don't think this will do what I need it to.  This will just read the 
> >>metadata of the disk and report if that metadata says the set is ok or 
> >>inconsistent.  Presumably it will say it is ok because up until now it 
> >>has been, but now we can't find the second disk to build the set so the 
> >>state of the set needs changed to inconsistent.
> >
> >Well, you gotta find 2 drives for the mirror; if you only
> >discover one you can react on it.
> 
> Huh?  The -r option combined with the device-path argument tells dmraid 
> to only look at that specific device, does it not?  So it will read the 
> metadata from that device and report what it says.  Since the last time 
> the raid set was active, it was ok, so the metadata on that disk will 
> say the set is ok, but if you were to ask dmraid to activate the set, it 
> would be degraded to inconsistent because one of the disks is missing.
> 
> So what I need is a way to ask dmraid to assemble the raid set 
> information from all discovered devices, and tell me if the set would be 
>  changed to degraded if activated now.
> 
> >dmraid -tay ?
> 
> Hrm... the man page does not explain the -t flag.  Would -tay not also 
> activate it?  Or just test activating it?  What sort of output would 
> result if say, one of the disks is missing in the mirror?

Got to add a bit more.
It is the test option, which display the mapping information created
without trying the activation of the set.

dmraid -c ... -s ... might be another approcah for your issue.

> 
> >>If the mirror IS activated by dmraid with one disk missing, does dmraid 
> >>update the metadata to indicate that the set is inconsistent?
> >
> >Not yet. You'ld need to use the BIOS management util to do that for now.
> 
> Whoa, that sounds like a data loosing bug.  If dmraid activates the 
> mirror in a degraded state, then the missing disk will become out of 
> sync.  Without marking the disk as inconsistent, if the other disk 
> reappears when you reboot, the bios will activate the set thinking it is 
> consistent when it really is not, which can lead to incorrect operation 
> and data loss.

In that case you would have removed the drive and used the setup util
to fix things already. But yes, if you don't, you can get a problem.

-- 

Regards,
Heinz    -- The LVM Guy --

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Red Hat GmbH
Consulting Development Engineer                   Am Sonnenhang 11
Storage Development                               56242 Marienrachdorf
                                                  Germany
Mauelshagen@xxxxxxxxxx                            PHONE +49  171 7803392
                                                  FAX   +49 2626 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

_______________________________________________
Ataraid-list mailing list
Ataraid-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ataraid-list

[Index of Archives]     [Linux RAID]     [Linux Device Mapper]     [Linux IDE]     [Linux SCSI]     [Kernel]     [Linux Books]     [Linux Admin]     [GFS]     [RPM]     [Yosemite Campgrounds]     [AMD 64]

  Powered by Linux