[zfs-discuss] best way to check zfs/zpool version programatically
Hi, what is the right way to check versions of zfs and zpool ?? 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? Thanks Regards, sridhar. -- This message posted from opensolaris.org ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] best way to check zfs/zpool version programatically
On Sun, Oct 10, 2010 at 3:18 AM, sridhar surampudi toyours_srid...@yahoo.co.in wrote: Hi, what is the right way to check versions of zfs and zpool ?? 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? zfs upgrade zpool upgrade ? -- O ascii ribbon campaign - stop html mail - www.asciiribbon.org ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] best way to check zfs/zpool version programatically
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