[dm-devel] HPA unlock during partition scan of RAID components

Tejun Heo tj at kernel.org
Fri Nov 4 16:32:07 UTC 2011


Hello,

On Fri, Nov 04, 2011 at 12:26:02PM -0400, Phillip Susi wrote:
> I'm asking for a clarification not just a restatement.  What problem
> occurs when you move a drive to another machine, or hotplug the
> drive?

Umm... partioned / mkfs'd while unlocked and bios (on whatever
machine) locks it on later boots.

> >Exposing alt size should be enough for md/dm no matter how hpa is
> >setup.
> 
> So you are saying that mdadm should store the metadata for 0.9 and
> 1.0 relative to the locked end of the disk, even if it is currently
> unlocked?  I suppose then grub also will need to be able to detect
> if the disk has been unlocked and adjust to using the locked size.

No, with both sizes exposed, mdadm should be able to detect metadata
at the end even if it was created w/ hpa locked.  This is still
fundamentally flawed as if you move it to another machine, it may be
locked in completely different way, but that's as far as we can go.

> >Because sans raids, it was good enough and doesn't recent md's have
> >metadata at the beginning anyway?
> 
> It isn't about whether it is good enough or not, it's about whether
> the kernel should be using heuristics to make decisions, or leaving
> it up to user space, where distros can come up with all kinds of
> complex logic to handle all of the goofy cases.  You complain that
> the block layer does not have enough information to get it right, so
> why not let user space decide, where it has access to all of the
> information it needs.

Upto userspace how?  Unlock it after root is mounted?

> >The thing is that you have your problem, and other people have other
> >issues w/ HPA.  At this point, it's a misfeature abused by some silly
> >BIOSen mostly for silly BIOS raids.  I think we should expose the most
> >we can to our users and if some BIOSen are screwed on soft reboot,
> >well, just accept it or turn off HPA unlocking manually.
> 
> It is actually not used FOR the bios raid.  The bios is using the
> HPA for unrelated reasons and it just happens that unlocking it
> breaks the bios raid ( and mdadm with format 0.9 or 1.0 ).

It is also used for bios raids.  Some BIOSen lock it for no reason.
Some lock it if BIOS raid is enabled.  Some lock it for recovery
partition.  Some are just crazy.  This already has been discussed to
death.

Thanks.

-- 
tejun




More information about the dm-devel mailing list