Free Newsletters

   All InfoWorld Newsletters
Enterprise Mac | Tom Yager » The impatient person's introduction to ZFS

October 19, 2007 | Comments: (0)

The impatient person's introduction to ZFS

You may have read that Apple is baking ZFS, Sun's Zettabyte File System, into Leopard. The flavor and extent of ZFS support in Leopard is an open question. ZFS, however, is very real and readily observable in its native habitat, Solaris, as well as in its equally capable open source counterpart, OpenSolaris.

At its foundation, ZFS looks and works like software RAID, and looking at ZFS from that familiar perspective makes it seem less intimidating.

Roughly drawn, here is software RAID:

1. Physical disks are combined to create a RAID logical volume
2. A logical volume is divided into partitions (or slices) of fixed size
3. Each partition or slice is formatted with a filesystem
4. Files live in filesystems

Conceptually, software RAID looks like this:

raid_logical_volume=RAID(disk1+disk2+disk3)

ZFS uses a similar construct, but calls it a pool:

zfs_pool=RAID(disk1+disk2+disk3)

On the Mac, to manage a logical volume you fire up Disk Utility and draw out partitions. In one step, Disk Utility creates the partition table, creates a blank filesystem in each partition and assigns each filesystem the name you gave the partition. Conceptually:

size(raid_logical_volume)=100 GB
raid_logical_volume/partition_1 size=10 GB, name="jampacks" # auto-mounts as "/Volumes/jampacks"
raid_logical_volume/partition_2 size=90 GB, name="projects" # auto-mounts as "/Volumes/projects"

With ZFS, you do the equivalent of logical voluming and partitioning from the command line, and the actual commands illustrate the concepts (the # is the shell prompt):

# zpool create ZFS_pool c1d0 c2d0 c3d0 # Just striped; no data protection by default
# zfs create ZFS_pool/jampacks # auto-mounts as /ZFS_pool/jampacks
# zfs create ZFS_pool/projects # auto-mounts as /ZFS_pool/projects

ZFS_pool is an arbitrarily chosen name. You can name a ZFS pool or filesystem whatever you like. Just two commands (zpool and zfs) run the whole show.

Highly distilled, ZFS has these properties:

1. Physical disks are grouped into ZFS pools, which are the rough equivalent of RAID volumes
2. Each pool can be split into any number of datasets, which work roughly like partitions or slices
3. Files live in datasets

Yes, it is that easy, and yes, I left out most of what makes ZFS so remarkable. It's a ploy to keep you coming back here.

Posted by Tom Yager on October 19, 2007 03:12 PM


RATE THIS ARTICLE:





 

  •  
  • COMMENTS




Is it still journaled? Does this have anything to do with Time Machine?

Posted by: brandon at October 22, 2007 06:19 AM

Technology White Papers

 

InfoWorld Technology Marketplace

» Technology White Papers Library

Technology White Papers by Topic

Technology White Papers E-mail Alert

Find out when the latest white paper is available:
 
 
» BUY A LINK NOW

Sponsored Technology Links