some comments on geom(8)
Pawel Jakub Dawidek
pjd at FreeBSD.org
Thu May 20 03:51:35 PDT 2004
On Thu, May 20, 2004 at 12:42:16PM +0200, Poul-Henning Kamp wrote:
+>
+> These are merely comments and not binding in any way.
+>
+> The idea behind the gctl_*(9) api was to avoid class specific code
+> in userland to the extent possible and to converge on a common command
+> set for geom classes to make life easier and more intuitive for
+> administrators.
+>
+> For a simple operation like "create", I have a hard time seeing why
+> we need class specific code in userland.
+>
+> I would expect to be able to type:
+>
+> create stripe ad0s1 ad1s1
+>
+> into geom(8) and see it construct a g_ctl containing:
+>
+> verb "create"
+> class "stripe"
+> nprovider "2"
+> provider0 "ad0s1"
+> provider1 "ad1s1"
+>
+> which I would expect the geom_stripe class in the kernel to understand.
+>
+> If I had typed
+>
+> create stripe -stripe 64 ad0s1 ad1s1
+>
+> It would be:
+>
+> verb "create"
+> class "stripe"
+> nprovider "2"
+> provider0 "ad0s1"
+> provider1 "ad1s1"
+> stripe "64"
+>
+> Similar
+> destroy foobar
+> should examine the XML status to find the class of the "foobar"
+> generate something like:
+>
+> verb "destroy"
+> class "foo"
+> target "foobar"
+>
+> But as I said: these are non-binding comments, do it which ever
+> way makes sense to you guys.
I agree, but I've found it quite hard to implement, because
for example in CONCAT and STRIPE class there are two ways to
create it: manual way and auto-configuration way.
In your example we have to interpret keywords in kernel and we can't
provide 'usage' without communicating with kernel part.
Also to all commands I want to pass to the kernel, for example:
'gconcat label', 'gconcat clear'.
I think geom(8) stays in the middle. It is very easy to write
class-specific utility and if it works like your example one have
to only prepare one structure with commands and options description
and no code at all.
I want to send more detailed description on current@ after commiting
manual pages.
--
Pawel Jakub Dawidek http://www.FreeBSD.org
pjd at FreeBSD.org http://garage.freebsd.pl
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20040520/bd8ee7a7/attachment.bin
More information about the freebsd-geom
mailing list