From owner-freebsd-stable@FreeBSD.ORG Fri Feb 3 15:59:49 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEF0B1065673 for ; Fri, 3 Feb 2012 15:59:49 +0000 (UTC) (envelope-from petefrench@ingresso.co.uk) Received: from constantine.ingresso.co.uk (constantine.ingresso.co.uk [IPv6:2a02:b90:3002:e550::3]) by mx1.freebsd.org (Postfix) with ESMTP id 6BB7B8FC0A for ; Fri, 3 Feb 2012 15:59:49 +0000 (UTC) Received: from dilbert.london-internal.ingresso.co.uk ([10.64.50.6] helo=dilbert.ingresso.co.uk) by constantine.ingresso.co.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1RtLXx-00053j-31; Fri, 03 Feb 2012 15:59:33 +0000 Received: from petefrench by dilbert.ingresso.co.uk with local (Exim 4.76 (FreeBSD)) (envelope-from ) id 1RtLXx-0000h9-2H; Fri, 03 Feb 2012 15:59:33 +0000 To: dmagda@ee.ryerson.ca, petefrench@ingresso.co.uk In-Reply-To: <01775b9823b5bacb14d03315a6321d61.squirrel@webmail.ee.ryerson.ca> Message-Id: From: Pete French Date: Fri, 03 Feb 2012 15:59:33 +0000 Cc: freebsd-stable@freebsd.org Subject: Re: Sector size of a zvol X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2012 15:59:49 -0000 > Try the following from the zfs(1M) man page: > > zfs create [-ps] [-b blocksize] [-o property=value] ... -V size volume > [...] > -b blocksize > > Equivalent to -o volblocksize=blocksize. If this option is > specified in conjunction with -o volblocksize, the resulting > behavior is undefined. Yes, thats the parameter I have been playing around with - whether you set it with -b or -o volblocksize, the zvol still presents itself as being 512 bytes. This is what is puzzling me. Quick example: # zfs create -V 1G -b 512 tank/test1 # zfs create -V 1G -b 4k tank/test2 # zfs create -V 1G tank/test3 # zfs get volblocksize tank/test1 tank/test2 tank/test3 NAME PROPERTY VALUE SOURCE tank/test1 volblocksize 512 - tank/test2 volblocksize 4K - tank/test3 volblocksize 8K - # diskinfo /dev/zvol/tank/test* /dev/zvol/tank/test1 512 1073741824 2097152 0 0 /dev/zvol/tank/test2 512 1073741824 2097152 0 0 /dev/zvol/tank/test3 512 1073741824 2097152 0 0 As you can see, the blocksize is being set properly in the volume, but in the actial device it's always 512. Now the reason behind this was to share out a 4k block sizes iscsi target, and I have subsequently discovered that I can set that parameter on istgt which should mitigate the effect, but I still think it is odd. cheers, -pete.