Re: [CFC/CFT] large changes in the loader(8) code

From: Marcel Moolenaar <marcel_at_xcllnt.net>
Date: Thu, 28 Jun 2012 14:40:57 -0700
On Jun 28, 2012, at 10:25 AM, Pawel Jakub Dawidek wrote:

> On Thu, Jun 28, 2012 at 08:33:17AM -0700, Marcel Moolenaar wrote:
>> 
>> On Jun 28, 2012, at 3:10 AM, Stefan Esser wrote:
>>> 
>>> All of the above is ugly, U'm afraid :(
>> 
>> Indeed. The only sane way is to put the metadata in a partition of its own.
>> Every compliant OS will respect that and consequently will not scribble over
>> the data unintentionally. Any other scheme that puts valuable data in some
>> undocumented or unregistered location is violating the GPT spec right away
>> and is susceptible to being clobbered unintentionally.
> 
> If the user runs:
> 
> 	# gpart create -s GPT /dev/mirror/foo
> 
> for me it is obvious that he wants to partition the mirror device and
> not individual disks.

It could definitely be interpreted as the user knowing what he/she
wants and as such design an infrastructure around this assumption.
If users were at least as knowledgable as developers, my concerns
wouldn't be as big. But we all know how knoweldgable users can be
and kike it or not, even developers aren't gurus in everything. We
may think to know stuff, but in practice we're just as clueless in
cases as users -- more clueless even sometimes.

So you may think the intend is obvious, but you should know better.

> Let's modify gpart(8) to print a warning if GPT is configured on
> something else than raw disk. Let's the warning say that such
> configuration is non-standard and problems are expected if the disk is
> shared between other OSes.

Yes. I think we finally reached the point we should have reached
years ago. With the proper tooling, our flexible infrastructure
can be used in a safe and complaint way while still giving the
freedom to those who unwisely think they know better.

Build it and I'll concur.

-- 
Marcel Moolenaar
marcel_at_xcllnt.net
Received on Thu Jun 28 2012 - 19:41:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:28 UTC