From owner-freebsd-questions@FreeBSD.ORG Tue Nov 13 08:09:29 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C514EDD for ; Tue, 13 Nov 2012 08:09:29 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from blue.qeng-ho.org (blue.qeng-ho.org [217.155.128.241]) by mx1.freebsd.org (Postfix) with ESMTP id 746398FC08 for ; Tue, 13 Nov 2012 08:09:28 +0000 (UTC) Received: from fileserver.home.qeng-ho.org (localhost [127.0.0.1]) by fileserver.home.qeng-ho.org (8.14.5/8.14.5) with ESMTP id qAD89FOA014850; Tue, 13 Nov 2012 08:09:15 GMT (envelope-from freebsd@qeng-ho.org) Message-ID: <50A2002B.9040003@qeng-ho.org> Date: Tue, 13 Nov 2012 08:09:15 +0000 From: Arthur Chance User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121029 Thunderbird/16.0.2 MIME-Version: 1.0 To: Polytropon Subject: Re: Advanced Format Drive ? References: <20121113065602.ee2310d7.freebsd@edvax.de> <86166.1352787251@tristatelogic.com> <20121113073030.87bc0608.freebsd@edvax.de> In-Reply-To: <20121113073030.87bc0608.freebsd@edvax.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org, "Ronald F. Guilmette" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 08:09:29 -0000 On 11/13/12 06:30, Polytropon wrote: > On Mon, 12 Nov 2012 22:14:11 -0800, Ronald F. Guilmette wrote: >> Which "partitions" need to be aligned to the 4KB boundaries? >> The FreeBSD ones, the MBR ones, or both? > > The partitions, all of them. :-) > > For MBR partitions, the "DOS primary partitions", which are > slices, you typically only need one if you want to stay in > compatibility mode. For dedicated mode, you don't need it. > > The slice typically starts in sector 63 and occupies the > space until the end of the device. > > The partitions within the slice should have sizes of > multiples of 1 MB or 1 GB (which makes them multiples > of 4k easily). > > See: > http://www.freebsd.org/doc/handbook/bsdinstall-partitioning.html > > Even though the handbook elaborates on the GPT approach, it > will work with traditional disklabel partitioning too. > > Note that 4k = 8 x 512 byte, and so 64 sectors would be a > good alignment "grid", while 63 sectors is not. That implies > that in case you use fdisk to create a slice holding your > partitions, try to make it start at sector 64 (63 would > have been the default). > > After that, use bsdlabel to create the partitions inside > the slice as you want. Make them multiples of 1M or 1G, > that should be no big deal because disks are big and cheap > today. :-) > > You can then easily use newfs with the -f parameter: > > newfs -U -f 4096 > > This will make sure the proper fragment size will be applied > upon formatting the created partitions. > > Also see: > http://www.wonkity.com/~wblock/docs/html/disksetup.html > > As I have limited experience, anyone having more practical > experience with this matter is welcome to comment. :-) According to the manual as of 9.0-RELEASE the default fragment and block sizes for newfs are 4k and 32k, so provided your partitions/slices are 4k aligned everything Should Just Work. Before 9.0 fragments and blocks were 2k and 16k which doesn't play so well with 4k drives.