Veritas™ File System 5.0.1 Administrator's Guide

Figure 5-1
The Snapshot Disk Structure
super-block
bitmap
blockmap
data block
The super-block is similar to the super-block of a standard VxFS file system, but
the magic number is different and many of the fields are not applicable.
The bitmap contains one bit for every block on the snapped file system. Initially,
all bitmap entries are zero. A set bit indicates that the appropriate block was
copied from the snapped file system to the snapshot. In this case, the appropriate
position in the blockmap references the copied block.
The blockmap contains one entry for each block on the snapped file system.
Initially, all entries are zero. When a block is copied from the snapped file system
to the snapshot, the appropriate entry in the blockmap is changed to contain the
block number on the snapshot file system that holds the data from the snapped
file system.
The data blocks are filled by data copied from the snapped file system, starting
from the beginning of the data block area.
How a snapshot file system works
A snapshot file system is created by mounting an empty disk slice as a snapshot
of a currently mounted file system. The bitmap, blockmap and super-block are
initialized and then the currently mounted file system is frozen. After the file
system to be snapped is frozen, the snapshot is enabled and mounted and the
snapped file system is thawed. The snapshot appears as an exact image of the
snapped file system at the time the snapshot was made.
See Freezing and thawing a file system on page 73.
Initially, the snapshot file system satisfies read requests by finding the data on
the snapped file system and returning it to the requesting process. When an inode
update or a write changes the data in block n of the snapped file system, the old
data is first read and copied to the snapshot before the snapped file system is
updated. The bitmap entry for block n is changed from 0 to 1, indicating that the
Online backup using file system snapshots
How a snapshot file system works
80