Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Sep 2013 14:16:24 +0300
From:      Dmitryy Makarov <supportme@ukr.net>
To:        freebsd-current@freebsd.org
Subject:   ZFS secondarycache on SSD problem on r255173
Message-ID:  <1379069539.824504225.3b9xwugp@fmst-6.ukr.net>

next in thread | raw e-mail | index | archive | help
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: <INTEL SSDSC2BW180A4 DC02> 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: <owner-freebsd-current@FreeBSD.ORG>
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: <EAD621124C1549208BD93D20657E1BD0@multiplay.co.uk>
From: "Steven Hartland" <killing@multiplay.co.uk>
To: "Dmitryy Makarov" <supportme@ukr.net>, <freebsd-current@freebsd.org>,
 "Justin T. Gibbs" <gibbs@FreeBSD.org>
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
 <freebsd-current.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-current>, 
 <mailto:freebsd-current-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-current>;
List-Post: <mailto:freebsd-current@freebsd.org>
List-Help: <mailto:freebsd-current-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-current>,
 <mailto:freebsd-current-request@freebsd.org?subject=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" <supportme@ukr.net>
To: <freebsd-current@freebsd.org>
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: <INTEL SSDSC2BW180A4 DC02> 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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1379069539.824504225.3b9xwugp>