From owner-freebsd-stable@FreeBSD.ORG Thu Feb 17 13:07:58 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C1A41065673 for ; Thu, 17 Feb 2011 13:07:58 +0000 (UTC) (envelope-from edhoprima@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 56A928FC0A for ; Thu, 17 Feb 2011 13:07:58 +0000 (UTC) Received: by qyg14 with SMTP id 14so1627407qyg.13 for ; Thu, 17 Feb 2011 05:07:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=HqP7B1f3vIlDywNWI8+bcFVpNPBMjoSLcBOnGTbqlzw=; b=o8ftnKOBd0WfXy/DAK5Ijf03aWIUwbRbh7ty4OeweRTgZ4ycHGawFZHXgaIxrzcJHv HhOLSM8YO2326XtRUx9DZhK77VuZBw9k+RomOenjU2rWgJFT3qXzQBxYFTk+FSnIbaZQ T1s8O22lxH1zeiDot7M5thvKJApBesDVghN/k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=bfgsAnqpE9UxKV0lYCEuRTKJGmkrxQG9KQiQHyWl36tMWrCCEhdpUHyoEloctTIP4s GXAqnoNt3pNHEJ/ZZA/4b87hMUgISCncGyJe2Z5G+XkqYOppmz05/SZx00/+fIsfwdD7 IjbeZuU1AlPBL4oJo3eBIMFwDw0+oj2DD/hu8= Received: by 10.224.60.68 with SMTP id o4mr2518485qah.12.1297946319775; Thu, 17 Feb 2011 04:38:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.213.141 with HTTP; Thu, 17 Feb 2011 04:38:19 -0800 (PST) In-Reply-To: <20110217115653.GH34314@home.opsec.eu> References: <20110217115653.GH34314@home.opsec.eu> From: Edho P Arief Date: Thu, 17 Feb 2011 19:38:19 +0700 Message-ID: To: Kurt Jaeger Content-Type: text/plain; charset=UTF-8 Cc: freebsd-stable@freebsd.org Subject: Re: 3TB disc and block alignment X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2011 13:07:58 -0000 On Thu, Feb 17, 2011 at 6:56 PM, Kurt Jaeger wrote: > Hi! > > I have one of the new 3TB drives: > > da0: Fixed Direct Access SCSI-5 device > da0: 2861588MB (5860533168 512 byte sectors: 255H 63S/T 364801C) > > Now as far as I understand, one can operate it with many 512byte blocks > or one can try to use the internal 4kbyte blocks. > > How would one do that with FreeBSD ? > ...I think it goes like this. ZFS: >>>create GPT # gpart create -s gpt da0 >>>add partition, start at 4k-aligned sector # gpart add -t freebsd-zfs -b 1024 da0 >>>create NOP device for simulating 4k sector # gnop create -S 4096 da0p1 >>>create zfs pool and export # zpool create mydata da0p1.nop # zpool export mydata >>>destroy the NOP since it's only needed to set ashift=12 when creating the pool # gnop destroy da0p1.nop >>>optional, but I use this to ensure the pool imports da0p1, not gpt-id/ # dd if=/dev/da0p1 of=/dev/null bs=1M count=1 >>>import back the pool # zpool import mydata UFS: >>>create GPT # gpart create -s gpt da0 >>>create partition, with start position 4k-aligned # gpart add -t freebsd-ufs -b 1024 -l mydata da0 >>>default newfs is good enough # newfs -U /dev/gpt/mydata corrections welcome.