From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 22 11:00:32 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 535351065697 for ; Mon, 22 Aug 2011 11:00:32 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 370F38FC28 for ; Mon, 22 Aug 2011 11:00:25 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QvS0R-0004QN-1n for freebsd-hackers@freebsd.org; Mon, 22 Aug 2011 12:45:23 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Aug 2011 12:45:22 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Aug 2011 12:45:22 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Mon, 22 Aug 2011 12:45:08 +0200 Lines: 31 Message-ID: References: <4E4D50CD.5080806@rawbw.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101102 Thunderbird/3.1.6 In-Reply-To: X-Enigmail-Version: 1.1.2 Subject: Re: ZFS installs on HD with 4k physical blocks without any warning as on 512 block size device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2011 11:00:32 -0000 On 19/08/2011 14:21, Aled Morris wrote: > On 19 August 2011 11:15, Tom Evans wrote: > >> On Thu, Aug 18, 2011 at 6:50 PM, Yuri wrote: >>> Some latest hard drives have logical sectors of 512 byte when they >> actually >>> have 4k physical sectors. >> > ... >> Shouldn't UFS and ZFS drivers be able to either read the right sector size > >>> from the underlying device or at least issue a warning? >> >> The device never reports the actual sector size, so unless FreeBSD >> keeps a database of 4k sector hard drives that report as 512 byte >> sector hard drives, there is nothing that can be done. >> > At what point should we change the default in newfs/zfs to 4k? It is already changed for UFS in 9. > I guess formatting the filesystem for 4k sectors on a 512b drive would still > work but it would be suboptimal. What would the performance penalty be in > reality? It would be suboptimal but only for the slight waste of space that would have otherwise been reclaimed if the block or fragment size remained 512 or 2K. This waste of space is insignificant for the vast majority of users and there are no performance penalties, so it seems that switching to 4K sectors by default for all file systems would actually be a good idea.