From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 19 10:45:04 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 40144106566C for ; Fri, 19 Aug 2011 10:45:04 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id F1D768FC17 for ; Fri, 19 Aug 2011 10:45:03 +0000 (UTC) Received: by vws18 with SMTP id 18so2991212vws.13 for ; Fri, 19 Aug 2011 03:45:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=GcRrTTgJggLYJ9hMR3AwhaE7AghTbL3HWVpS6N59P4A=; b=CwRXh24ls/0mHSMlWo7zIC1OXDG+DD2RfKGx/7gUj7RL8VAA9eQoSjVtOn1Th6P/4v 5S1XDzRiAbPx7jJZEQTy3uu1neTx/EEwyoUCqmJWYnpafvj5wnFZOtyFQGws24ZaBkvQ 0uyYuDNRNgQDBVKLRljw8ogWEFT9LZAubuu/s= MIME-Version: 1.0 Received: by 10.52.182.165 with SMTP id ef5mr1899978vdc.346.1313748930344; Fri, 19 Aug 2011 03:15:30 -0700 (PDT) Received: by 10.52.162.73 with HTTP; Fri, 19 Aug 2011 03:15:30 -0700 (PDT) In-Reply-To: <4E4D50CD.5080806@rawbw.com> References: <4E4D50CD.5080806@rawbw.com> Date: Fri, 19 Aug 2011 11:15:30 +0100 Message-ID: From: Tom Evans To: Yuri Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org 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: Fri, 19 Aug 2011 10:45:04 -0000 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. Here is the document describing what to do in such > case: > http://ivoras.net/blog/tree/2011-01-01.freebsd-on-4k-sector-drives.html . > For UFS: newfs -U -f 4096 /dev/da0 > For ZFS: gnop create -S 4096 /dev/da0 && zpool create data /dev/da0.nop > > I am sure most people just install such hard drive without doing this and > potentially get suboptimal performance since they aren't aware about this. > 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? > > Yuri 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. Cheers Tom