mksnap_ffs(8)

mksnap_ffs8

Take a file system snapshot

Usage

mksnap_ffs snapshot_name

Overview

The mksnap_ffs utility creates a snapshot named snapshot_name. This name is a path in the file system to be snapshotted. Typically this is under the .snap directory in the root of the file system, but it can be anywhere in the filesystem being snapshotted. Snapshots can be listed using the snapinfo(8) command.

After a snapshot is taken it appears as a file. The size of the snapshot file is equal to the size of the file system from which it was taken. It can be moved, renamed or deleted (which removes the snapshot).

The group ownership of the file is set to “operator”; the owner of the file remains “root”. The mode of the snapshot is set to be readable by the owner or members of the “operator” group.

Examples

Create a snapshot of /home file system and mount the snapshot elsewhere:

mksnap_ffs /home/.snap/snap1
mdconfig -a -t vnode -o readonly -f /home/.snap/snap1
mount -o ro /dev/md0 /mnt/

Delete a snapshot:

rm /home/.snap/snap1

Caveats

The disk full situation is not handled gracefully and may lead to a system panic when no free blocks are found.

Every filesystem can have only up to 20 active snapshots. When this limit is reached, attempting to create more snapshots fails with ENOSPC, and mksnap_ffs reports that it is “out of space”.

Releases

55 releases since FreeBSD 5.1-RELEASE; the text changed 34 times.

  1. 5.1
  2. 5.2–6.3
  3. 6.4
  4. 7.0
  5. 7.1
  6. 7.2
  7. 7.3
  8. 7.4
  9. 8.0
  10. 8.1
  11. 8.2
  12. 8.3
  13. 8.4
  14. 9.0
  15. 9.1
  16. 9.2
  17. 9.3
  18. 10.0
  19. 10.1
  20. 10.2
  21. 10.3
  22. 10.4
  23. 11.0
  24. 11.1
  25. 11.2
  26. 11.3
  27. 11.4
  28. 12.0
  29. 12.1
  30. 12.2
  31. 12.3
  32. 12.4
  33. 13.0–13.1
  34. 13.2–13.5
  35. 14.0–16.0

History

The mksnap_ffs utility first appeared in FreeBSD 5.1.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.