From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 85ED913933E for ; Wed, 30 Jun 2021 20:00:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 59E24E0833; Wed, 30 Jun 2021 20:00:31 +0000 (UTC) Received: from smtp.hosts.co.uk (smtp.hosts.co.uk [85.233.160.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 07B55E07FA for ; Wed, 30 Jun 2021 20:00:30 +0000 (UTC) Received: from host86-157-72-169.range86-157.btcentralplus.com ([86.157.72.169] helo=[192.168.1.65]) by smtp.hosts.co.uk with esmtpa (Exim) (envelope-from ) id 1lygNo-000AIV-Ca for gentoo-user@lists.gentoo.org; Wed, 30 Jun 2021 21:00:29 +0100 Subject: Re: [gentoo-user] [OT] Using an odd number of drives in ZFS RaidZ To: gentoo-user@lists.gentoo.org References: From: antlists Message-ID: Date: Wed, 30 Jun 2021 21:00:29 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Archives-Salt: ebec9d9d-3f61-4d5c-af4d-d3e1e2d9990f X-Archives-Hash: 96065467c04d07abbf76aa4ef273ebf2 On 29/06/2021 14:56, Frank Steinmetzger wrote: > Hello fellows > > This is not really a Gentoo question, but at least my NAS (which this mail > is about) is running Gentoo. :) > > There are some people amongst this esteemed group that know their stuff > about storage and servers and things, so I thought I might try my luck here. > I’ve already looked on the Webs, but my question is a wee bit specific and I > wasn’t able to find the exact answer (yet). And I’m a bit hesitant to ask > this newbie-ish question in a ZFS expert forum. ;-) > > Prologue: > Due to how records are distributed across blocks in a parity-based ZFS vdev, > it is recommended to use 2^n data disks. Technically, it is perfectly fine > to deviate from it, but for performance reasons (mostly space efficiency) it > is not the recommended way. That’s because the (default) maximum record size > of 128 k itself is a power of 2 and thus can be distributed evenly on all > drives. At least that’s my understanding. Is that correct? > > So here’s the question: > If I had three data drives, (c|w)ould I get around that problem by setting a > record size that is divisible by 3, like 96 k, or even 3 M? > > > > Here’s the background of my question: > Said NAS is based on a Mini-ITX case which has only four drive slots (which > is the most common configuration for a case of this formfactor). I started > with two 6 TB drives, running in a mirror configuration. One year later > space was running out and I filled the remaining slots. To maximise > reliability, I went with RaidZ2. > > I reached 80 % usage (which is the recommended maximum for ZFS) and am > now evaluating my options for the coming years. > 1) Reduce use of space by re-encoding. My payload is mainly movies, among > which are 3 TB of DVDs which can be shrunk by at least ⅔ by re-encoding. > → this takes time and computing effort, but is a long-term goal anyway. > 2) Replace all drives with bigger ones. There are three counter arguments: > • 1000 € for four 10 TB drives (the biggest size available w/o helium) > • they are only available with 7200 rpm (more power, noise and heat) > • I am left with four perfectly fine 6 TB drives > 3) Go for 4+2 RaidZ2. This requires a bigger case (with new PSU due to > different form factor) and a SATA expansion card b/c the Mobo only has > six connectors (I need at least one more for the system drive), costing > 250 € plus drives. > 4) Convert to RaidZ1. Gain space of one drive at the cost of resilience. I > can live with the latter; the server only runs occasionally and not for > very long at a time. *** This option brings me to my question above, > because it is easy to achieve and costs no €€€. > 5) Dunno if this is possible but ... replace one 6TB by a 12TB (any reason you don't like Helium?) and raid-0 two of the remaining 6's together. Dunno anything about what the raidZ's are but I presume this would give you 12TB of mirrored storage. It would also only use 3 slots, so you could use the 4th for eg your videos, and back them up on external storage ie the drive you've just removed :-) (The raid-0, I'd probably stripe rather than linear for performance.) Cheers, Wol