From owner-freebsd-fs@FreeBSD.ORG Sun Nov 18 00:51:34 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E1AB53F8 for ; Sun, 18 Nov 2012 00:51:34 +0000 (UTC) (envelope-from je@8192.net) Received: from smtp129.dfw.emailsrvr.com (smtp129.dfw.emailsrvr.com [67.192.241.129]) by mx1.freebsd.org (Postfix) with ESMTP id B926B8FC1F for ; Sun, 18 Nov 2012 00:51:34 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp29.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id C84A939825C for ; Sat, 17 Nov 2012 19:42:43 -0500 (EST) X-Virus-Scanned: OK Received: by smtp29.relay.dfw1a.emailsrvr.com (Authenticated sender: john-AT-8192.net) with ESMTPSA id 9BDF639825A for ; Sat, 17 Nov 2012 19:42:43 -0500 (EST) Message-ID: <50A82F08.8010908@8192.net> Date: Sat, 17 Nov 2012 16:42:48 -0800 From: je User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: freebsd-fs@freebsd.org Subject: ZFS behavior with odd-number of non-parity drives? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Nov 2012 00:51:34 -0000 Given an odd number of data (non-parity) drives, how does ZFS write data to the individual disks? For example, a 4-drive RAIDZ or 5-drive RAIDZ2 would use three drives for data and two for parity when writing. Since the recordsize is a power of two (and no power of two is evenly divisible by three), it is impossible to write a full sector (be it a 512b or 4k sector) of data to each data drive. In this case, what does ZFS do? Will it write recordsize/3 bytes of data to each drive, leaving the drive to do a read/modify/write operation? Or will ZFS round the write up to the nearest drive sector size and "waste" the extra bytes? I see the best practice for RAIDZ is to use an odd number of drives, and for RAIDZ2 an even number, but I am curious as to the behavior of ZFS in these sub-optimal conditions. John