Advanced Format Drive ?

Ronald F. Guilmette rfg at tristatelogic.com
Thu Nov 15 21:51:41 UTC 2012


In message <alpine.BSF.2.00.1211150828040.62459 at wonkity.com>, 
Warren Block <wblock at wonkity.com> wrote:

>On Thu, 15 Nov 2012, Ronald F. Guilmette wrote:
>> In your tutorial document, you say:
>>
>>     "Create a boot partition to hold the loader, size of 512K."
>>
>> How big is that thing (gpart boot loader), actually?  Half a megabyte
>> seems rather a bit large-ish, certainly relative to ye olde MBR loader,
>> which I gather was limited to... what?  32KB (minus a little for the
>> partition table) ?
>
>/boot/gptboot is 15K, /boot/gptzfsboot is 39K.  A code limitation makes 
>512K the largest this partition can be made.  So I make it that big so 
>it won't have to be increased for bigger boot loaders later.

It wouldn't hurt to add the above info to your tutorial page.

>And the space is not wasted because of the next partition...

Huh?

Oh, oh, OK.  I read down to the end of your message and now understand.
You meant that the space is not wasted because you will subsequently
arrange to have the next following partition begin at 1MB, yes?

>> Also, when creating the partition to hold the GPT boot loader, shouldn't
>> that "gpart add" operation include a "-b 4k" option, you know, on a
>> modern "Advanced Format" disk?  If not, why not?
>
>-a 4k, yes.

Yea.  Sorry.  That's what I meant... -a 4k.

>It doesn't really matter.  The loader is read only at boot, 
>once, and it's tiny.  So it doesn't really matter if it reads at 
>30M/second or 500M/second.

OK.  I understand.  Thanks.  (I did supect that this was the rationale.)

>But yes, for consistency, I'll modify that 
>so the start of the freebsd-boot partition is at 40.

It looks prettier that way.

Besides which, you probably want to get your readers in the habit of
doing things generally on 4KB boundaries, because (as I have just learned)
they are probably going to need to start doing that before too long, even
if they don't already need to just yet.

>> You also go on to say:
>>
>>     "Create partition for /. It should start at the 1M boundary for proper
>>     sector alignment on 4K sector drives."
>>
>> Come again?  Sorry, but you just lost me entirely.  In order to get "proper
>> sector alignment" on one of these newer Advanced Format (4k) drives, why
>> on earth should it be necessary to begin a partition at some alignment
>> which is greater than the obvious minimum, i.e. 4KB ?
>
>Starting the first filesystem partition at 1M is a semi-standard, used 
>by various vendors including Microsoft.

Yeabut why or how does Microsoft get involved at all with the position
of my *FreeBSD* partition?!?

If I began my FreeBSD partition at, say 768KB, would anything from
Microsoft be even likely to even notice?

>Besides being aligned to 4K, it's also aligned to bigger values
>that can be important for performance on devices like SSDs.

I see.  That's also another useful tidbit of knowledge that you may also
wish to impart to readers of your tutorial.  I can only speak for myself,
but I for one (perhaps because I have never owned an SSD myself) was
totally unaware that those had any such additional alignment issues.

>And that explains the oversized boot partition.  It's space that would 
>be unused otherwise.

Got it.  Thanks.


Regards,
rfg


P.S.  I really do think that it is a serious omission that the gpart(8)
man page doesn't really say anything regarding proper or desirable use
of the "add -a" option.  If it were up to me, I'd put in just a couple
of short notes that would say at least something about 4K being Good and
Desirable for modern drives, and 1M being Good and Desirable for SSDs.

But maybe that kind of info does really belong in something more like
an actual tutorial document... you know... something like, um, your's.


More information about the freebsd-questions mailing list