Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jan 2023 21:00:53 +0100
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>
Subject:   zpool list -p -v output does not follow manpage
Message-ID:  <056395aa-179b-bca6-de38-d804fba48ca7@quip.cz>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?056395aa-179b-bca6-de38-d804fba48ca7>