Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jan 2023 13:25:59 -0700
From:      "John Doherty" <bsdlists@jld3.net>
To:        freebsd-fs@freebsd.org
Subject:   Re: zpool list -p -v output does not follow manpage
Message-ID:  <896F9EA3-35F1-4447-AE38-9AB44E919A56@jld3.net>
In-Reply-To: <CAOtMX2iZVLhNqv=iUHfa1Rk6WQx_vSg=-9u=HwVYbVrHRfc8DA@mail.gmail.com>
References:  <056395aa-179b-bca6-de38-d804fba48ca7@quip.cz> <CAOtMX2iZVLhNqv=iUHfa1Rk6WQx_vSg=-9u=HwVYbVrHRfc8DA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon 2023-01-23 01:15 PM MST -0700, <asomers@freebsd.org> wrote:

> 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.

Also fine for me on 13.1-RELEASE but not 12.4-RELEASE:

[root@ss2] # freebsd-version -k ; zpool list -v -p zpX
12.4-RELEASE
NAME           SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  
DEDUP  HEALTH  ALTROOT
zpX           1006632960  93696  1006539264        -         -     0%    
   0  1.00x  ONLINE  -
   mirror       960M  91.5K   960M        -         -     0%  0.00%
     /vd/vd00      -      -      -        -         -      -      -
     /vd/vd01      -      -      -        -         -      -      -




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?896F9EA3-35F1-4447-AE38-9AB44E919A56>