Re: [zfs-discuss] Computer usable output for zpool commands

2008-02-20 Thread eric kustarz

On Feb 20, 2008, at 2:16 PM, Robert Milkowski wrote:

> Hello eric,
>
> Tuesday, February 12, 2008, 7:33:14 PM, you wrote:
>
> ek> On Feb 1, 2008, at 7:17 AM, Nicolas Dorfsman wrote:
>
>>> Hi,
>>>
>>> I wrote an hobbit script around lunmap/hbamap commands to monitor
>>> SAN health.
>>> I'd like to add detail on what is being hosted by those luns.
>>>
>>> With svm metastat -p is helpful.
>>>
>>> With zfs, zpool status output is awful for script.
>>>
>>> Is there somewhere an utility to show zpool informations in a
>>> scriptable format ?
>
> ek> What exactly do you want to display?
>
> ek> We have the '-H' option to 'zfs list' and 'zfs get' for parsing.
> ek> Feel free to experiment with the code to make zpool otuput more
> ek> scriptable:
> ek> http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/
> ek> zpool/zpool_main.c
>
>
> Eric - IIRC in early zfs days you could actually get zpool output
> describing your pool (not zfs datasets but pool itself) in a way which
> is easy to re-create it.
>
> If you have couple of dozen disks with some N-raidz2 config and you
> just happen to buy another unit and lost your zpool create command but
> still want to create it exactly the same as on previous one, zpool
> output doesn't help you in current bits with it.
>
> Getting output where you just can do something like
>
> zpool create test `zpool status -S current`
>
> could bu useful (of course above command doesn't make sens but you get
> the idea).

You can always retrieve the original 'zpool create' command via  
'zpool history' as it is never overwritten.  However, if you later on  
do a 'zpool add' that can potentially be overwritten (as the history  
is implemented as a ring buffer).

eric

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] Computer usable output for zpool commands

2008-02-20 Thread Robert Milkowski
Hello eric,

Tuesday, February 12, 2008, 7:33:14 PM, you wrote:

ek> On Feb 1, 2008, at 7:17 AM, Nicolas Dorfsman wrote:

>> Hi,
>>
>> I wrote an hobbit script around lunmap/hbamap commands to monitor  
>> SAN health.
>> I'd like to add detail on what is being hosted by those luns.
>>
>> With svm metastat -p is helpful.
>>
>> With zfs, zpool status output is awful for script.
>>
>> Is there somewhere an utility to show zpool informations in a  
>> scriptable format ?

ek> What exactly do you want to display?

ek> We have the '-H' option to 'zfs list' and 'zfs get' for parsing.   
ek> Feel free to experiment with the code to make zpool otuput more  
ek> scriptable:
ek> http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/ 
ek> zpool/zpool_main.c


Eric - IIRC in early zfs days you could actually get zpool output
describing your pool (not zfs datasets but pool itself) in a way which
is easy to re-create it.

If you have couple of dozen disks with some N-raidz2 config and you
just happen to buy another unit and lost your zpool create command but
still want to create it exactly the same as on previous one, zpool
output doesn't help you in current bits with it.

Getting output where you just can do something like

zpool create test `zpool status -S current`

could bu useful (of course above command doesn't make sens but you get
the idea).



-- 
Best regards,
 Robert Milkowskimailto:[EMAIL PROTECTED]
   http://milek.blogspot.com

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] Computer usable output for zpool commands

2008-02-12 Thread eric kustarz

On Feb 1, 2008, at 7:17 AM, Nicolas Dorfsman wrote:

> Hi,
>
> I wrote an hobbit script around lunmap/hbamap commands to monitor  
> SAN health.
> I'd like to add detail on what is being hosted by those luns.
>
> With svm metastat -p is helpful.
>
> With zfs, zpool status output is awful for script.
>
> Is there somewhere an utility to show zpool informations in a  
> scriptable format ?

What exactly do you want to display?

We have the '-H' option to 'zfs list' and 'zfs get' for parsing.   
Feel free to experiment with the code to make zpool otuput more  
scriptable:
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/ 
zpool/zpool_main.c

eric

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


[zfs-discuss] Computer usable output for zpool commands

2008-02-01 Thread Nicolas Dorfsman
Hi,

I wrote an hobbit script around lunmap/hbamap commands to monitor SAN health.
I'd like to add detail on what is being hosted by those luns.

With svm metastat -p is helpful.

With zfs, zpool status output is awful for script.

Is there somewhere an utility to show zpool informations in a scriptable format 
?

Nico
 
 
This message posted from opensolaris.org
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss