[Bug 262457] "zfs-list -v" duplicates most of the output; lack of "device" property to use with "-o" option

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 10 Mar 2022 06:32:42 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262457

            Bug ID: 262457
           Summary: "zfs-list -v" duplicates most of the output; lack of
                    "device" property to use with "-o" option
           Product: Base System
           Version: 13.0-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: parv.0zero9+freebsd@gmail.com

There is no "device" property to list the device of a pool for "zpool-list(8)"
command to use with "-o" option.

The other option of "-v" to list the device then duplicates most of the output
...


# zpool list -v
NAME                    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP 
DEDUP    HEALTH  ALTROOT
aux0                   19.5G  1.20G  18.3G        -         -     5%     6% 
1.00x    ONLINE  -
  gpt/aux0             19.5G  1.20G  18.3G        -         -     5%  6.15%    
 -    ONLINE
build                  18.5G  6.03G  12.5G        -         -     0%    32% 
1.00x    ONLINE  -
  gpt/src-ports-build  18.5G  6.03G  12.5G        -         -     0%  32.6%    
 -    ONLINE
root2                  14.5G  4.37G  10.1G        -         -    21%    30% 
1.00x    ONLINE  -
  ada4                 14.5G  4.37G  10.1G        -         -    21%  30.2%    
 -    ONLINE
src-ports              12.5G  4.17G  8.33G        -         -     0%    33% 
1.00x    ONLINE  -
  gpt/src-ports        12.5G  4.17G  8.33G        -         -     0%  33.4%    
 -    ONLINE
zroot                  11.5G  3.34G  8.16G        -         -    10%    29% 
1.00x    ONLINE  -
  ada3p4               11.5G  3.34G  8.16G        -         -    10%  29.0%    
 -    ONLINE


... I had expected only the device listed on its own line without rest of the
duplicated data if it just could not listed in its own column.

Specifying certain properties generates headers only for the ones specified and
no headers for the values listed for "device" line ...

# zpool list -vo name,size,alloc
NAME                    SIZE  ALLOC
aux0                   19.5G  1.20G
  gpt/aux0             19.5G  1.20G  18.3G        -         -     5%  6.15%    
 -    ONLINE
build                  18.5G  6.03G
  gpt/src-ports-build  18.5G  6.03G  12.5G        -         -     0%  32.6%    
 -    ONLINE
root2                  14.5G  4.37G
  ada4                 14.5G  4.37G  10.1G        -         -    21%  30.2%    
 -    ONLINE
src-ports              12.5G  4.17G
  gpt/src-ports        12.5G  4.17G  8.33G        -         -     0%  33.4%    
 -    ONLINE
zroot                  11.5G  3.34G
  ada3p4               11.5G  3.34G  8.16G        -         -    10%  29.0%    
 -    ONLINE

... in this case I had cared only for the properties specified & the device
name. Only way to get the device name, as far as I know, is to use "-v" option
per its manual page, and that outputs other data not asked for.

-- 
You are receiving this mail because:
You are the assignee for the bug.