From owner-freebsd-fs@FreeBSD.ORG Mon Feb 28 23:13:34 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E355E106564A for ; Mon, 28 Feb 2011 23:13:34 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9E8808FC0A for ; Mon, 28 Feb 2011 23:13:34 +0000 (UTC) Received: by gxk7 with SMTP id 7so2013436gxk.13 for ; Mon, 28 Feb 2011 15:13:34 -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:date :message-id:subject:from:to:cc:content-type; bh=LQfGJyjJKbLIkoPvwnQb+W87X08s75vFxyGK1sh4M3g=; b=td/qsBXw4gZTiF7Fy20DQUR94OrZEn1zH0vf5SBkx18M832eqV9MGqh8aRU54Hn0Zd M/IpcmFxDsSvhkI2V6tRuYIevUHLl+2pGaXfmwLgWh1v/PzjrUDIFzuCGyVEmBTnkb8n 3yRzIw1wUgR+umMslrr5oSgKNZ5RqZuHS4Z/w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=C4Zjq9wB52kstHQXv5xg6E3JWGqhNwBd0UGwglj1UpwOfOEIugXcjIeJhqhq4JXfV8 8+P2UnNmGeVMOj9gSVzI1Nmoa26Vr35xITHz5uU57v7fmH1eIHZ8V3AT8aAhxmQE+eOA dsfsWVawFlCXjoXtKbRPbeQV6n9GN5UEzybbo= MIME-Version: 1.0 Received: by 10.100.32.2 with SMTP id f2mr2470935anf.177.1298934813848; Mon, 28 Feb 2011 15:13:33 -0800 (PST) Received: by 10.100.171.8 with HTTP; Mon, 28 Feb 2011 15:13:33 -0800 (PST) In-Reply-To: References: <4D6AAC9A.4000602@jrv.org> Date: Mon, 28 Feb 2011 15:13:33 -0800 Message-ID: From: Freddie Cash To: Emil Smolenski Content-Type: text/plain; charset=UTF-8 Cc: freebsd-fs@freebsd.org Subject: Re: [ZFS] Booting from zpool created on 4k-sector drive X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2011 23:13:35 -0000 On Mon, Feb 28, 2011 at 12:08 PM, Emil Smolenski wrote: > On Sun, 27 Feb 2011 20:57:14 +0100, James R. Van Artsdalen > 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