ZFS Clones Demo (5 Minutes)
Description
This demo is a continuation of the ZFS Snapshots Demo, however, it could easily be adapted to work with any existing snapshot. We essentially create a writable clone of a snapshot on our existing system.
OpenSolaris Versions Supported
2008.05, 2008.11
Points to Hit
- ZFS Clones allow you to create a writable copy of a snapshot
Demo Prep
- You need a snapshot to clone
Gotchas
None yet known
Demo
- View the existing snapshots in the pool zfs list -t all | grep stripedpool. Assuming you're coming from the ZFS Snapshots Demo, one of them should be stripedpool@today.
- zfs clone stripedpool@today stripedpool/PresentationsForRoman
- ls /stripedpool
- zfs list - why isn't stripedpool/PresentationsForRoman consuming any space? Because the clone is still dependent on the snapshot - zfs list -o origin stripedpool/PresentationsForRoman
- To decouple them, promote the clone - zfs promote stripedpool/PresentationsForRoman.
- zfs list to show it's now using the same space as stripedpool.
Demo Cleanup
- cd /
- zpool destroy stripedpool