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

Reply via email to