Date: Tue, 24 May 2011 12:22:47 +0300 From: Andriy Gapon <avg@FreeBSD.org> To: "Andrey V. Elsukov" <bu7cher@yandex.ru> Cc: Marcel Moolenaar <xcllnt@mac.com>, Warner Losh <imp@bsdimp.com>, freebsd-geom@FreeBSD.org Subject: Re: [RFC] Remove requirement of alignment to track from MBR scheme Message-ID: <4DDB78E7.2070301@FreeBSD.org> In-Reply-To: <4DDB74B2.702@yandex.ru> References: <4DDA2F0B.2040203@yandex.ru> <D75B2856-D9D8-4BA3-BC54-8258610CEA06@xcllnt.net> <9ED563AB-7B35-40F4-A33E-015317858401@bsdimp.com> <4DDB5375.6050004@FreeBSD.org> <4DDB74B2.702@yandex.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
on 24/05/2011 12:04 Andrey V. Elsukov said the following: > There are several operations which can/should be changed: > 1. MBR detection. All users want keep their partitions accessible. > But with r221788 it is now problematic. I can revert r221788, but for > me it seems right and instead reverting MBR support should be changed: > a) table->gpt_last should not be aligned to track boundary; > b) table->gpt_first can be aligned to track for compatibility, but > if there is already some partition starts from inside first > track, table->gpt_first should be set to 1. I think that we should completely ignore anything and everything CHS in our _validations_ (should not even warn). Words/notions "track", "cylinder", "head" should just disappear from source code. On other points - I agree with you. > 2. MBR creating. > a) table->gpt_last should not be aligned to track boundary; > b) table->gpt_first can be aligned to track for compatibility. > > 3. Creating partitions. Users should choose alignment method, not the kernel. > and they can do it: > Align to 4k: > # gpart add -t freebsd -a 4k -s 5g ada0 > > Align according to disk geometry: > # gpart add -t freebsd -g -s 5g ada0 > > So, patch is here: > http://people.freebsd.org/~ae/mbr_geometry.diff > > Examples: > > # gpart create -s mbr md0 > md0 created > # gpart show md0 > => 63 4294967232 md0 MBR (5.5T) > 63 4294967232 - free - (2T) > > # gpart add -t freebsd -s 10g -a 4k md0 > md0s1 added > # gpart show md0 > => 63 4294967232 md0 MBR (5.5T) > 63 1 - free - (512B) > 64 20971520 1 freebsd (10G) > 20971584 4273995711 - free - (2T) > > # gpart add -t freebsd -s 10g -g md0 > md0s2 added > # gpart show md0 > => 63 4294967232 md0 MBR (5.5T) > 63 1 - free - (512B) > 64 20971520 1 freebsd (10G) > 20971584 45 - free - (22k) > 20971629 20971503 2 freebsd (10G) > 41943132 4253024163 - free - (2T) > -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DDB78E7.2070301>