On Oct 9, 2010, at 1:18 PM, sridhar surampudi wrote:

> Hi,
> 
> what is the right way to check versions of zfs and zpool ??

zpool get version POOLNAME
zfs get version DATASET

> I am writing piece of code which call zfs command line further. Before 
> actually initiating and going ahead I wan to check the kind of version zfs 
> and zpool present on the system.
> 
> As an example "zpool split" is not present on prior to 134 build (not sure 
> exactly) so if an application using my code should fail if "zpool split" is 
> called. 
> 
> Is there any zfs version or zpool version command present in recent updates? 
> or is there any other way ( reading some file ) I can get these details?

For easy parsing, 
zfs get -H -o value version DATASET

Alas, there is not a zpool equivalent :-(
zpool get version POOLNAME | tail -1 | awk '{print $3}'
 -- richard

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

Reply via email to