From owner-freebsd-fs@freebsd.org Tue Jan 16 00:34:12 2018 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA205EA7739 for ; Tue, 16 Jan 2018 00:34:12 +0000 (UTC) (envelope-from bfriesen@simple.dallas.tx.us) Received: from smtp.simplesystems.org (smtp.simplesystems.org [65.66.246.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A15278232 for ; Tue, 16 Jan 2018 00:34:11 +0000 (UTC) (envelope-from bfriesen@simple.dallas.tx.us) Received: from scrappy.simplesystems.org (scrappy.simplesystems.org [65.66.246.73]) by smtp.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id w0G0SAmG004598; Mon, 15 Jan 2018 18:28:10 -0600 (CST) Date: Mon, 15 Jan 2018 18:28:10 -0600 (CST) From: Bob Friesenhahn X-X-Sender: bfriesen@scrappy.simplesystems.org To: Mark Martinec cc: freebsd-fs@freebsd.org Subject: Re: Reducing ZFS fragmentation by copying to larger disk In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (GSO 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (smtp.simplesystems.org [65.66.246.90]); Mon, 15 Jan 2018 18:28:10 -0600 (CST) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jan 2018 00:34:12 -0000 On Tue, 16 Jan 2018, Mark Martinec wrote: > Having a ZFS filesystem with two 4 TB disks in a mirror that > is 85 % full and apparently pretty much fragmented (scrubs > or a resilver takes excessively long time), I intend to move > its contents to a new pair of disks twice the size. > > My question is what method to use so that in the end the copy will > be less fragmented: > > 1. attach new disks to a ZFS mirror and let them resilver, then > remove the old disks (Would the copied content be any less > fragmented, or perhaps would the added free space just > relieve some of the problem?) I don't think this would help with fragmentation at all. > 2. use zfs send / receive to make a copy > (is this any better than method #1 ?) This will work well as long as there is enough space to send to. It will even work within the same pool if there is enough free space. Bob -- Bob Friesenhahn bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/