From owner-freebsd-current@FreeBSD.ORG Fri Sep 13 11:34:34 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DA108B39 for ; Fri, 13 Sep 2013 11:34:34 +0000 (UTC) (envelope-from supportme@ukr.net) Received: from fmd2s.ukr.net (fmd2s.ukr.net [195.214.192.44]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8AA502B9F for ; Fri, 13 Sep 2013 11:34:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=ffe; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:To:Subject:From:Date; bh=hYZeVfFMhztCPK89UYcnBGzEIMYhjs8sYVJPDs93Lyo=; b=AkWY3F1EOHr8c45ro9HnbMoe2TypVvJ33v3pbS/dVjbjW2dnILQEKgx4XGjAXsJWiNW+9p4CdDEo9Udbx5KpgcOefDdZcSVTujSYiOmlP/DPc7ApIzu7MvCjkaeau5NvSCxt+iRsWdPwxg/y57eGhFUZUveDDo66e3wifAc+uQ8=; Received: from [10.0.10.112] (helo=fmst-6.ukr.net) by fmd2s.ukr.net with smtp ID 1VKRMP-000Ch3-Ks for freebsd-current@freebsd.org; Fri, 13 Sep 2013 14:16:25 +0300 Date: Fri, 13 Sep 2013 14:16:24 +0300 From: Dmitryy Makarov Subject: ZFS secondarycache on SSD problem on r255173 To: freebsd-current@freebsd.org X-Mailer: freemail.ukr.net 5.0 Message-Id: <1379069539.824504225.3b9xwugp@fmst-6.ukr.net> MIME-Version: 1.0 Received: from supportme@ukr.net by fmst-6.ukr.net; Fri, 13 Sep 2013 14:16:25 +0300 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: binary Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 13 Sep 2013 11:34:34 -0000 Hello, FreeBSD Current. Have some trouble with adding SSD drive as secondarycache device on 10.0-CURRENT FreeBSD 10.0-CURRENT #1 r255173 : SSD INTEL SSDSC2BW180A4 dmesg: ada1 at ahcich2 bus 0 scbus4 target 0 lun 0 ada1: ATA-9 SATA 3.x device ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada1: Command Queueing enabled ada1: 171705MB (351651888 512 byte sectors: 16H 63S/T 16383C) ada1: quirks=0x1<4K> ada1: Previously was known as ad8 # diskinfo -v /dev/ada1 /dev/ada1         512             # sectorsize         180045766656    # mediasize in bytes (167G)         351651888       # mediasize in sectors         4096            # stripesize         0               # stripeoffset         348861          # Cylinders according to firmware.         16              # Heads according to firmware.         63              # Sectors according to firmware.         BTDA326504N51802GN      # Disk ident. Creating partition and adding: # gpart create -s gpt ada1 # gpart add -t freebsd-zfs -s3G -l zil0 ada1 # gpart add -t freebsd-zfs  -l cache0 ada1 # zpool add disk1 log /dev/gpt/zil0 # zpool add disk1 cache /dev/gpt/cache0 After that have:       log            gpt/zil0                                  ONLINE       0     0     0      cache           gpt/cache0    ONLINE       0     0     0  block size: 512B configured, 4096B native But why? ZFS can't properly set sector size for cache device (quirks=0x1<4K>)? And have some strange behavior with ZIl partition on the same SSD - everything works! Okay, was trying to do some workaround with GNOP: # gnop create -S4096 /dev/gpt/cache0 # zpool add disk1 cache /dev/gpt/cache0.nop Seems to be OK  cache           gpt/cache0.nop    ONLINE       0     0     0 But after reboot pool has status:One or more devices are configured to use a non-native block size.         Expect reduced performance. cache           gptid/39e40c33-1c4d-11e3-ac20-002590aa9548  ONLINE       0     0     0  block size: 512B configured, 4096B native And no gnop parts was found, and even gpart (in /dev/gpart) # gnop status # gnop: Command 'status' not available. # gpart show -l ada1 =>  34  351651821  ada1  GPT  (167G)          34          6        - free -  (3.0k)          40    6291456     1  zil0  (3.0G)     6291496  345360352     2  cache0  (164G)   351651848          7        - free -  (3.5k) # ls /dev/gpt/cache* zsh: no matches found: /dev/gpt/cache* Please, help to deal with this problem. Or what else information can be useful to find out this trouble. From owner-freebsd-current@FreeBSD.ORG Fri Sep 13 12:18:13 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F102249A; Fri, 13 Sep 2013 12:18:12 +0000 (UTC) (envelope-from prvs=1968c3207d=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6DEE32E3B; Fri, 13 Sep 2013 12:18:12 +0000 (UTC) Received: from r2d2 ([82.69.141.170]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50005951420.msg; Fri, 13 Sep 2013 13:18:04 +0100 X-Spam-Processed: mail1.multiplay.co.uk, Fri, 13 Sep 2013 13:18:04 +0100 (not processed: message from valid local sender) X-MDDKIM-Result: neutral (mail1.multiplay.co.uk) X-MDRemoteIP: 82.69.141.170 X-Return-Path: prvs=1968c3207d=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk Message-ID: From: "Steven Hartland" To: "Dmitryy Makarov" , , "Justin T. Gibbs" References: <1379069539.824504225.3b9xwugp@fmst-6.ukr.net> Subject: Re: ZFS secondarycache on SSD problem on r255173 Date: Fri, 13 Sep 2013 13:18:24 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 13 Sep 2013 12:18:13 -0000 This is a recent bit of code by Justin cc'ed, so he's likely the best person to investigate this one. Regards Steve ----- Original Message ----- From: "Dmitryy Makarov" To: Sent: Friday, September 13, 2013 12:16 PM Subject: ZFS secondarycache on SSD problem on r255173 > Hello, FreeBSD Current. > > Have some trouble with adding SSD drive as secondarycache device on 10.0-CURRENT FreeBSD 10.0-CURRENT #1 r255173 : > SSD INTEL SSDSC2BW180A4 > > dmesg: > ada1 at ahcich2 bus 0 scbus4 target 0 lun 0 > ada1: ATA-9 SATA 3.x device > ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) > ada1: Command Queueing enabled > ada1: 171705MB (351651888 512 byte sectors: 16H 63S/T 16383C) > ada1: quirks=0x1<4K> > ada1: Previously was known as ad8 > > > # diskinfo -v /dev/ada1 > /dev/ada1 > 512 # sectorsize > 180045766656 # mediasize in bytes (167G) > 351651888 # mediasize in sectors > 4096 # stripesize > 0 # stripeoffset > 348861 # Cylinders according to firmware. > 16 # Heads according to firmware. > 63 # Sectors according to firmware. > BTDA326504N51802GN # Disk ident. > > Creating partition and adding: > # gpart create -s gpt ada1 > # gpart add -t freebsd-zfs -s3G -l zil0 ada1 > # gpart add -t freebsd-zfs -l cache0 ada1 > # zpool add disk1 log /dev/gpt/zil0 > # zpool add disk1 cache /dev/gpt/cache0 > > After that have: > log > > gpt/zil0 ONLINE 0 0 0 > cache > gpt/cache0 ONLINE 0 0 0 block size: 512B configured, 4096B native > > But why? ZFS can't properly set sector size for cache device (quirks=0x1<4K>)? > And have some strange behavior with ZIl partition on the same SSD - everything works! > > > Okay, was trying to do some workaround with GNOP: > # gnop create -S4096 /dev/gpt/cache0 > # zpool add disk1 cache /dev/gpt/cache0.nop > > Seems to be OK > cache > gpt/cache0.nop ONLINE 0 0 0 > > But after reboot pool has > status:One or more devices are configured to use a non-native block size. > Expect reduced performance. > > cache > gptid/39e40c33-1c4d-11e3-ac20-002590aa9548 ONLINE 0 0 0 block size: 512B configured, 4096B native > > And no gnop parts was found, and even gpart (in /dev/gpart) > > # gnop status > # gnop: Command 'status' not available. > > # gpart show -l ada1 > => 34 351651821 ada1 GPT (167G) > 34 6 - free - (3.0k) > 40 6291456 1 zil0 (3.0G) > 6291496 345360352 2 cache0 (164G) > 351651848 7 - free - (3.5k) > > # ls /dev/gpt/cache* > zsh: no matches found: /dev/gpt/cache* > > > Please, help to deal with this problem. > Or what else information can be useful to find out this trouble. > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk.