fsfreeze
Suspend filesystem activity for consistent backups
SYNOPSIS
fsfreeze [-f | -u] mountpoint
PARAMETERS
-f, --freeze
Freeze the filesystem after syncing data.
-u, --unfreeze
Unfreeze a previously frozen filesystem.
mountpoint
Path to the mounted filesystem (required).
DESCRIPTION
fsfreeze is a utility from the util-linux package that freezes or unfreezes a mounted filesystem, suspending new write operations to create a quiescent state. This is essential for consistent live backups, LVM snapshots, or online fsck checks without unmounting.
Freezing issues the FIFREEZE ioctl to the block device, blocking writes while allowing reads. Ongoing writes complete, but no new ones start. Unfreezing uses FIUNFREEZE to resume normal operations.
Run as root only. Supported on local filesystems like ext4, XFS, Btrfs; unsupported on NFS, FUSE, or tmpfs. Freezing fails if the filesystem is busy (open files, mounts) or unsupported.
Common workflow: sync data, freeze, snapshot, unfreeze. Ensures data consistency across the filesystem without downtime.
CAVEATS
Requires root privileges.
Root filesystem hard to freeze (ongoing kernel writes).
Only local filesystems with FIFREEZE support (ext4, XFS, etc.).
Fails if already frozen/busy.
Default is freeze without options.
DEFAULT BEHAVIOR
Without -f or -u, freezes the filesystem.
EXIT STATUS
0: success
1: failure
32: already frozen
33: not frozen (unfreeze attempt).
EXAMPLE
fsfreeze /home
# Take snapshot here
fsfreeze -u /home
HISTORY
Introduced in util-linux 2.17 (September 2009) to support filesystem snapshots via ioctls.


