On Thu, Oct 4, 2012 at 9:14 AM, Richard Elling <richard.ell...@gmail.com> wrote: > On Oct 4, 2012, at 8:58 AM, Jan Owoc <jso...@gmail.com> wrote: > The return code for zpool is ambiguous. Do not rely upon it to determine > if the pool is healthy. You should check the health property instead.
Huh. Learn something new everyday. You just simplified my "pool health check" script immensely. Thank you! pstatus=$( zpool get health storage | grep "health" | awk '{ print $3 }' ) if [ "${pstatus}" != "ONLINE" ]; then Much simpler than the nested ifs and grep pipelines I was using before. Not sure why I didn't see "health" in the list of pool properties all the times I've read the zpool man page. -- Freddie Cash fjwc...@gmail.com _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss