ZFS Snapshots
Make sure you’ve seen and read the items about ZFS from the weblog
The other day I did a
$ zfs snapshot strongspace/home/jason@18Feb
Then the next
$ zfs snapshot strongspace/home/jason@19Feb
$ zfs get all used,available,referenced,compressratio,quota strongspace/home/jason
NAME PROPERTY VALUE SOURCE
strongspace/home/jason used 3.92M -
strongspace/home/jason available 8.00G -
strongspace/home/jason referenced 1.96M -
strongspace/home/jason compressratio 1.08x -
strongspace/home/jason quota 8G local
“Referenced” is the unique files, while “used” includes the snapshots. Notice that while the snapshots occurred twice, there is only 2×1.96M in there, because a file will just occur once across shared snapshots.
You can see what happens when you delete the “referenced” files (these are the ones you actually see in an ls or SFTP browser): the referenced usage is now 8K, and the snapshot contains the old files
$ zfs get used,referenced strongspace/home/jason
NAME PROPERTY VALUE SOURCE
strongspace/home/jason used 1.97M -
strongspace/home/jason referenced 8K -
The neat thing is that this could be browsed per user
And you can see me pulling my own snapshot after deleting my “main files”
http://media.textdrive.com/Strongspace-ZFS-Snapshot.mov·:· Posted 23 February 2006, 19:21 by Jason Hoffman to Server geek |

“Free” snapshots totally change the way you think and manage data. I love ‘em.
— Mark Mayo 2 March 2006, 05:57 #