Veritas™ File System 5.0.1 Programmer's Reference Guide

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.
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.
The VX_FREEZE ioctl operates on a single file system. The program performing
this ioctl can freeze the specified file system and block any attempts to access the
file system until it is thawed. The file system thaws after the timeout value that
is specified with the VX_FREEZE ioctl has expired, or the VX_THAW ioctl is operated
on the file system.
The VX_THAW ioctl operates on a frozen file system. It can be used to thaw the
specified file system before the freeze timeout period has elapsed.
The VX_FREEZE_ALL ioctl interface freezes one or more file systems. The
VX_FREEZE_ALL ioctl operates in an atomic fashion when there are multiple file
systems specified with a freeze operation. VxFS blocks access to the specified file
systems simultaneously and disallows a user-initiated write operation that may
modify more than one file system with a single write operation. Because
VX_FREEZE_ALL can be used with a single file system, VX_FREEZE_ALL is the
preferred interface over the VX_FREEZE ioctl.
Executing the VX_FREEZE or VX_FREEZE_ALL ioctls results in a clean file system
image that can be mounted after the image is split off from the file system device.
In response to a freeze request, all modified file system metadata is flushed to
disk with no pending file system transactions in the log that must be replayed
before mounting the split off image.
Both the VX_FREEZE and VX_FREEZE_ALL interfaces can be used to freeze locally
mounted file systems, or locally or remotely mounted cluster file systems.
The following table shows freeze/thaw compatibility with VxFS releases:
When freezing a file system, care should be taken with choosing a reasonable
time-out value for the freeze to reduce impact to external resources targeting the
file system. User or system processes and resources are blocked while the file
system is frozen. If the specified timeout value is too large, resources are blocked
for an extended period of time.
During a file system freeze, any attempt to get a file descriptor from the root
directory of the file system for use with the VX_THAW ioctl causes the calling process
to be blocked as the result of the frozen state of the file system. The file descriptor
must be acquired before issuing the VX_FREEZE_ALL or VX_FREEZE ioctl.
Use the VX_THAW ioctl to thaw file systems that were frozen with the VX_FREEZE_ALL
ioctl before the timeout period has expired.
The programming interface is as follows:
Veritas File System I/O
Freeze and thaw
72