Date: Mon, 16 Feb 2015 09:31:58 +0000 From: Matthew Seaman <matthew@freebsd.org> To: freebsd-fs@freebsd.org Subject: Re: About Filesystem freeze/thaw in freebsd Message-ID: <54E1B90E.8050101@freebsd.org> In-Reply-To: <COL128-W74C2CE6B8243E74B26A286F62E0@phx.gbl> References: <COL128-W74C2CE6B8243E74B26A286F62E0@phx.gbl>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --aACxa3nfAX3n4xcEClw7HhAUUJ7LiAVkc Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. Cheers, Matthew --aACxa3nfAX3n4xcEClw7HhAUUJ7LiAVkc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJU4bkOXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxOUYxNTRFQ0JGMTEyRTUwNTQ0RTNGMzAw MDUxM0YxMEUwQTlFNEU3AAoJEABRPxDgqeTnnlYP/jHvdmSD/ddTW5OiwY191rKw knTidCezM7HvN+k68CkJ8Zi3Hspt0OWH+2+LCFTENDSgYVn+YsLWd5Sqimu7YJSP 5yyzYWBd8ubPb3cb1NClmwWrojTJtPKhY5xgOofZmjsMPqPcZVXZ8rlVk7kOgq5B O2XizNMp4fT4O0mOU7AFmKmTug05b4XM73nYSDpho9NIuFk0IM44GpcFwojhPSn9 9LVVwA//flwjd56O7sd2cWpuNJkWmX6YX/8Jzp4hyfd4YqyCQ7J6qAJqRE/ZKF32 pWTcrl6xiGNJlrwzc/Ija4iq43yS9xwlVR5SXHZBCn4kgGJ3my6ceISoZa1l+pvr W2QV9SQyiv7OQlSf6eHGsT6zDqmerjq6PwTnSLU4wcl5qpM4/wTp8zQJ2BWMkVr7 FrMf93piy7TVaQHg9tpi5LRyOMEbVN6NpH/YSLR6ThYGe1APDDafrQkgGeQZDD+F 3LerLYQ/prvhi/ApeuYtgG/raOsPajTHSV2qb3EFEIE0vlpFYF5gWNUcRrwjFvfw OiQbVKT6lbRPaW/h/jVjcaWzFOwfsDIos/15L3f4berpt81HpnXNumPAVVqRgaJa 5ismFrvS3F6muI+mDGkiE9GCdHbyAlHm/hY08w/mTX76HpFo+XRPCJbHDqHQlWFH pj2w7zXrEY9F10Msxtdl =11OF -----END PGP SIGNATURE----- --aACxa3nfAX3n4xcEClw7HhAUUJ7LiAVkc--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54E1B90E.8050101>