From owner-freebsd-fs@FreeBSD.ORG Fri Mar 21 21:10:38 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4542738 for ; Fri, 21 Mar 2014 21:10:38 +0000 (UTC) Received: from rs2.shuttle.de (rs2.shuttle.de [IPv6:2001:638:206:3::8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A752624E for ; Fri, 21 Mar 2014 21:10:38 +0000 (UTC) Received: by rs2.shuttle.de (Postfix, from userid 10) id 637EE5804C; Fri, 21 Mar 2014 22:10:28 +0100 (CET) Received: from hal9k.schweikhardt.net (localhost [127.0.0.1]) by hal9k.schweikhardt.net (8.14.8/8.14.8) with ESMTP id s2LLAKb1080567 for ; Fri, 21 Mar 2014 22:10:20 +0100 (CET) (envelope-from schweikh@hal9k.schweikhardt.net) Received: (from schweikh@localhost) by hal9k.schweikhardt.net (8.14.8/8.14.8/Submit) id s2LLAKUf080566 for freebsd-fs@freebsd.org; Fri, 21 Mar 2014 22:10:20 +0100 (CET) (envelope-from schweikh) Date: Fri, 21 Mar 2014 22:10:20 +0100 From: Jens Schweikhardt To: freebsd-fs@freebsd.org Subject: Quickly emptying a ZFS Message-ID: <20140321211020.GB1859@schweikhardt.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 21:10:39 -0000 hello, world\n If I need to quickly delete all files on a file system, with UFS I can simply use newfs. Is there something equivalent for ZFS that is neither of * cd mount-point; rm -rf * (not really quick, needs messing with chflags) * zfs destroy dataset; zfs create dataset (loses all properties set) I.e. the task is to quickly nuke all files without losing the dataset properties. Is there maybe a way to save and restore the properties? Regards, Jens -- Jens Schweikhardt http://www.schweikhardt.net/ SIGSIG -- signature too long (core dumped)