ZFS's helpful attention to detail

September 12, 2008

Because I just ran into this:

Imagine that you have a ZFS pool, call it tank to match the convention of ZFS examples, and that it has three spare devices configured. Further imagine that you want to remove those three configured spares from the pool:

# zpool remove tank c4t0d0 c4t0d1 c4t0d2
(No error messages are emitted.)

Then, because you are a cautious person (or because you have a tool that automatically saves your pool configurations somewhere), you actually examine the spares configuration for tank. Guess what you will find?

You'll find that tank still has two spares. Silently, ZFS has only removed the c4t0d0 spare disk. Now, in theory this behavior is documented in the zpool manpage and help, because the remove command is described as:

zpool remove pool vdev

Notice how that doesn't say you can specify more than one vdev. In the grand Unix tradition of informative manpages, this means that you can't.

Of course, it would be nice if ZFS's administrative commands actually gave an error message when you used them wrong, instead of just ignoring anything that wasn't supposed to be there. Ignoring things that you don't expect is not robust.

Written on 12 September 2008.
« Why you want sysadmins, not users, to be providing the computing
999 days is not forever »

Page tools: View Source, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Fri Sep 12 12:06:17 2008
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.