From owner-freebsd-current@freebsd.org Tue Dec 26 17:13:13 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88E69EA33CE for ; Tue, 26 Dec 2017 17:13:13 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x235.google.com (mail-lf0-x235.google.com [IPv6:2a00:1450:4010:c07::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F1F017EEAB; Tue, 26 Dec 2017 17:13:12 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x235.google.com with SMTP id m20so26996279lfi.6; Tue, 26 Dec 2017 09:13:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=U9onzC+Cvc9K8TuspE1RPf8Ud+mdzimjNoVq0gr+Fwo=; b=bk+ebrdIPC1lsgbEUOwJUreu6tIUz75BvPMqJ2u/a/UjsZXeGaXOTut9jjJMORNG4Q wnPDZbJaOR1JBKHArKiIu85wJDHarKjLiNyUf5KJYTWqEz07+lzLERUpcsyoUYv9TxE7 QnDDAgNaDMJ5pQs8zBoOpK6WlCnYlaN4K5otsxJ8OT4SSre06Wig3CP1cHkG1fIOS7ee CNcdJM3fynnVMnsfZyzLPGjFolzLDo8P8pzHoZ1iMiIBnPkB7w4FZiwDJpyUzhuE5zxZ Qdqgnqn+MWqLIhEh/YffWDGA4B39xiS9jJXDPz9+lkuLNP29MZT4P0utRvYszWgfwric +7aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=U9onzC+Cvc9K8TuspE1RPf8Ud+mdzimjNoVq0gr+Fwo=; b=rplFQV+T9nfwciEJpJLwTazNA9/hmXmcSQVl4h5djejyk7WZ6p9/I026fCSzCAcZTi 8hpXm8KvHufNKGl2dVJ5fUHynEnJ4KPTyT25HhGb1HpKsLIlwc8+GkdKL5MAtiZUqPQ0 qt5oKXc5SzdnzUPQh/S79QX0FRAY0rJ7TqqtGXW0C0WZgBxrkEQWicPo+8FCNgx/y6Gs 1vddFce7oZgPFX440/qd26hA9cb1LvKk8K9zoazuFt9vpY78Wmjd0AwPLpleZFgfOVIr 5Ov0anv2GzN8KT31JxmGyvotW5K67dYYrpbpRnKkm8s+EPCaRT1kfH+a3bMmWLNkNpUr Efqw== X-Gm-Message-State: AKGB3mLt43mE1r6QpDHC8MmOMwnsgGfbi4GRfsdu+N0FW6PZQQZsoMIY wQ22c7JO40IBd1LXMs76v92fLdEhSnMAvn/zXX8= X-Google-Smtp-Source: ACJfBotGDRU4wmnW+nl+JbF5uE/aZs5HxXjjjlMPEKBu+rF+aISN3zm15Omrv2zCXjITpmoT54Q/tvm0mJuEoyAIFT8= X-Received: by 10.25.225.153 with SMTP id l25mr8935568lfk.110.1514308390458; Tue, 26 Dec 2017 09:13:10 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.76.19 with HTTP; Tue, 26 Dec 2017 09:13:09 -0800 (PST) In-Reply-To: <20171226180511.4d7d422e@thor.intern.walstatt.dynvpn.de> References: <20171226172521.611a89b0@thor.intern.walstatt.dynvpn.de> <20171226180511.4d7d422e@thor.intern.walstatt.dynvpn.de> From: Alan Somers Date: Tue, 26 Dec 2017 10:13:09 -0700 X-Google-Sender-Auth: 6TsfdigCNAZ0fpkbc_l00i8MF4o Message-ID: Subject: Re: ZFS: alignment/boundary for partition type freebsd-zfs To: "O. Hartmann" Cc: Allan Jude , FreeBSD CURRENT Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Dec 2017 17:13:13 -0000 On Tue, Dec 26, 2017 at 10:04 AM, O. Hartmann wrote: > Am Tue, 26 Dec 2017 11:44:29 -0500 > Allan Jude schrieb: > > > On 2017-12-26 11:24, O. Hartmann wrote: > > > Running recent CURRENT on most of our lab's boxes, I was in need to > replace and > > > restore a ZFS RAIDZ pool. Doing so, I was in need to partition the > disks I was about > > > to replace. Well, the drives in question are 4k block size drives with > 512b emulation > > > - as most of them today. I've created the only and sole partiton on > each 4 TB drive > > > via the command sequence > > > > > > gpart create -s GPT adaX > > > gpart add -t freebsd-zfs -a 4k -l nameXX adaX > > > > > > After doing this on all drives I was about to replace, something drove > me to check on > > > the net and I found a lot of websites giving "advices", how to prepare > large, modern > > > drives for ZFS. I think the GNOP trick is not necessary any more, but > many blogs > > > recommend to perform > > > > > > gpart add -t freebsd-zfs -b 1m -a 4k -l nameXX adaX > > > > > > to put the partition boundary at the 1 Megabytes boundary. I didn't do > that. My > > > partitions all start now at block 40. > > > > > > My question is: will this have severe performance consequences or is > that negligible? > > > > > > Since most of those websites I found via "zfs freebsd alignement" are > from years ago, > > > I'm a bit confused now an consideration performing all this > days-taking resilvering > > > process let me loose some more hair as the usual "fallout" ... > > > > > > Thanks in advance, > > > > > > Oliver > > > > > > > The 1mb alignment is not required. It is just what I do to leave room > > for the other partition types before the ZFS partition. > > > > However, the replacement for the GNOP hack, is separate. In addition to > > aligning the partitions to 4k, you have to tell ZFS that the drive is 4k: > > > > sysctl vfs.zfs.min_auto_ashift=12 > > > > (2^12 = 4096) > > > > Before you create the pool, or add additional vdevs. > > > > I didn't do the sysctl vfs.zfs.min_auto_ashift=12 :-(( when I created the > vdev. What is > the consequence for that for the pool? I lived under the impression that > this is necessary > for "native 4k" drives. > > How can I check what ashift is in effect for a specific vdev? > It's only necessary if your drive stupidly fails to report its physical sector size correctly, and no other FreeBSD developer has already written a quirk for that drive. Do "zdb -l /dev/adaXXXpY" for any one of the partitions in the ZFS raid group in question. It should print either "ashift: 12" or "ashift: 9". -Alan