waffle

Waffle was a weblog that ran for nine years and five days from 2003 to 2012.
The last post has been written and comments will be closed by the end of March 2012.
The author of Waffle, some guy in Sweden, also occasionally writes stmts.net.

(If anything will ever succeed or revive Waffle, it will be announced in this location, and in the feeds.)

Why is ZFS Good?

Scott Stevenson, just now: “So I’d like to request a waffle which describes why we should care about ZFS.” And who am I to turn down someone who just made The List?

ZFS is a file system that throws most of the still-there-by-tradition-not-because-we-need-them features of modern file systems completely out the window.

There are three major upsides to adopting ZFS.

  • On other file systems, you overwrite the current data when you save a file. The default behavior in ZFS, however, is “copy-on-write”, to write in a new location. This means that the chance of being stuck in a frankenstate of having half of the old file and half of the new file goes down dramatically, and it means drives very rarely get fragmented, but it also means that if you want to, you can have a versioned file system. Your old version of the file can be saved but marked as an old revision, just like in source control systems like Subversion. You think Time Machine looked useful before?

  • Every time a file is read or written, the many small parts on the disk in which the file is saved – the clusters or blocks – are checked for consistency. When you write a file, you also calculate a ‘checksum’ of each block, and when you read it, you make sure it is correct. If a specific physical part of the disk is damaged, ZFS can even mark that area off as unsafe and continue to use the rest of the disk.

  • The layers of ZFS that go beyond the file system can also ensure a sane experience with many partitions or drives. If you were to add a new hard drive in your Mac Pro, say, you could format it for ZFS and mesh it into your existing file system. If you pulled the drive, those files simply go away. [Or not. See comments.] With quotas (this folder can store up to x GB) and reservations (this folder must have at least x GB capacity) built-in, you can emulate the practical parts of today’s partitions and stay flexible because you can ‘re-partition’ at any time. Even better is the fact that as you add more stuff to your ‘pool’, which the ‘effective’ partition created by all of your disks is called, the writes will be striped across the available disks automatically, enhancing performance.

Comments

  1. Are you sure you can remove the drive? I don’t think unpooling drives is supported at present without first resilvering to a replacement…

    By http://openid.aol.com/durin42 · 2007.06.07 01:15

  2. I can’t believe openID works!!!

    By http://openid.aol.com/superdude264 · 2007.06.07 01:28

  3. Actually, the copy-on-write behavior can contribute to drive fragmentation, depending on how the file is modified. A write in the middle of a file may end up placing the new allocation unit far away from the original file in disk-access-time–space.

    Otherwise, you have a very good summary there.

    By benstiglitz · 2007.06.07 04:29

  4. Ben: Makes sense – I didn’t think of that scenario, but it does help against drive fragmentation on smaller files that are entirely rewritten.

    Durin: I’m not sure, but the layering is what I wanted to highlight, not that it’s something you’d want to do every day.

    By Jesper · 2007.06.07 06:12

Sorry, the comment form is closed at this time.