Date: Fri, 19 Aug 2011 13:58:49 +0200 From: Pieter de Goeje <pdegoeje@service2media.com> To: freebsd-hackers@freebsd.org Cc: Tom Evans <tevans.uk@googlemail.com>, Yuri <yuri@rawbw.com> Subject: Re: ZFS installs on HD with 4k physical blocks without any warning as on 512 block size device Message-ID: <201108191358.49285.pdegoeje@service2media.com> In-Reply-To: <CAFHbX1K%2BRuzBKouAbN0%2BSCOSAkGNdgMzC92YN7GeKn_pD=J=tg@mail.gmail.com> References: <4E4D50CD.5080806@rawbw.com> <CAFHbX1K%2BRuzBKouAbN0%2BSCOSAkGNdgMzC92YN7GeKn_pD=J=tg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Friday, August 19, 2011 12:15:30 PM Tom Evans wrote: > On Thu, Aug 18, 2011 at 6:50 PM, Yuri <yuri@rawbw.com> 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 In -current at least there is a quirk table for these drives - the stripe size is set to 4K. Other tools use this size to align stuff on. Also, the default fragment size of UFS was increased to 4K. - Pieter
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108191358.49285.pdegoeje>