test veritas logo


fsfreeze(1M)

NAME

fsfreeze - freeze VxFS file systems and execute a user command on the file systems

AVAILABILITY

VRTSvxfs

SYNOPSIS

fsfreeze [-t timeout] {-f filename | -m "mount_point ..."} [user_command]

DESCRIPTION

The fsfreeze command freezes multiple VxFS file systems and executes the specified user command on the file systems. The user command can have multiple parameters. The user command is executed only after the specified file systems are frozen, and is executed in a child process by an exec() function. The child process is created by calling the fork() function.

If you do not specify a user command, the fsfreeze command still freezes the file systems for the period of time specified by the timeout argument. If the fsfreeze command receives the SIGHUP, SIGILL, SIGINT, SIGPIPE, SIGPROF, SIGQUIT, SIGSEGV, SIGTERM, SIGTSTP, SIGUSR1, or SIGUSR2 signal, the fsfreeze command thaws all frozen file systems.

If the user command exits before the freezing timeout expires, all frozen file systems are thawed and fsfreeze returns the exit status of the user command. If the user command terminates or stops, all frozen file systems are thawed and a message prints that indicates by which signal the user command terminated or stopped. If the timeout expiration is pending and the user command is still running, the fsfreeze command sends the SIGINT signal to the user command and then thaws all file systems.

If the fsfreeze command receives the SIGHUP, SIGILL, SIGINT, SIGPIPE, SIGPROF, SIGQUIT, SIGSEGV, SIGTERM, SIGTSTP, SIGUSR1, or SIGUSR2 signal during its execution, fsfreeze sends the SIGINT signal to the user command and obtains the exit or termination status of the user command, then thaws all frozen file systems before exiting.

The fsfreeze command assumes that the user command only uses an exit status that is less than or equal to 220. Technically, this is a limitation, but for most practical cases this is not an issue.

If you must terminate a running fsfreeze process and thaw the file systems, send a SIGINT signal to the process using the kill command, or hit Ctrl-C, depending on your terminal settings. On most terminals, Ctrl-C stops the foreground process.

If you specify a VxFS clone mount point to freeze, the mount point’s primary file system is frozen. The fsfreeze command issues a warning message in this case.

Be careful when freezing nested file systems. For example, if fs1 is mounted on /mnt1, and fs2 is mounted on /mnt1/mnt2, freezing fs1 prevents you from accessing fs2. The fsfreeze command issues a warning message if you freeze a nested file system.

Be careful which mount points you freeze, as the fsfreeze command does not prevent you from freezing important mount points such as /etc, /opt, or /usr. The fsfreeze command only issues a warning message in these cases.

The fsfreeze command cannot freeze cluster file systems and file systems that are not based on Veritas Volume Manager volumes at the same time.

Although there is no limitation on number of file systems that can be frozen, a good practice is not to freeze too many file systems at once, because freezing takes time to do, especially if there is I/O activity on the file systems being frozen.

Cluster File System Issues

No cluster issues; this command operates the same on cluster file systems.

OPTIONS

-f filename Specifies a file that contains a list of file systems to freeze. A line can have leading spaces or trailing spaces. Empty lines are allowed. Each line in the file can contain only one file system. If a line contains multiple file systems, the fsfreeze command treats the line as a single mount point, which can lead to undesired results.
-m "mount_point ..."
  Specifies the file systems to freeze. Multiple file systems must be enclosed by double quotes (") and be space-delimited. If you specify only one file system, you need not include the double quotes.
-t timeout Specifies the timeout value for freezing file systems. The value must be a positive integer. The default timeout value is 30 seconds. The timeout count begins after the file systems are frozen.

RETURN VALUES

The fsfreeze command returns the following values:
222 The fsfreeze command attempted to terminate the user command, but fsfreeze could not obtain the user command’s exit status.
224 The fsfreeze command received a signal and exited without freezing any file systems.
225 The user command terminated before the timeout completed due to receiving a signal, and the fsfreeze command successfully thawed the file systems.
226 The user command terminated before the timeout completed due to receiving a signal, and the fsfreeze command failed to thaw the file systems.
227 The user command stopped before the timeout completed due to receiving a signal, and the fsfreeze command successfully thawed the file systems.
228 The user command stopped before the timeout completed due to receiving a signal, and the fsfreeze command failed to thaw the file systems.
230 The freezing timeout expired while the user command was still running, the user command was terminated by a signal, and the fsfreeze command successfully thawed the file systems.
231 The freezing timeout expired while the user command was still running, the user command was terminated by a signal, and the fsfreeze command failed to thaw the file systems.
232 The freezing timeout expired while the user command was still running, the user command was stopped by a signal, and the fsfreeze command successfully thawed the file systems.
233 The freezing timeout expired while the user command was still running, the user command was stopped by a signal, and the fsfreeze command failed to thaw the file systems.
235 The fsfreeze command received the SIGHUP, SIGILL, SIGINT, SIGPIPE, SIGPROF, SIGQUIT, SIGSEGV, SIGTERM, SIGTSTP, SIGUSR1, or SIGUSR2 signal while the user command was still running. The user command was terminated and the fsfreeze command successfully thawed the file systems.
236 The fsfreeze command received the SIGHUP, SIGILL, SIGINT, SIGPIPE, SIGPROF, SIGQUIT, SIGSEGV, SIGTERM, SIGTSTP, SIGUSR1, or SIGUSR2 signal while the user command was still running. The user command was terminated and the fsfreeze command failed to thaw the file systems.
237 The fsfreeze command received the SIGHUP, SIGILL, SIGINT, SIGPIPE, SIGPROF, SIGQUIT, SIGSEGV, SIGTERM, SIGTSTP, SIGUSR1, or SIGUSR2 signal while the user command was still running. The user command was stopped and the fsfreeze command successfully thawed the file systems.
238 The fsfreeze command received the SIGHUP, SIGILL, SIGINT, SIGPIPE, SIGPROF, SIGQUIT, SIGSEGV, SIGTERM, SIGTSTP, SIGUSR1, or SIGUSR2 signal while the user command was still running. The user command was stopped and the fsfreeze command failed to thaw the file systems.
240 The fsfreeze command attempted to terminate the user command, but unable to detect status change for the user command.
245 You did not specify a user command. The fsfreeze command exited with no file systems left in the frozen state.
246 You did not specify a user command. The fsfreeze command exited but failed to thaw the file systems.
250 This is a general error for other cases in which the fsfreeze command cannot continue processing.

If the return value is less than 220, the value is from the user command.

EXAMPLES

The following command freezes file systems mounted at /mnt1 and /mnt2 for 20 seconds and executes the ls -R /etc command on the file systems:

# fsfreeze -t 20 -m "/mnt1 /mnt2" ls -R /etc

The following command freezes the file systems that are mounted at the points specified in the mntlist file for 30 seconds, which is the default timeout value, and executes the ls -R /etc command on the file systems:


# cat mntlist /mnt1 /mnt2 # fsfreeze -f mntlist ls -R /etc

SEE ALSO

fsckptadm(1M), mount_vxfs(1M)


VxFS 7.4 fsfreeze(1M)