Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Feb 2011 19:38:19 +0700
From:      Edho P Arief <edhoprima@gmail.com>
To:        Kurt Jaeger <lists@c0mplx.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: 3TB disc and block alignment
Message-ID:  <AANLkTi=QMXvFtTyY9BUGg56VtTuac3G_0LnXaVboJQQz@mail.gmail.com>
In-Reply-To: <20110217115653.GH34314@home.opsec.eu>
References:  <20110217115653.GH34314@home.opsec.eu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 17, 2011 at 6:56 PM, Kurt Jaeger <lists@c0mplx.org> wrote:
> Hi!
>
> I have one of the new 3TB drives:
>
> da0: <Hitachi HUA723030ALA640 > 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/<randomgarbage>
# 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=QMXvFtTyY9BUGg56VtTuac3G_0LnXaVboJQQz>