Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Dec 2012 14:31:18 +0100
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        Warren Block <wblock@wonkity.com>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: 4k alignment of MBR slices / BSD partitions is not working correctly
Message-ID:  <50C88726.4090105@quip.cz>
In-Reply-To: <alpine.BSF.2.00.1212111920570.8433@wonkity.com>
References:  <50C7D722.9090809@quip.cz> <alpine.BSF.2.00.1212111920570.8433@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Warren Block wrote:
> On Wed, 12 Dec 2012, Miroslav Lachman wrote:
>
>> Next test with gpart -a 4k
>>
>> # gpart create -s mbr mirror/gm0
>> mirror/gm0 created
>>
>> # gpart add -a 4k -s 40g -t freebsd mirror/gm0
>> mirror/gm0s1 added
>>
>> # gpart show -p mirror/gm0
>> => 63 1951475648 mirror/gm0 MBR (930G)
>> 63 63 - free - (31k)
>> 126 83886012 mirror/gm0s1 freebsd (40G)
>> 83886138 1867589573 - free - (890G)
>>
>>
>> Same wrong result as in previous test
>
> My possibly incorrect understanding of this is that the slice will start
> on a block that is aligned to the old CHS values for backwards
> compatibility.

I understand that it is useful to have some backward compatibility with 
some really old systems, but I think it should be user's choice and not 
forced policy.
And what is really confusing is that interactive fdisk allows it and non 
interactive not (more used by advanced users). So we have foot shooting 
for beginers and forced backward compatibility for advanced users 
disallowing restore of perfectly working setup from scripts etc.

Not to mention that we don't need any compatibility with other (older) 
systems on servers where FreeBSD is the only OS used. It is something 
similar to allow more than 8 BSD partitions, which is not backward 
compatible with older FreeBSD releases or other systems using UFS with 
MBR+BSD partitions.

> When gpart -a4k is used to create FreeBSD partitions inside that slice,
> those partitions will be 4K aligned.

OK, BSD partitions inside MBR slices are aligned.

Miroslav Lachman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50C88726.4090105>