Snapshots 9-3
)LJXUH'LDJUDPRID6QDSVKRW
Changing the contents of foo creates a similar situation. New data written to foo can-
not be stored in the same disk blocks as the current contents because the snapshot is
using those blocks to store the old version of foo. Instead, the new data is written to
new disk blocks, so there are two separate copies of foo on diska new copy in the
active file system and an old one in the snapshot. This technique of duplicating disk
blocks only as they are modified is called copy-on-write.
In some directories, most data remains unchanged from day to day. For example, a
user with a 10-MB home directory might change only 100 KB to 500 KB on a typical
day. When files change slowly, snapshots can be kept on-line for days or even weeks
before they begin to consume unacceptable amounts of disk space. In other directo-
ries, data changes quickly. If a large percentage of data changes every day, there
might not be room to keep snapshots for even a few hours. To accommodate the
needs of different users, create multiple volumes on the filer. In this way, you can
apply different snapshot schedules to different volumes.
In summary, when the filer creates a snapshot, it doesnt use any disk space, but as
files in the active file system are changed or deleted, the snapshot uses more and
more disk space. How often files are changed and deleted determines the number of
snapshots the filer can create and the length of time the snapshots can be kept.
Space used by the active file system
Space used by the snapshot only
Unused disk space
Before any snapshot
is taken, disk space
is consumed by the
active file system
only.
After a snapshot is
taken, the active file
system and snapshot
point to the same disk
blocks. The snapshot
doesn´t use extra disk
space.
After the

foo

file is
deleted, the space
previously used by

fo

o

is referenced by the
snapshot. That´s why
deleting active file
system data doesn´t
free disk space.