Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Feb 2011 15:13:33 -0800
From:      Freddie Cash <fjwcash@gmail.com>
To:        Emil Smolenski <am@raisa.eu.org>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: [ZFS] Booting from zpool created on 4k-sector drive
Message-ID:  <AANLkTi=w9_d=2W_-_F62AxenmdBs7rE%2BbVAbmR2e877y@mail.gmail.com>
In-Reply-To: <op.vrmp2hrck84lxj@bolt.zol>
References:  <op.vn2iid1qk84lxj@arrow> <4D6AAC9A.4000602@jrv.org> <op.vrmp2hrck84lxj@bolt.zol>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 28, 2011 at 12:08 PM, Emil Smolenski <am@raisa.eu.org> wrote:
> On Sun, 27 Feb 2011 20:57:14 +0100, James R. Van Artsdalen
> <james-freebsd-fs2@jrv.org> wrote:
>> Emil Smolenski wrote:
>>> There is a hack to force zpool creation with minimum sector size equal
>>> to 4k:
>>>
>>> # gnop create -S 4096 ${DEV0}
>>> # zpool create tank ${DEV0}.nop
>>> # zpool export tank
>>> # gnop destroy ${DEV0}.nop
>>> # zpool import tank
>>>
>>> This change is permanent. The only possibility to change the value of
>>> ashift is: zpool destroy/create and restoring pool from backup.
>>
>> Is ashift a property of the pool or a property of the device?
>
> It is property of the ZFS pool. It is calculated when the pool is created
> based on the sector size advertised by devices.

Can you point to where in the source this is set?  And where it's used?

I'd like to have this confirmed once and for all.  :)

I've seen conflicting reports around the web that it's a per-vdev
setting and that it's a per-pool setting.

For example, this thread in the FreeBSD Forums shows it to be a
per-vdev setting:
https://forums.freebsd.org/showthread.php?t=21644

Yet many threads on the zfs-discuss mailing list say it's a per-pool
setting based on the first vdev added to the pool.

>> I'm wonder about the disk replacement scenario, where the replacement
>> disk cannot be smaller than the disk it replaces.
>
> And the new disk must advertise sector size equal or smaller than
> 2**ashift of the existing pool.

Why?  What's the harm in running with ashift=12 (4 KB) on a drive that
uses 0.5 KB sectors?  Wouldn't that be the best setup to use, to
future-proof the pool?

-- 
Freddie Cash
fjwcash@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=w9_d=2W_-_F62AxenmdBs7rE%2BbVAbmR2e877y>