Wandering Thoughts archives

2006-11-20

A DiskSuite annoyance: metastat

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.

solaris/DiskSuiteAnnoyance written at 17:27:37; Add Comment


Page tools: See As Normal.
Search:
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.