From owner-freebsd-fs@FreeBSD.ORG Mon Feb 16 09:08:20 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 0B37A556 for ; Mon, 16 Feb 2015 09:08:20 +0000 (UTC) Received: from COL004-OMC4S2.hotmail.com (col004-omc4s2.hotmail.com [65.55.34.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DD8E47F6 for ; Mon, 16 Feb 2015 09:08:19 +0000 (UTC) Received: from COL128-W74 ([65.55.34.200]) by COL004-OMC4S2.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751); Mon, 16 Feb 2015 01:07:13 -0800 X-TMN: [E2Wrxju6cURQjnz3pW62VFTqKbBIPX+8Odc25lJrKgY=] X-Originating-Email: [zhangxia3@hotmail.com] Message-ID: From: zx zx To: "freebsd-fs@freebsd.org" Subject: About Filesystem freeze/thaw in freebsd Date: Mon, 16 Feb 2015 01:07:12 -0800 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 16 Feb 2015 09:07:13.0157 (UTC) FILETIME=[F3D02B50:01D049C7] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 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 09:08:20 -0000 Hi=2C 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=2C just could not find the right interface. = As I know that in linux:VxFS provides ioctl interfaces to app= lication programs to freeze and thaw VxFS file systems. The interfaces are = VX_FREEZE=2C VX_FREEZE_ALL=2C 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 t= he file system is synchronized to disk. Freezing a file system is a necessa= ry step for obtaining a stable and consistent image of the file system at t= he volume level. Consistent volume-level file system images can be obtained= and used with a file system snapshot tool. The freeze operation flushes al= l buffers and pages in the file system cache that contain dirty metadata an= d user data. The operation then suspends any new activity on the file syste= m until the file system is thawed. Any help would be appreciate= d=2C thanks a lot! Andy Zhang =