From owner-freebsd-fs@FreeBSD.ORG Thu Nov 6 13:03:50 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C07EDEDC for ; Thu, 6 Nov 2014 13:03:50 +0000 (UTC) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 56F0FBE5 for ; Thu, 6 Nov 2014 13:03:49 +0000 (UTC) Received: by mail-wi0-f182.google.com with SMTP id d1so1406955wiv.9 for ; Thu, 06 Nov 2014 05:03:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=5gY53iFYlj4nYgkUsi3fsYsH83OCtYLEEpBZjO9fxbk=; b=aqKhWRtwxzlUPzrhac3QjVB9TnbJhddkZ8aft0wqgb4wfUtYL1nCyoDVfZh+xwAYWO NGn1bw5J0m+xDY/FYm6Sf/QdcPfnQdQrbHNL1Jz1Sec4boLyzKxWYYNuaqkCkxsqdFP5 +To1MrlxfVx/WDAAEMR12/bH5+20xntVMxQY10+OYwKLGcFPsSmIUSkW/FnKzeKJNAII tePELZeYJ3IayjRkJ5GDbZBznkazNLgbEaIw6WTCQ02COkzJeIVDJvAO9HVwr7QuEkme pYHauZrezKoBk28J5a51ceaebMRN5x7vxI6x9JAptwaHsuom6z35TkjyaGLuuJm/GIxj VRDQ== X-Gm-Message-State: ALoCoQmBgd4xVWRiTxQuoYYVWr/0yYh9qmHI5lSGCep7jZk2tvVxDt2hGjS/xcWnZBMPLS/IVZi2 X-Received: by 10.194.184.140 with SMTP id eu12mr5242536wjc.47.1415279022017; Thu, 06 Nov 2014 05:03:42 -0800 (PST) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id ht9sm19460236wib.8.2014.11.06.05.03.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Nov 2014 05:03:41 -0800 (PST) Message-ID: <545B715A.5060804@multiplay.co.uk> Date: Thu, 06 Nov 2014 13:02:18 +0000 From: Steven Hartland User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: freebsd-fs@freebsd.org Subject: Re: ZFS bug: Creating ZIL ignores vfs.zfs.min_auto_ashift References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Nov 2014 13:03:50 -0000 Your zdb output looks strange you have two children[1] entries are you sure your pool is not corrupt? On 06/11/2014 11:01, Borja Marcos wrote: > > Hi, > > I have noticed that ZIL creation _ignores_ the vfs.zfs.min_auto_ashift variable. ZIL and cache on SSDs should use > this variable in order to apply the optimum sector size on SSDs or so-called advanced format drives. > > The system is: > root@splunk:/ # uname -a > FreeBSD splunk 10.1-PRERELEASE FreeBSD 10.1-PRERELEASE #12: Tue Nov 4 11:22:48 CET 2014 root@splunk:/usr/obj/usr/src/sys/SPLUNK10 amd64 > > > > Example: > > # sysctl vfs.zfs.min_auto_ashift=12 > > # zpool status //// Just a common mirror with two hard disks > pool: rpool > state: ONLINE > scan: scrub repaired 0 in 5h55m with 0 errors on Wed Oct 29 23:26:03 2014 > config: > > NAME STATE READ WRITE CKSUM > rpool ONLINE 0 0 0 > mirror-0 ONLINE 0 0 0 > ada0p3 ONLINE 0 0 0 > ada2p3 ONLINE 0 0 0 > > errors: No known data errors > > > # zpool add rpool log ada1 > > # zpool status > pool: rpool > state: ONLINE > scan: scrub repaired 0 in 5h55m with 0 errors on Wed Oct 29 23:26:03 2014 > config: > > NAME STATE READ WRITE CKSUM > rpool ONLINE 0 0 0 > mirror-0 ONLINE 0 0 0 > ada0p3 ONLINE 0 0 0 > ada2p3 ONLINE 0 0 0 > logs > ada1 ONLINE 0 0 0 > > errors: No known data errors > > > ///// There it is, but > > # zdb | more > version: 5000 > name: 'rpool' > state: 0 > txg: 11738986 > pool_guid: 18110845055860026534 > hostid: 316898903 > hostname: 'splunk' > vdev_children: 2 > vdev_tree: > type: 'root' > id: 0 > guid: 18110845055860026534 > children[0]: > type: 'mirror' > id: 0 > guid: 10858793804082837265 > metaslab_array: 30 > metaslab_shift: 32 > ashift: 12 > asize: 482922987520 > is_log: 0 > create_txg: 4 > children[0]: > type: 'disk' > id: 0 > guid: 10490056043151312448 > path: '/dev/ada0p3' > phys_path: '/dev/ada0p3' > whole_disk: 1 > DTL: 331 > create_txg: 4 > children[1]: > type: 'disk' > id: 1 > guid: 2441255496794840851 > path: '/dev/ada2p3' > phys_path: '/dev/ada2p3' > whole_disk: 1 > DTL: 252 > create_txg: 4 > children[1]: > type: 'disk' > id: 1 > guid: 3564614139316480036 > path: '/dev/ada1' > id: 1 > guid: 2441255496794840851 > path: '/dev/ada2p3' > phys_path: '/dev/ada2p3' > whole_disk: 1 > DTL: 252 > create_txg: 4 > children[1]: > type: 'disk' > id: 1 > guid: 3564614139316480036 > path: '/dev/ada1' > phys_path: '/dev/ada1' > whole_disk: 1 > metaslab_array: 0 > metaslab_shift: 0 > ashift: 9 <======================= WRONG, SHOULDN'T IT BE 12?? > asize: 40015757312 > is_log: 1 > create_txg: 11738986 > features_for_read: > com.delphix:hole_birth > com.delphix:embedded_data > > > > If, however, I do the gnop trick, > > # gnop create -S 4K ada1 > # zpool add rpool log ada1.nop > # zpool status > > pool: rpool > state: ONLINE > scan: scrub repaired 0 in 5h55m with 0 errors on Wed Oct 29 23:26:03 2014 > config: > > NAME STATE READ WRITE CKSUM > rpool ONLINE 0 0 0 > mirror-0 ONLINE 0 0 0 > ada0p3 ONLINE 0 0 0 > ada2p3 ONLINE 0 0 0 > logs > ada1.nop ONLINE 0 0 0 > > errors: No known data errors > > > this time our mirror has the ashift we wanted, 12. > > children[1]: > type: 'disk' > id: 1 > guid: 6487094506120463221 > path: '/dev/ada1.nop' > phys_path: '/dev/ada1.nop' > whole_disk: 1 > metaslab_array: 0 > metaslab_shift: 0 > ashift: 12 > asize: 40015757312 > is_log: 1 > create_txg: 11739034 > > > > The disks I am playing with are: > > # camcontrol devlist > at scbus0 target 0 lun 0 (ada0,pass0) > at scbus1 target 0 lun 0 (ada1,pass1) > at scbus2 target 0 lun 0 (ada2,pass2) > at scbus3 target 0 lun 0 (ada3,pass3) > > > And yes, I know the two hard disks have different sector sizes but I created the pool with an ashift of 12. > > > > > > > Borja. > > > > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"