From owner-freebsd-fs@FreeBSD.ORG Thu Nov 8 17:49:37 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 4FEDB21F for ; Thu, 8 Nov 2012 17:49:37 +0000 (UTC) (envelope-from daniel@digsys.bg) Received: from smtp-sofia.digsys.bg (smtp-sofia.digsys.bg [193.68.3.230]) by mx1.freebsd.org (Postfix) with ESMTP id B21FE8FC0C for ; Thu, 8 Nov 2012 17:49:35 +0000 (UTC) Received: from dcave.digsys.bg (dcave.digsys.bg [192.92.129.5]) (authenticated bits=0) by smtp-sofia.digsys.bg (8.14.5/8.14.5) with ESMTP id qA8HnM49063224 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Thu, 8 Nov 2012 19:49:23 +0200 (EET) (envelope-from daniel@digsys.bg) Message-ID: <509BF0A2.2050600@digsys.bg> Date: Thu, 08 Nov 2012 19:49:22 +0200 From: Daniel Kalchev User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.10) Gecko/20121029 Thunderbird/10.0.10 MIME-Version: 1.0 To: freebsd-fs@freebsd.org Subject: zfs remove vdev functionality Content-Type: text/plain; charset=windows-1251; 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: Thu, 08 Nov 2012 17:49:37 -0000 I was thinking on how to implement vdev removal on ZFS and came to this idea: If we can have an per-vdev flag that prohibits new allocations on the vdev, but permits reads and frees - then we could mark so the vdev we intend to remove form the zpool and issue an scrub-like command that will rewrite all blocks allocated form that particular vdev. Since ZFS is COW, this will effectively move all blocks off that "no write" vdev and we can now detach it. All this could be implemented with the new ZFS feature flags, so no version bumps etc are necessary. Is there something I didn't think of? Daniel