A DiskSuite annoyance: metastat

November 20, 2006

In the traditional illustrated form:

; metastat fs5/d40
metastat: sandiego.cs: fs5: set name is inconsistent

Almost all DiskSuite commands that deal with disk sets will accept fsN/dN to specify the set and the disk at once, and metastat itself produces output in this form. But metastat refuses to accept it as input; instead you have to use 'metastat -s fs5 d40'.

This isn't just a cosmetic issue. The fsN/dNN format is both easier to use and safer; the two halves are bundled together and can, for example, be cut and pasted together, and you can consistently use them that way even when the set specification is redundant (eg 'metadetach fs5/d40 fs5/d806'). Plus, it's the normal output format and any time you can, you should make sure that you accept your normal output format as input so that people have to fiddle with it as little as possible.

(In general, every time you make someone fiddle with your output you increase the chance that a mistake will get made. You get bonus points for making it 'easier' for them to retype it than to copy and paste it, because the chances for errors jump again.)

This isn't metastat's only problem, but it's a typical one. If I had to summarize the root problem, it would be that metastat seems to have been designed only as a frontend, where it was felt that it didn't matter how peculiar the output was and whether it was completely consistent with everything else about its command line arguments.

Written on 20 November 2006.
« How https: should work
A small script: bsearch-nums »

Page tools: View Source.
Search:
Login: Password:

Last modified: Mon Nov 20 17:27:37 2006
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.