Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Nov 2014 15:07:43 +0100
From:      "Patrick M. Hausen" <hausen@punkt.de>
To:        "freebsd-stable@freebsd.org List" <freebsd-stable@freebsd.org>
Subject:   10.1 fresh install and 4k alignment
Message-ID:  <A2328132-EC43-4E27-8D01-A4D774634598@punkt.de>

next in thread | raw e-mail | index | archive | help

Hi, all,

I just installed a new machine with 10.1-RELEASE using the memstick installer
and chosing ZFS mirror root as the disk layout.

I did check the "4k" option, watched the installer do the necessary gnop dance
and the pool seems to be OK:

root@seleniumhub:~ # zdb | grep ashift
            ashift: 12

But this puzzles me a bit:

root@seleniumhub:~ # gpart list ada0
   Mediasize: 524288 (512K)
   Sectorsize: 512
...
Providers:
1. Name: ada0p1
   Mediasize: 524288 (512K)
   Sectorsize: 512
...
   end: 1057
   start: 34
...
3. Name: ada0p3
   Mediasize: 465747565056 (434G)
   Sectorsize: 512
...
   type: freebsd-zfs
...
   end: 976773134
   start: 67109922

None of the start sector numbers is a multiple of 8, neither are the end sectors
a multiple of 8 minus 1.

So the pool uses a 4k block size but it starts on an odd multiple of 2k on the platter
- do I see this correctly?

Isn't it absolutely necessary that the simulated 4k blocks are laid out so that the first
is made from 512 byte sectors 0-7, the second from 8-15 and so on?

Then why does the installer start the first partition at 512 byte sector 34? While I'm at
it, this magic number is everywhere in the older documentation, e.g. for manually
installing FreeBSD 8 with gptzfsboot - where does that 34 come from? It's not
a power of 2 nor is it one of the historical CHS magic numbers that would mean
a cylinder boundary or similar. Size of the GPT partition table itself?

Is this a bug in the installer? Will I still have to layout the disks manually if I want 4k
alignment? What's a good offset for the first partition in this case? Anything bigger
than 34 that's a multiple of 8 - 40 or 64?

Thanks in advance
Patrick
-- 
punkt.de GmbH * Kaiserallee 13a * 76133 Karlsruhe
Tel. 0721 9109 0 * Fax 0721 9109 100
info@punkt.de       http://www.punkt.de
Gf: Jürgen Egeling      AG Mannheim 108285






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A2328132-EC43-4E27-8D01-A4D774634598>