Bug 80533

Summary: filesystem snapshots are not "frozen"
Product: Documentation Reporter: Bernd Luevelsmeyer <bernd>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Bernd Luevelsmeyer 2005-05-02 12:40:02 UTC
The handbook tells, for mounted filesystem snapshots, that
"Everything will be in the same state it was during the snapshot
creation time."

This is misleading. While the original snapshot will indeed have
the creation time contents, this may change after mounting it.
Users have the same permissions in the mounted snapshot filesystem
as they have in the "real" filesystem. Unless the snapshot is mounted
readonly, they can easily modify, delete or create files there. The
snapshot is in no way a "frozen" image of the snapshot creation time.

Fix: 

Change the "will be in the same state" sentence from the handbook to
"will initially be in the same state".
How-To-Repeat: I create a file as user "bernd", then take a snapshot as root, then
modify the snapshot's file as user.

$ cd /home/bernd
$ mkdir test
$ echo hello > test/file
$ cat test/file
hello
$ su -m
Password:
# mksnap_ffs /home /home/snap
# mdconfig -a -t vnode -f /home/snap
md12
# mount /dev/md12 /mnt
# cat /mnt/bernd/test/file
hello
# exit
$ echo world > /mnt/bernd/test/file
$ cat /mnt/bernd/test/file
world
Comment 1 Hiten Pandya freebsd_committer freebsd_triage 2005-06-16 04:20:09 UTC
State Changed
From-To: open->closed

Committed.  Thanks Bernd!