From the computer of: qmchenry
(335 recipes)
Created: Jun 14, 2006
To create a snapshot of my home directory in techrx/home/qmchenry with the name of today's date (060614), I used the command:
Each snapshot has a name (which is useful since you could theoretically create 2^64 or more than 18 billion billion snapshots in each pool) and is referenced as filesystemname@snapshotname.
Snapshots show up in a normal zfs list just as filesystems do:
At this point, the snapshot uses 0 bytes of additional space as shown in the USED column (although there is some minor overhead in the pool). The REFER column shows the same size as the USED size of the original filesystem at the time of the snapshot. Note that there is no mountpoint for the fileystem. Snapshots are purposefully not intended to be accessed like a filesystem. To do that, you just need to clone the snapshot (which is another recipe).
The reason that snapshots add no overhead in CPU load is because of the way that ZFS writes changes in data to the disk. ZFS writes its data in units called blocks (which are dynamically sized up to 128KB). When the data in an existing block is changed, ZFS writes the data to a new block on disk before it releases the old block. However, when a shapshot exists for the filesystem, the old block is not released. Instead, it remains as part of the snapshot. Therefore, the only increases in disk space used for snapshots are in keeping around old blocks.
Subscribe to the Tech-Recipes Newsletter
You can get tips like this delivered in your email every week!
We will never, ever sell your email address or spam you.
Related recipes:
ZFS: Create a writable clone of a filesystem
ZFS: Restore a filesystem from a snapshot backup
ZFS: Create a new filesystem from an existing pool
ZFS: Create a basic filesystem or pool using zpool
ZFS: Set or change the mount point of a filesystem
Solaris 10: Create multi-terabyte UFS filesystem
Solaris: Mount filesystem with UFS logging enabled
Solaris: unmounting a filesystem with umount
ZFS: Create a mirrored storage pool
Automatically answer yes to all fsck questions
Sponsored links
Login
Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.Search
Tech Recipes
· Home
· Mac OS X
· Solaris
· Windows
· Programming
· UNIX
· Cisco
· MySQL
· Google
· Instant messaging
· Add recipes
· Leave feedback
· Recommend us
· RSS Syndication
Hot recipes
Make XP look like Windows Vista / Longhorn for free!
Hacks to Beat Rapidshare Download Limits and Waiting Time
XP: Small, Free Way to Use and Mount Images (ISO files) Without Burning Them
How Do I Use or Open Bin, Cue, or ISO Files?
Vista: Should I Install 64-bit or 32-bit Version? (x64 vs x86)
MySpace: Hack to Download Any Song on MySpace
How to patch up your UXtheme.dll file in XP home or pro
How to Open and Burn mdf and mds Files to CD or DVD?
Who's Online
There are currently, 2259 guest(s) and 2 member(s) that are online.
You are Anonymous user. You can register for free by clicking here
Information
Wish to advertise with us?
All logos and trademarks in this site are property of their respective owner. The comments and forum posts are property of their posters, all the rest © 2003-2007 by QD Ideas, LLC.
Users of this site are legally bound by the Terms and conditions and Disclaimer. Do not use this web site if you do not agree with these policies.
The members, admins, and authors of this website respect your privacy.
Page Generation: 0.58 Seconds
Sat May 17 6:49:18 2008