Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jan 2023 13:15:56 -0700
From:      Alan Somers <asomers@freebsd.org>
To:        Miroslav Lachman <000.fbsd@quip.cz>
Cc:        "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>
Subject:   Re: zpool list -p -v output does not follow manpage
Message-ID:  <CAOtMX2iZVLhNqv=iUHfa1Rk6WQx_vSg=-9u=HwVYbVrHRfc8DA@mail.gmail.com>
In-Reply-To: <056395aa-179b-bca6-de38-d804fba48ca7@quip.cz>
References:  <056395aa-179b-bca6-de38-d804fba48ca7@quip.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 23, 2023 at 1:01 PM Miroslav Lachman <000.fbsd@quip.cz> wrote:
>
> If we have some sample pool and list verbose statistics we see following
> output which is OK:
>
> # zpool list -v
> NAME         SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP
> HEALTH  ALTROOT
> tank0     492G  5.07G   487G        -         -     9%     1%  1.00x
> ONLINE  -
>    da0p3   492G  5.07G   487G        -         -     9%  1.02%
>
>
> But when -p is added to make the output numbers parsable (exact values),
> the numbers are exact for top level only and the output is nor parsable
> nor easily human readable (broken columns):
>
> # zpool list -v -p
> NAME         SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP
> HEALTH  ALTROOT
> tank0    528280977408  5438681088  522842296320        -         -
> 9%      1  1.00x  ONLINE  -
>    da0p3   492G  5.07G   487G        -         -     9%  1.02%
>
> This behavior is not documented and I think it is unexpected.
>
> The same goes when we need to show just some of possible properties,
> eg.: name and size:
>
> # zpool list -v -p -o name,size
> NAME         SIZE
> tank0    528280977408
>    da0p3   492G  5.06G   487G        -         -     9%  1.02%
>
> Name and Size is shown for top level but other properties are shown for
> da0p3 which is again unexpected to me.
>
> This is on FreeBSD 12.3-p10, I don't have access to any newere version.
>
> Can somebody confirm if this is on newer versions too?
>
> And - can this be fixed?
>
> Kind regards
> Miroslav Lachman

It's working correctly for me on 13.1-RELEASE and 14.0-CURRENT.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2iZVLhNqv=iUHfa1Rk6WQx_vSg=-9u=HwVYbVrHRfc8DA>