Skip to content

Commit

Permalink
list -o props should be alloc,free not used,avail
Browse files Browse the repository at this point in the history
Manpage suggests the zpool list properties include 'used'
and 'available', when these are invalid property names.
Use alloc and free in their place.

```
$ zpool list -o name,size,used   2>&1 |head -1
bad property list: invalid property 'used'
$ zpool list -o name,size,avail   2>&1 |head -1
bad property list: invalid property 'avail'
$ zpool list -o name,size,available   2>&1 |head -1
bad property list: invalid property 'available'
$ zpool list -o name,size,alloc,free
NAME    SIZE  ALLOC   FREE
apool   464M   203M   261M
bpool  3.62T  1.97T  1.65T
```

Reviewed-by: Giuseppe Di Natale <[email protected]>
Reviewed-by: loli10K <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Tom Matthews <[email protected]>
Closes #5959
  • Loading branch information
tomtastic authored and behlendorf committed Apr 4, 2017
1 parent bcdb96a commit d456708
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion man/man8/zpool.8
Original file line number Diff line number Diff line change
Expand Up @@ -1877,7 +1877,7 @@ Specify \fBu\fR for a printed representation of the internal representation of t
\fB\fB-o\fR \fIprops\fR\fR
.ad
.RS 12n
Comma-separated list of properties to display. See the "Properties" section for a list of valid properties. The default list is "name, size, used, available, fragmentation, expandsize, capacity, dedupratio, health, altroot"
Comma-separated list of properties to display. See the "Properties" section for a list of valid properties. The default list is "name, size, alloc, free, fragmentation, expandsize, capacity, dedupratio, health, altroot"
.RE

.sp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ fi
set -A args "list $TESTPOOL" "list -H $TESTPOOL" "list" "list -H" \
"list -H -o name $TESTPOOL" "list -o name $TESTPOOL" \
"list -o name,size,capacity,health,altroot $TESTPOOL" \
"list -H -o name,size,capacity,health,altroot $TESTPOOL"

"list -H -o name,size,capacity,health,altroot $TESTPOOL" \
"list -o alloc,free $TESTPOOL"
log_assert "zpool list [-H] [-o filed[,filed]*] [<pool_name> ...]"

typeset -i i=0
Expand Down

0 comments on commit d456708

Please sign in to comment.