From owner-freebsd-fs@FreeBSD.ORG Mon Feb 16 16:47:18 2015 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2903C4D9; Mon, 16 Feb 2015 16:47:18 +0000 (UTC) Received: from smtp2.bway.net (smtp2.v6.bway.net [IPv6:2607:d300:1::28]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC59429; Mon, 16 Feb 2015 16:47:17 +0000 (UTC) Received: from [10.3.2.41] (foon.sporktines.com [96.57.144.66]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: spork@bway.net) by smtp2.bway.net (Postfix) with ESMTPSA id 5818D95851; Mon, 16 Feb 2015 11:47:07 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bway.net; s=mail; t=1424105227; bh=W0RXd8y5FOcHTX0hVZ2JDVPyfg369TQf6j9lVcIG/Po=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=Gyv1wYTl2n8vsDEubE63u5snyb2RouzoT1Nf+A385R2pfyDzvrW687V3pg6TDqoWk RjW6L9Nop8D4rKsHFTzRPSBSC+szV0D6pO2mZwfFsPU/6eEw+9zzsZGYTqFwFazMzM l3A6qjx9N4zvkw1rEp252XutCx9C4eFQvqUunU2g= Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: About Filesystem freeze/thaw in freebsd From: Charles Sprickman In-Reply-To: <20150216095410.GH34251@kib.kiev.ua> Date: Mon, 16 Feb 2015 11:47:06 -0500 Content-Transfer-Encoding: 7bit Message-Id: <16F552EF-83A2-496B-A7ED-7B62B78D666B@bway.net> References: <54E1B90E.8050101@freebsd.org> <20150216095410.GH34251@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1878.6) Cc: freebsd-fs@freebsd.org, Matthew Seaman X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2015 16:47:18 -0000 On Feb 16, 2015, at 4:54 AM, Konstantin Belousov wrote: > On Mon, Feb 16, 2015 at 09:31:58AM +0000, Matthew Seaman wrote: >> On 02/16/15 09:07, zx zx wrote: >>> Hi, I am experimenting to do a live backup of FreeBSD >>> VM. Question is do we have freeze/thaw interfaces in FreeBSD? I >>> searched a lot in web and freebsd source code, just could not find >>> the right interface. As I know that in linux:VxFS >>> provides ioctl interfaces to application programs to freeze and thaw >>> VxFS file systems. The interfaces are VX_FREEZE, VX_FREEZE_ALL, and >>> VX_THAW.About Freeze and thaw Freezing a file system temporarily >>> blocks all I/O operations to a file system and then performs a sync >>> on the file system. Current operations are completed and the file >>> system is synchronized to disk. Freezing a file system is a necessary >>> step for obtaining a stable and consistent image of the file system >>> at the volume level. Consistent volume-level file system images can >>> be obtained and used with a file system snapshot tool. The freeze >>> operation flushes all buffers and pages in the file system cache that >>> contain dirty metadata and user data. The operation then suspends any >>> new activity on the file system until the file system is thawed. >>> Any help would be appreciated, thanks a lot! Andy Zhang >> >> What you want is snapshotting. You can create a snapshot of UFS or ZFS >> filesystems, mount the snapshot and then back it up without needing to >> worry about the filesystem changing while you're trying to back it up. >> >> See mksnap_ffs(8) and the 'snapshot' entry in zfs(8) >> >> The snapshot is mounted separately from the actual filesystem which can >> carry on with normal activities in the mean time. >> >> Snapshotting functionality is built into dump(8) for UFS filesystems >> (See the -L flag in that man page) or you can use zfs send / recv to >> dump filesystems to tape, which implies use of snapshots. > > Snapshot is different functionality from what the OP asked. > Exactly requested feature is provided by UFSSUSPEND/UFSRESUME ioctls > on the /dev/ufssuspend, for UFS volumes. You should consult the code > to see how to use them. Do the VMWare tools currently implement this? VMWare doesnt complain when making snapshots, but I never found a way to verify its actually working. How about Xen and popular Xen variations like Amazon and Digital Ocean? Thanks, Charles > > I suspect that the similar feature exists for ZFS, but I do not know > where to start looking. > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"