ZFSSnapshotsDemo

ZFS Snapshots Demo (5 Minutes)

Description

This demo is a continuation of the ZFS Pooled Storage Demo, however, it could easily be adapted to work with any storage pool. We essentially create a snapshot of our existing file system, change it's state and restore the snapshot.

OpenSolaris Versions Supported

2008.05, 2008.11

Points to Hit

  • ZFS Snapshots are quick and efficient.

Demo Prep

  • You need a storage pool

Gotchas

None yet known

Demo

  • Show the existing file systems and snapshots in the file system zfs list -t all | grep stripedpool
  • Take a snapshot of your existing file system zfs snapshot stripedpool@today
  • Show the new snapshot in the file system zfs list -t all | grep stripedpool. Notice it's not consuming any space, however, it does refer to the amount of space used by the file in the file system.
  • Delete the file(s) in the file system.
  • Copy or create a new file in the file system.
  • Run zfs list -t all | grep stripedpool again. The amount of space referred to by the file system itself should change, but the snapshot still refers to the size of the file(s) deleted.
  • Switch to the /stripedpool/.zfs/snapshot/today directory to show the data is still accessible.
  • Switch back to /stripedpool and restore the file system zfs rollback -r stripedpool@today
  • Notice everything is back how it was when the snapshot was created. Also notice the new file is gone.
  • Run zfs list -t all | grep stripedpool. Notice the file system is now using the same amount to which the snapshot is referring.

Demo Cleanup

  • If your moving on to the ZFS Clones Demo, do nothing, otherwise:
    • cd /
    • zpool destroy stripedpool
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact