From owner-freebsd-fs@freebsd.org Mon Jan 15 23:18:33 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 6EC1DE7E36B for ; Mon, 15 Jan 2018 23:18:33 +0000 (UTC) (envelope-from Mark.Martinec+freebsd@ijs.si) Received: from mail.ijs.si (mail.ijs.si [IPv6:2001:1470:ff80::25]) (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 2CF7E753EA for ; Mon, 15 Jan 2018 23:18:33 +0000 (UTC) (envelope-from Mark.Martinec+freebsd@ijs.si) Received: from amavis-ori.ijs.si (localhost [IPv6:::1]) by mail.ijs.si (Postfix) with ESMTP id 3zL8RT2Xthz3TQ for ; Tue, 16 Jan 2018 00:18:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ijs.si; h= user-agent:message-id:organization:subject:subject:from:from :date:date:content-transfer-encoding:content-type:content-type :mime-version:received:received:received:received; s=jakla4; t= 1516058305; x=1518650306; bh=LRGASlVnSf5ALMyIKWD4GLTbSQlekxluViZ ozddJ7Jg=; b=blOf7CSLhlt2kmzRPfxWYDr0CFoveFsTQT6vJ/RqTMG2vi6oKsB NjK1vomCAUOD5HBCnnNNHcDPsA3ag7sfGIq+h88FpoMH7PKWH+qCZ1gl73Vkp7ss rpDo40BIw7gP5jfc9kMb+xrKGXAQ3m2Ok3PG9SglwY0AzE85+KX9GbPE= X-Virus-Scanned: amavisd-new at ijs.si Received: from mail.ijs.si ([IPv6:::1]) by amavis-ori.ijs.si (mail.ijs.si [IPv6:::1]) (amavisd-new, port 10026) with LMTP id eXYKlwAx8wF2 for ; Tue, 16 Jan 2018 00:18:25 +0100 (CET) Received: from mildred.ijs.si (mailbox.ijs.si [IPv6:2001:1470:ff80::143:1]) by mail.ijs.si (Postfix) with ESMTP id 3zL8RP6DwRz3TP for ; Tue, 16 Jan 2018 00:18:25 +0100 (CET) Received: from nabiralnik.ijs.si (nabiralnik.ijs.si [IPv6:2001:1470:ff80::80:16]) by mildred.ijs.si (Postfix) with ESMTP id 3zL8RP4mgyzrt for ; Tue, 16 Jan 2018 00:18:25 +0100 (CET) Received: from sleepy.ijs.si (2001:1470:ff80:e001::76) by webmail.ijs.si with HTTP (HTTP/1.1 POST); Tue, 16 Jan 2018 00:18:25 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 16 Jan 2018 00:18:25 +0100 From: Mark Martinec To: freebsd-fs@freebsd.org Subject: Reducing ZFS fragmentation by copying to larger disk Organization: Jozef Stefan Institute Message-ID: X-Sender: Mark.Martinec+freebsd@ijs.si User-Agent: Roundcube Webmail/1.3.1 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: Mon, 15 Jan 2018 23:18:33 -0000 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?) 2. use zfs send / receive to make a copy (is this any better than method #1 ?) 3. use rsync to make a copy (losing snapshots, and would likely take much longer) Mark