Thursday, January 17, 2008

ZFS

A friend of mine gave me a link to a set of slides about ZFS the other day. ZFS is a radical different approach to filesystems, with a lot of cool features. It leaves the WinFS vaporware gasping for air. Some of the cool features:
  • Constant-time snapshots: takes no additional space
  • Clones: writable snapshots
  • Backup/restore: incremental backups take time proportional to data changed
  • End-to-end data integrity
  • Dynamic striping: automatically distribute load across all devices
  • Multiple independent prefetch streams, automatic length and stride detection
For personal use I find the backup/restore functionality especially cool. An incremental backup is done by
# zfs send -i tank/fs@A tank/fs@B > /backup/B-A
The time it takes to do a incremental backup is proportional to the amount of data changed, so you can easily use it to drive remote duplication. The following command sends a incremental once per minute to a remote host.
# zfs send -i tank/fs@11:31 tank/fs@11:32 | ssh host zfs receive -d /tank/fs
(The examples are taken from the slides.)

The only drawback is that there is no ZFS support for Windows. Hopefully that will change in the not-too-distant-future.

No comments: