Date: Thu, 28 Jun 2012 19:25:27 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Marcel Moolenaar <marcel@xcllnt.net> Cc: Doug Rabson <dfr@FreeBSD.org>, Marcel Moolenaar <marcel@FreeBSD.org>, Christian Laursen <xi@borderworlds.dk>, freebsd-hackers <freebsd-hackers@FreeBSD.org>, Andriy Gapon <avg@FreeBSD.org>, Stefan Esser <se@FreeBSD.org>, "Andrey V. Elsukov" <bu7cher@yandex.ru>, freebsd-current <freebsd-current@FreeBSD.org> Subject: Re: [CFC/CFT] large changes in the loader(8) code Message-ID: <20120628172526.GA1438@garage.freebsd.pl> In-Reply-To: <8D85513D-CDFC-4D62-AA5A-F82F46E28CE5@xcllnt.net> References: <4FE9B01C.30306@yandex.ru> <201206270807.23347.jhb@freebsd.org> <4FEB0079.7050008@yandex.ru> <201206271028.54477.jhb@freebsd.org> <4FEB5A3C.5050900@borderworlds.dk> <1900D4C1-E5E5-446F-ABBF-976A2DFEB36B@xcllnt.net> <4FEC22A0.9000109@freebsd.org> <4FEC2D86.2040505@freebsd.org> <8D85513D-CDFC-4D62-AA5A-F82F46E28CE5@xcllnt.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 28, 2012 at 08:33:17AM -0700, Marcel Moolenaar wrote: >=20 > On Jun 28, 2012, at 3:10 AM, Stefan Esser wrote: > >=20 > > All of the above is ugly, U'm afraid :( >=20 > Indeed. The only sane way is to put the metadata in a partition of its ow= n. > Every compliant OS will respect that and consequently will not scribble o= ver > 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. Because the mirror was configured earlier, do you expect gmirror to somehow detect that someone is writting GPT metadata later and magically place GPT metadata on the raw disk and move mirror's metadata to some magic partition? Not to mention that the mirror itself doesn't have to be configured on top of raw disks. And not to mention that the mirror may never be partitioned. If GPT in your opinion is limited only to raw disks then I guess the best way to fix that is to refuse to configure GPT on anything except raw disks (which was already proposed by Andrey?). In my opinion this is unacceptable, but I think this is what you are suggesting. One of the GEOM design goals was to be flexible. Let the user decide in what order he wants to configure various layers. How do you know that in every possible scenerio software mirroring should come after partitioning and encryption after mirroring? Why can't we provide flexible tools to the user and let him decide? Maybe GPT nesting violates standards, but why can't we support it as an extention, really? I recognize the need to warn users if they use FreeBSD-specific features. We do that with non-standard APIs. So how about this. 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. In my opinion that's fair. With such a warning in place, I think we can allow users to decide on their own if they really want that or not. Then, we can also improve FreeBSD boot loader to play nice with FreeBSD-specific extensions. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --AqsLC8rIMeq19msA Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/sk4UACgkQForvXbEpPzRESwCgwGF+RxCLlootXW4lu+j8Owmt YEcAnA7XjZwxeS2poA25AtIptQHTPZco =CaJC -----END PGP SIGNATURE----- --AqsLC8rIMeq19msA--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120628172526.GA1438>